@proteinjs/reflection-build 1.4.2 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/{test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/LICENSE → LICENSE} +5 -6
- package/dist/test/examples/source-repository/a/generated/index.js +1 -1
- package/dist/test/examples/source-repository/a/generated/index.js.map +1 -1
- package/dist/test/examples/source-repository/b/generated/index.js +1 -1
- package/dist/test/examples/source-repository/b/generated/index.js.map +1 -1
- package/package.json +8 -7
- package/test/examples/source-repository/a/dist/generated/index.js +1 -1
- package/test/examples/source-repository/a/dist/generated/index.js.map +1 -1
- package/test/examples/source-repository/a/generated/index.ts +38 -33
- package/test/examples/source-repository/a/node_modules/.package-lock.json +16 -73
- package/test/examples/source-repository/a/node_modules/@proteinjs/util/CHANGELOG.md +11 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util/dist/src/isInstanceOf.d.ts +1 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/util/dist/src/isInstanceOf.js +0 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/util/dist/src/isInstanceOf.js.map +1 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/util/package.json +2 -2
- package/test/examples/source-repository/a/node_modules/@proteinjs/util/src/isInstanceOf.ts +1 -2
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/CHANGELOG.md +8 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/package.json +3 -3
- package/test/examples/source-repository/a/package-lock.json +20 -24
- package/test/examples/source-repository/a/package.json +5 -5
- package/test/examples/source-repository/b/dist/generated/index.js +1 -1
- package/test/examples/source-repository/b/dist/generated/index.js.map +1 -1
- package/test/examples/source-repository/b/generated/index.ts +10 -11
- package/test/examples/source-repository/b/node_modules/.package-lock.json +12 -69
- package/test/examples/source-repository/b/node_modules/@proteinjs/util/CHANGELOG.md +11 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util/dist/src/isInstanceOf.d.ts +1 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/util/dist/src/isInstanceOf.js +0 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/util/dist/src/isInstanceOf.js.map +1 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/util/package.json +2 -2
- package/test/examples/source-repository/b/node_modules/@proteinjs/util/src/isInstanceOf.ts +1 -2
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/CHANGELOG.md +8 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/package.json +3 -3
- package/test/examples/source-repository/b/package-lock.json +16 -20
- package/test/examples/source-repository/b/package.json +5 -5
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/.eslintrc.js +0 -20
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/.prettierignore +0 -4
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/.prettierrc +0 -8
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/CHANGELOG.md +0 -58
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/index.d.ts +0 -5
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/index.js +0 -18
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/index.js.map +0 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/FlattenedSourceGraph.d.ts +0 -19
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/FlattenedSourceGraph.js +0 -555
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/FlattenedSourceGraph.js.map +0 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/Loadable.d.ts +0 -3
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/Loadable.js +0 -5
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/Loadable.js.map +0 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/SourceRepository.d.ts +0 -45
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/SourceRepository.js +0 -176
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/SourceRepository.js.map +0 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/SourceRepositoryFilter.d.ts +0 -11
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/SourceRepositoryFilter.js +0 -9
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/SourceRepositoryFilter.js.map +0 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/sourceGraphTypes.d.ts +0 -13
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/sourceGraphTypes.js +0 -19
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/sourceGraphTypes.js.map +0 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/types.d.ts +0 -221
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/types.js +0 -234
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/dist/src/types.js.map +0 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/index.ts +0 -5
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/jest.config.js +0 -9
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/package.json +0 -42
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/src/FlattenedSourceGraph.ts +0 -702
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/src/Loadable.ts +0 -2
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/src/SourceRepository.ts +0 -250
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/src/SourceRepositoryFilter.ts +0 -15
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/src/sourceGraphTypes.ts +0 -14
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/src/types.ts +0 -236
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/tsconfig.json +0 -19
- package/test/examples/source-repository/a/node_modules/@proteinjs/reflection/types/@dagrejs/graphlib.d.ts +0 -1
- package/test/examples/source-repository/a/node_modules/bindings/LICENSE.md +0 -22
- package/test/examples/source-repository/a/node_modules/bindings/README.md +0 -98
- package/test/examples/source-repository/a/node_modules/bindings/bindings.js +0 -221
- package/test/examples/source-repository/a/node_modules/bindings/package.json +0 -28
- package/test/examples/source-repository/a/node_modules/file-uri-to-path/.travis.yml +0 -30
- package/test/examples/source-repository/a/node_modules/file-uri-to-path/History.md +0 -21
- package/test/examples/source-repository/a/node_modules/file-uri-to-path/LICENSE +0 -20
- package/test/examples/source-repository/a/node_modules/file-uri-to-path/README.md +0 -74
- package/test/examples/source-repository/a/node_modules/file-uri-to-path/index.d.ts +0 -2
- package/test/examples/source-repository/a/node_modules/file-uri-to-path/index.js +0 -66
- package/test/examples/source-repository/a/node_modules/file-uri-to-path/package.json +0 -32
- package/test/examples/source-repository/a/node_modules/file-uri-to-path/test/test.js +0 -24
- package/test/examples/source-repository/a/node_modules/file-uri-to-path/test/tests.json +0 -13
- package/test/examples/source-repository/a/node_modules/fsevents/LICENSE +0 -22
- package/test/examples/source-repository/a/node_modules/fsevents/README.md +0 -89
- package/test/examples/source-repository/a/node_modules/fsevents/fsevents.d.ts +0 -46
- package/test/examples/source-repository/a/node_modules/fsevents/fsevents.js +0 -83
- package/test/examples/source-repository/a/node_modules/fsevents/fsevents.node +0 -0
- package/test/examples/source-repository/a/node_modules/fsevents/package.json +0 -62
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/.travis.yml +0 -103
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/ISSUE_TEMPLATE.md +0 -8
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/Readme.md +0 -78
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/binding.gyp +0 -21
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/build/.target.mk +0 -53
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/build/Makefile +0 -352
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/build/Release/.deps/Release/.node.d +0 -1
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/build/Release/.deps/Release/obj.target/fse/fsevents.o.d.raw +0 -79
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/build/Release/.node +0 -0
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/build/binding.Makefile +0 -6
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/build/fse.target.mk +0 -191
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/build/gyp-mac-tool +0 -766
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/fsevents.cc +0 -88
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/fsevents.js +0 -106
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/install.js +0 -13
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/package.json +0 -34
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/src/async.cc +0 -43
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/src/constants.cc +0 -110
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/src/methods.cc +0 -44
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/src/storage.cc +0 -27
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/src/thread.cc +0 -71
- package/test/examples/source-repository/a/node_modules/nan/CHANGELOG.md +0 -557
- package/test/examples/source-repository/a/node_modules/nan/CMakeLists.txt +0 -138
- package/test/examples/source-repository/a/node_modules/nan/LICENSE.md +0 -9
- package/test/examples/source-repository/a/node_modules/nan/README.md +0 -456
- package/test/examples/source-repository/a/node_modules/nan/doc/asyncworker.md +0 -146
- package/test/examples/source-repository/a/node_modules/nan/doc/buffers.md +0 -54
- package/test/examples/source-repository/a/node_modules/nan/doc/callback.md +0 -76
- package/test/examples/source-repository/a/node_modules/nan/doc/converters.md +0 -41
- package/test/examples/source-repository/a/node_modules/nan/doc/errors.md +0 -226
- package/test/examples/source-repository/a/node_modules/nan/doc/json.md +0 -62
- package/test/examples/source-repository/a/node_modules/nan/doc/maybe_types.md +0 -583
- package/test/examples/source-repository/a/node_modules/nan/doc/methods.md +0 -672
- package/test/examples/source-repository/a/node_modules/nan/doc/new.md +0 -147
- package/test/examples/source-repository/a/node_modules/nan/doc/node_misc.md +0 -123
- package/test/examples/source-repository/a/node_modules/nan/doc/object_wrappers.md +0 -263
- package/test/examples/source-repository/a/node_modules/nan/doc/persistent.md +0 -296
- package/test/examples/source-repository/a/node_modules/nan/doc/scopes.md +0 -73
- package/test/examples/source-repository/a/node_modules/nan/doc/script.md +0 -58
- package/test/examples/source-repository/a/node_modules/nan/doc/string_bytes.md +0 -62
- package/test/examples/source-repository/a/node_modules/nan/doc/v8_internals.md +0 -199
- package/test/examples/source-repository/a/node_modules/nan/doc/v8_misc.md +0 -85
- package/test/examples/source-repository/a/node_modules/nan/include_dirs.js +0 -1
- package/test/examples/source-repository/a/node_modules/nan/nan.h +0 -2958
- package/test/examples/source-repository/a/node_modules/nan/nan_callbacks.h +0 -92
- package/test/examples/source-repository/a/node_modules/nan/nan_callbacks_12_inl.h +0 -520
- package/test/examples/source-repository/a/node_modules/nan/nan_callbacks_pre_12_inl.h +0 -520
- package/test/examples/source-repository/a/node_modules/nan/nan_converters.h +0 -72
- package/test/examples/source-repository/a/node_modules/nan/nan_converters_43_inl.h +0 -68
- package/test/examples/source-repository/a/node_modules/nan/nan_converters_pre_43_inl.h +0 -42
- package/test/examples/source-repository/a/node_modules/nan/nan_define_own_property_helper.h +0 -29
- package/test/examples/source-repository/a/node_modules/nan/nan_implementation_12_inl.h +0 -430
- package/test/examples/source-repository/a/node_modules/nan/nan_implementation_pre_12_inl.h +0 -263
- package/test/examples/source-repository/a/node_modules/nan/nan_json.h +0 -166
- package/test/examples/source-repository/a/node_modules/nan/nan_maybe_43_inl.h +0 -356
- package/test/examples/source-repository/a/node_modules/nan/nan_maybe_pre_43_inl.h +0 -268
- package/test/examples/source-repository/a/node_modules/nan/nan_new.h +0 -340
- package/test/examples/source-repository/a/node_modules/nan/nan_object_wrap.h +0 -156
- package/test/examples/source-repository/a/node_modules/nan/nan_persistent_12_inl.h +0 -132
- package/test/examples/source-repository/a/node_modules/nan/nan_persistent_pre_12_inl.h +0 -242
- package/test/examples/source-repository/a/node_modules/nan/nan_private.h +0 -73
- package/test/examples/source-repository/a/node_modules/nan/nan_scriptorigin.h +0 -76
- package/test/examples/source-repository/a/node_modules/nan/nan_string_bytes.h +0 -305
- package/test/examples/source-repository/a/node_modules/nan/nan_typedarray_contents.h +0 -96
- package/test/examples/source-repository/a/node_modules/nan/nan_weak.h +0 -437
- package/test/examples/source-repository/a/node_modules/nan/package.json +0 -38
- package/test/examples/source-repository/a/node_modules/nan/tools/1to2.js +0 -412
- package/test/examples/source-repository/a/node_modules/nan/tools/README.md +0 -14
- package/test/examples/source-repository/a/node_modules/nan/tools/package.json +0 -19
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/.eslintrc.js +0 -20
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/.prettierignore +0 -4
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/.prettierrc +0 -8
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/CHANGELOG.md +0 -58
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/index.d.ts +0 -5
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/index.js +0 -18
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/index.js.map +0 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/FlattenedSourceGraph.d.ts +0 -19
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/FlattenedSourceGraph.js +0 -555
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/FlattenedSourceGraph.js.map +0 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/Loadable.d.ts +0 -3
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/Loadable.js +0 -5
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/Loadable.js.map +0 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/SourceRepository.d.ts +0 -45
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/SourceRepository.js +0 -176
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/SourceRepository.js.map +0 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/SourceRepositoryFilter.d.ts +0 -11
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/SourceRepositoryFilter.js +0 -9
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/SourceRepositoryFilter.js.map +0 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/sourceGraphTypes.d.ts +0 -13
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/sourceGraphTypes.js +0 -19
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/sourceGraphTypes.js.map +0 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/types.d.ts +0 -221
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/types.js +0 -234
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/dist/src/types.js.map +0 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/index.ts +0 -5
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/jest.config.js +0 -9
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/package.json +0 -42
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/src/FlattenedSourceGraph.ts +0 -702
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/src/Loadable.ts +0 -2
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/src/SourceRepository.ts +0 -250
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/src/SourceRepositoryFilter.ts +0 -15
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/src/sourceGraphTypes.ts +0 -14
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/src/types.ts +0 -236
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/tsconfig.json +0 -19
- package/test/examples/source-repository/b/node_modules/@proteinjs/reflection/types/@dagrejs/graphlib.d.ts +0 -1
- package/test/examples/source-repository/b/node_modules/bindings/LICENSE.md +0 -22
- package/test/examples/source-repository/b/node_modules/bindings/README.md +0 -98
- package/test/examples/source-repository/b/node_modules/bindings/bindings.js +0 -221
- package/test/examples/source-repository/b/node_modules/bindings/package.json +0 -28
- package/test/examples/source-repository/b/node_modules/file-uri-to-path/.travis.yml +0 -30
- package/test/examples/source-repository/b/node_modules/file-uri-to-path/History.md +0 -21
- package/test/examples/source-repository/b/node_modules/file-uri-to-path/LICENSE +0 -20
- package/test/examples/source-repository/b/node_modules/file-uri-to-path/README.md +0 -74
- package/test/examples/source-repository/b/node_modules/file-uri-to-path/index.d.ts +0 -2
- package/test/examples/source-repository/b/node_modules/file-uri-to-path/index.js +0 -66
- package/test/examples/source-repository/b/node_modules/file-uri-to-path/package.json +0 -32
- package/test/examples/source-repository/b/node_modules/file-uri-to-path/test/test.js +0 -24
- package/test/examples/source-repository/b/node_modules/file-uri-to-path/test/tests.json +0 -13
- package/test/examples/source-repository/b/node_modules/fsevents/LICENSE +0 -22
- package/test/examples/source-repository/b/node_modules/fsevents/README.md +0 -89
- package/test/examples/source-repository/b/node_modules/fsevents/fsevents.d.ts +0 -46
- package/test/examples/source-repository/b/node_modules/fsevents/fsevents.js +0 -83
- package/test/examples/source-repository/b/node_modules/fsevents/fsevents.node +0 -0
- package/test/examples/source-repository/b/node_modules/fsevents/package.json +0 -62
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/.travis.yml +0 -103
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/ISSUE_TEMPLATE.md +0 -8
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/LICENSE +0 -22
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/Readme.md +0 -78
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/binding.gyp +0 -21
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/build/.target.mk +0 -53
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/build/Makefile +0 -352
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/build/Release/.deps/Release/.node.d +0 -1
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/build/Release/.deps/Release/obj.target/fse/fsevents.o.d.raw +0 -79
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/build/Release/.node +0 -0
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/build/binding.Makefile +0 -6
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/build/fse.target.mk +0 -191
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/build/gyp-mac-tool +0 -766
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/fsevents.cc +0 -88
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/fsevents.js +0 -106
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/install.js +0 -13
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/package.json +0 -34
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/src/async.cc +0 -43
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/src/constants.cc +0 -110
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/src/methods.cc +0 -44
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/src/storage.cc +0 -27
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/src/thread.cc +0 -71
- package/test/examples/source-repository/b/node_modules/nan/CHANGELOG.md +0 -557
- package/test/examples/source-repository/b/node_modules/nan/CMakeLists.txt +0 -138
- package/test/examples/source-repository/b/node_modules/nan/LICENSE.md +0 -9
- package/test/examples/source-repository/b/node_modules/nan/README.md +0 -456
- package/test/examples/source-repository/b/node_modules/nan/doc/asyncworker.md +0 -146
- package/test/examples/source-repository/b/node_modules/nan/doc/buffers.md +0 -54
- package/test/examples/source-repository/b/node_modules/nan/doc/callback.md +0 -76
- package/test/examples/source-repository/b/node_modules/nan/doc/converters.md +0 -41
- package/test/examples/source-repository/b/node_modules/nan/doc/errors.md +0 -226
- package/test/examples/source-repository/b/node_modules/nan/doc/json.md +0 -62
- package/test/examples/source-repository/b/node_modules/nan/doc/maybe_types.md +0 -583
- package/test/examples/source-repository/b/node_modules/nan/doc/methods.md +0 -672
- package/test/examples/source-repository/b/node_modules/nan/doc/new.md +0 -147
- package/test/examples/source-repository/b/node_modules/nan/doc/node_misc.md +0 -123
- package/test/examples/source-repository/b/node_modules/nan/doc/object_wrappers.md +0 -263
- package/test/examples/source-repository/b/node_modules/nan/doc/persistent.md +0 -296
- package/test/examples/source-repository/b/node_modules/nan/doc/scopes.md +0 -73
- package/test/examples/source-repository/b/node_modules/nan/doc/script.md +0 -58
- package/test/examples/source-repository/b/node_modules/nan/doc/string_bytes.md +0 -62
- package/test/examples/source-repository/b/node_modules/nan/doc/v8_internals.md +0 -199
- package/test/examples/source-repository/b/node_modules/nan/doc/v8_misc.md +0 -85
- package/test/examples/source-repository/b/node_modules/nan/include_dirs.js +0 -1
- package/test/examples/source-repository/b/node_modules/nan/nan.h +0 -2958
- package/test/examples/source-repository/b/node_modules/nan/nan_callbacks.h +0 -92
- package/test/examples/source-repository/b/node_modules/nan/nan_callbacks_12_inl.h +0 -520
- package/test/examples/source-repository/b/node_modules/nan/nan_callbacks_pre_12_inl.h +0 -520
- package/test/examples/source-repository/b/node_modules/nan/nan_converters.h +0 -72
- package/test/examples/source-repository/b/node_modules/nan/nan_converters_43_inl.h +0 -68
- package/test/examples/source-repository/b/node_modules/nan/nan_converters_pre_43_inl.h +0 -42
- package/test/examples/source-repository/b/node_modules/nan/nan_define_own_property_helper.h +0 -29
- package/test/examples/source-repository/b/node_modules/nan/nan_implementation_12_inl.h +0 -430
- package/test/examples/source-repository/b/node_modules/nan/nan_implementation_pre_12_inl.h +0 -263
- package/test/examples/source-repository/b/node_modules/nan/nan_json.h +0 -166
- package/test/examples/source-repository/b/node_modules/nan/nan_maybe_43_inl.h +0 -356
- package/test/examples/source-repository/b/node_modules/nan/nan_maybe_pre_43_inl.h +0 -268
- package/test/examples/source-repository/b/node_modules/nan/nan_new.h +0 -340
- package/test/examples/source-repository/b/node_modules/nan/nan_object_wrap.h +0 -156
- package/test/examples/source-repository/b/node_modules/nan/nan_persistent_12_inl.h +0 -132
- package/test/examples/source-repository/b/node_modules/nan/nan_persistent_pre_12_inl.h +0 -242
- package/test/examples/source-repository/b/node_modules/nan/nan_private.h +0 -73
- package/test/examples/source-repository/b/node_modules/nan/nan_scriptorigin.h +0 -76
- package/test/examples/source-repository/b/node_modules/nan/nan_string_bytes.h +0 -305
- package/test/examples/source-repository/b/node_modules/nan/nan_typedarray_contents.h +0 -96
- package/test/examples/source-repository/b/node_modules/nan/nan_weak.h +0 -437
- package/test/examples/source-repository/b/node_modules/nan/package.json +0 -38
- package/test/examples/source-repository/b/node_modules/nan/tools/1to2.js +0 -412
- package/test/examples/source-repository/b/node_modules/nan/tools/README.md +0 -14
- package/test/examples/source-repository/b/node_modules/nan/tools/package.json +0 -19
|
@@ -1,702 +0,0 @@
|
|
|
1
|
-
import { Graph, alg } from '@dagrejs/graphlib';
|
|
2
|
-
import {
|
|
3
|
-
ClassDeclaration,
|
|
4
|
-
VariableDeclaration,
|
|
5
|
-
Variable,
|
|
6
|
-
TypeAlias,
|
|
7
|
-
Class,
|
|
8
|
-
Interface,
|
|
9
|
-
TypeAliasDeclaration,
|
|
10
|
-
InterfaceDeclaration,
|
|
11
|
-
} from './types';
|
|
12
|
-
import { isInstanceOf } from '@proteinjs/util';
|
|
13
|
-
import { LOADABLE_QUALIFIED_NAME } from './Loadable';
|
|
14
|
-
import { SOURCE_REPOSITORY_FILTER_QUALIFIED_NAME } from './SourceRepositoryFilter';
|
|
15
|
-
import { SourceRelationship } from './sourceGraphTypes';
|
|
16
|
-
|
|
17
|
-
export type FlattenedSourceGraph = {
|
|
18
|
-
variables: { [qualifiedName: string]: Variable };
|
|
19
|
-
typeAliases: { [qualifiedName: string]: TypeAlias };
|
|
20
|
-
classes: { [qualifiedName: string]: Class };
|
|
21
|
-
interfaces: { [qualifiedName: string]: Interface };
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export function flattenSourceGraph(
|
|
25
|
-
sourceGraph: Graph,
|
|
26
|
-
sourceLinks: { [qualifiedName: string]: any }
|
|
27
|
-
): FlattenedSourceGraph {
|
|
28
|
-
const flattenedSourceGraph: FlattenedSourceGraph = {
|
|
29
|
-
variables: {},
|
|
30
|
-
typeAliases: {},
|
|
31
|
-
classes: {},
|
|
32
|
-
interfaces: {},
|
|
33
|
-
};
|
|
34
|
-
const loadableInterfaceDeclaration = new InterfaceDeclaration('@proteinjs/reflection', 'Loadable', [], [], [], []);
|
|
35
|
-
sourceGraph.setNode(LOADABLE_QUALIFIED_NAME, loadableInterfaceDeclaration);
|
|
36
|
-
if (!sourceGraph.hasNode(SOURCE_REPOSITORY_FILTER_QUALIFIED_NAME)) {
|
|
37
|
-
sourceGraph.setNode(
|
|
38
|
-
SOURCE_REPOSITORY_FILTER_QUALIFIED_NAME,
|
|
39
|
-
new InterfaceDeclaration(
|
|
40
|
-
'@proteinjs/reflection',
|
|
41
|
-
'SourceRepositoryFilter',
|
|
42
|
-
[],
|
|
43
|
-
[],
|
|
44
|
-
[],
|
|
45
|
-
[loadableInterfaceDeclaration]
|
|
46
|
-
)
|
|
47
|
-
);
|
|
48
|
-
sourceGraph.setEdge(
|
|
49
|
-
SOURCE_REPOSITORY_FILTER_QUALIFIED_NAME,
|
|
50
|
-
LOADABLE_QUALIFIED_NAME,
|
|
51
|
-
SourceRelationship.extendsInterface
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
flattenParents(sourceGraph, sourceLinks, flattenedSourceGraph);
|
|
55
|
-
flattenChildren(sourceGraph, sourceLinks, flattenedSourceGraph);
|
|
56
|
-
addTypeParameters(flattenedSourceGraph, sourceGraph);
|
|
57
|
-
pruneNonLoadables(flattenedSourceGraph);
|
|
58
|
-
return flattenedSourceGraph;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function flattenParents(
|
|
62
|
-
sourceGraph: Graph,
|
|
63
|
-
sourceLinks: { [qualifiedName: string]: any },
|
|
64
|
-
flattenedSourceGraph: FlattenedSourceGraph
|
|
65
|
-
): void {
|
|
66
|
-
for (const nodeName of alg.topsort(sourceGraph).reverse()) {
|
|
67
|
-
const node = sourceGraph.node(nodeName);
|
|
68
|
-
if (!node) {
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (isInstanceOf(node, InterfaceDeclaration)) {
|
|
73
|
-
loadInterfaceAndParents(node, sourceGraph, sourceLinks, flattenedSourceGraph);
|
|
74
|
-
} else if (isInstanceOf(node, TypeAliasDeclaration)) {
|
|
75
|
-
loadTypeAliasAndParents(node, sourceGraph, sourceLinks, flattenedSourceGraph);
|
|
76
|
-
} else if (isInstanceOf(node, ClassDeclaration)) {
|
|
77
|
-
loadClassAndParents(node, sourceGraph, sourceLinks, flattenedSourceGraph);
|
|
78
|
-
} else if (isInstanceOf(node, VariableDeclaration)) {
|
|
79
|
-
loadVariableAndParents(node, sourceGraph, sourceLinks, flattenedSourceGraph);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function flattenChildren(
|
|
85
|
-
sourceGraph: Graph,
|
|
86
|
-
sourceLinks: { [qualifiedName: string]: any },
|
|
87
|
-
flattenedSourceGraph: FlattenedSourceGraph
|
|
88
|
-
): void {
|
|
89
|
-
for (const nodeName of alg.topsort(sourceGraph)) {
|
|
90
|
-
const node = sourceGraph.node(nodeName);
|
|
91
|
-
if (!node) {
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (isInstanceOf(node, TypeAliasDeclaration)) {
|
|
96
|
-
loadTypeAliasAndChildren(node, sourceGraph, flattenedSourceGraph);
|
|
97
|
-
} else if (isInstanceOf(node, InterfaceDeclaration)) {
|
|
98
|
-
loadInterfaceAndChildren(node, sourceGraph, flattenedSourceGraph);
|
|
99
|
-
} else if (isInstanceOf(node, ClassDeclaration)) {
|
|
100
|
-
loadClassAndChildren(node, sourceGraph, sourceLinks, flattenedSourceGraph);
|
|
101
|
-
} else if (isInstanceOf(node, VariableDeclaration)) {
|
|
102
|
-
getOrCreateVariable(node, sourceLinks, flattenedSourceGraph);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function isRootParent(type: TypeAlias | Class | Interface): boolean {
|
|
108
|
-
if (Object.keys(type.directParents).length === 0 && type.directParents.constructor === Object) {
|
|
109
|
-
return true;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
if (type.directParents[LOADABLE_QUALIFIED_NAME]) {
|
|
113
|
-
return true;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function loadTypeAliasAndParents(
|
|
120
|
-
typeAliasDeclaration: TypeAliasDeclaration,
|
|
121
|
-
sourceGraph: Graph,
|
|
122
|
-
sourceLinks: { [qualifiedName: string]: any },
|
|
123
|
-
flattenedSourceGraph: FlattenedSourceGraph
|
|
124
|
-
): void {
|
|
125
|
-
if (!flattenedSourceGraph.typeAliases[typeAliasDeclaration.qualifiedName]) {
|
|
126
|
-
flattenedSourceGraph.typeAliases[typeAliasDeclaration.qualifiedName] = new TypeAlias(
|
|
127
|
-
typeAliasDeclaration.packageName,
|
|
128
|
-
typeAliasDeclaration.name,
|
|
129
|
-
typeAliasDeclaration.filePath
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const typeAlias = flattenedSourceGraph.typeAliases[typeAliasDeclaration.qualifiedName];
|
|
134
|
-
const outEdges = sourceGraph.outEdges(typeAliasDeclaration.qualifiedName);
|
|
135
|
-
if (outEdges) {
|
|
136
|
-
for (const outEdge of outEdges) {
|
|
137
|
-
const node = sourceGraph.node(outEdge.w);
|
|
138
|
-
if (!node) {
|
|
139
|
-
continue;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
if (isInstanceOf(node, TypeAliasDeclaration)) {
|
|
143
|
-
const parentTypeAlias = flattenedSourceGraph.typeAliases[outEdge.w];
|
|
144
|
-
if (!parentTypeAlias) {
|
|
145
|
-
continue;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
typeAlias.directParents[parentTypeAlias.qualifiedName] = parentTypeAlias;
|
|
149
|
-
typeAlias.allParents[parentTypeAlias.qualifiedName] = parentTypeAlias;
|
|
150
|
-
typeAlias.allParents = Object.assign(typeAlias.allParents, parentTypeAlias.allParents);
|
|
151
|
-
if (isRootParent(parentTypeAlias)) {
|
|
152
|
-
typeAlias.rootParents[parentTypeAlias.qualifiedName] = parentTypeAlias;
|
|
153
|
-
} else {
|
|
154
|
-
typeAlias.rootParents = Object.assign(typeAlias.rootParents, parentTypeAlias.rootParents);
|
|
155
|
-
}
|
|
156
|
-
} else if (isInstanceOf(node, InterfaceDeclaration)) {
|
|
157
|
-
const parentInterface = flattenedSourceGraph.interfaces[outEdge.w];
|
|
158
|
-
if (!parentInterface) {
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
typeAlias.directParents[parentInterface.qualifiedName] = parentInterface;
|
|
163
|
-
typeAlias.allParents[parentInterface.qualifiedName] = parentInterface;
|
|
164
|
-
typeAlias.allParents = Object.assign(typeAlias.allParents, parentInterface.allParents);
|
|
165
|
-
if (isRootParent(parentInterface)) {
|
|
166
|
-
typeAlias.rootParents[parentInterface.qualifiedName] = parentInterface;
|
|
167
|
-
} else {
|
|
168
|
-
typeAlias.rootParents = Object.assign(typeAlias.rootParents, parentInterface.rootParents);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
function loadInterfaceAndParents(
|
|
176
|
-
interfaceDeclaration: InterfaceDeclaration,
|
|
177
|
-
sourceGraph: Graph,
|
|
178
|
-
sourceLinks: { [qualifiedName: string]: any },
|
|
179
|
-
flattenedSourceGraph: FlattenedSourceGraph
|
|
180
|
-
): void {
|
|
181
|
-
if (!flattenedSourceGraph.interfaces[interfaceDeclaration.qualifiedName]) {
|
|
182
|
-
flattenedSourceGraph.interfaces[interfaceDeclaration.qualifiedName] = new Interface(
|
|
183
|
-
interfaceDeclaration.packageName,
|
|
184
|
-
interfaceDeclaration.name,
|
|
185
|
-
interfaceDeclaration.properties,
|
|
186
|
-
interfaceDeclaration.methods,
|
|
187
|
-
interfaceDeclaration.filePath
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
const _interface = flattenedSourceGraph.interfaces[interfaceDeclaration.qualifiedName];
|
|
192
|
-
const outEdges = sourceGraph.outEdges(interfaceDeclaration.qualifiedName);
|
|
193
|
-
if (outEdges) {
|
|
194
|
-
for (const outEdge of outEdges) {
|
|
195
|
-
const node = sourceGraph.node(outEdge.w);
|
|
196
|
-
if (!node) {
|
|
197
|
-
continue;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
if (isInstanceOf(node, InterfaceDeclaration)) {
|
|
201
|
-
const parentInterface = flattenedSourceGraph.interfaces[outEdge.w];
|
|
202
|
-
if (!parentInterface) {
|
|
203
|
-
continue;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
_interface.directParents[parentInterface.qualifiedName] = parentInterface;
|
|
207
|
-
_interface.allParents[parentInterface.qualifiedName] = parentInterface;
|
|
208
|
-
_interface.allParents = Object.assign(_interface.allParents, parentInterface.allParents);
|
|
209
|
-
if (isRootParent(parentInterface)) {
|
|
210
|
-
_interface.rootParents[parentInterface.qualifiedName] = parentInterface;
|
|
211
|
-
} else {
|
|
212
|
-
_interface.rootParents = Object.assign(_interface.rootParents, parentInterface.rootParents);
|
|
213
|
-
}
|
|
214
|
-
} else if (isInstanceOf(node, TypeAliasDeclaration)) {
|
|
215
|
-
const parentTypeAlias = flattenedSourceGraph.typeAliases[outEdge.w];
|
|
216
|
-
if (!parentTypeAlias) {
|
|
217
|
-
continue;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
_interface.directParents[parentTypeAlias.qualifiedName] = parentTypeAlias;
|
|
221
|
-
_interface.allParents[parentTypeAlias.qualifiedName] = parentTypeAlias;
|
|
222
|
-
_interface.allParents = Object.assign(_interface.allParents, parentTypeAlias.allParents);
|
|
223
|
-
if (isRootParent(parentTypeAlias)) {
|
|
224
|
-
_interface.rootParents[parentTypeAlias.qualifiedName] = parentTypeAlias;
|
|
225
|
-
} else {
|
|
226
|
-
_interface.rootParents = Object.assign(_interface.rootParents, parentTypeAlias.rootParents);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
function loadClassAndParents(
|
|
234
|
-
classDeclaration: ClassDeclaration,
|
|
235
|
-
sourceGraph: Graph,
|
|
236
|
-
sourceLinks: { [qualifiedName: string]: any },
|
|
237
|
-
flattenedSourceGraph: FlattenedSourceGraph
|
|
238
|
-
): void {
|
|
239
|
-
if (!flattenedSourceGraph.classes[classDeclaration.qualifiedName]) {
|
|
240
|
-
flattenedSourceGraph.classes[classDeclaration.qualifiedName] = new Class(
|
|
241
|
-
classDeclaration.packageName,
|
|
242
|
-
classDeclaration.name,
|
|
243
|
-
classDeclaration.filePath as string,
|
|
244
|
-
classDeclaration.isAbstract,
|
|
245
|
-
classDeclaration.isStatic,
|
|
246
|
-
classDeclaration.visibility,
|
|
247
|
-
classDeclaration.properties,
|
|
248
|
-
classDeclaration.methods,
|
|
249
|
-
sourceLinks[classDeclaration.qualifiedName]
|
|
250
|
-
);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
const _class = flattenedSourceGraph.classes[classDeclaration.qualifiedName];
|
|
254
|
-
const outEdges = sourceGraph.outEdges(classDeclaration.qualifiedName);
|
|
255
|
-
if (outEdges) {
|
|
256
|
-
for (const outEdge of outEdges) {
|
|
257
|
-
const node = sourceGraph.node(outEdge.w);
|
|
258
|
-
if (!node) {
|
|
259
|
-
continue;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
if (isInstanceOf(node, ClassDeclaration)) {
|
|
263
|
-
const parentClass = flattenedSourceGraph.classes[outEdge.w];
|
|
264
|
-
if (!parentClass) {
|
|
265
|
-
continue;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
_class.directParents[parentClass.qualifiedName] = parentClass;
|
|
269
|
-
_class.allParents[parentClass.qualifiedName] = parentClass;
|
|
270
|
-
_class.allParents = Object.assign(_class.allParents, parentClass.allParents);
|
|
271
|
-
if (isRootParent(parentClass)) {
|
|
272
|
-
_class.rootParents[parentClass.qualifiedName] = parentClass;
|
|
273
|
-
} else {
|
|
274
|
-
_class.rootParents = Object.assign(_class.rootParents, parentClass.rootParents);
|
|
275
|
-
}
|
|
276
|
-
} else if (isInstanceOf(node, InterfaceDeclaration)) {
|
|
277
|
-
const parentInterface = flattenedSourceGraph.interfaces[outEdge.w];
|
|
278
|
-
if (!parentInterface) {
|
|
279
|
-
continue;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
_class.directParents[parentInterface.qualifiedName] = parentInterface;
|
|
283
|
-
_class.allParents[parentInterface.qualifiedName] = parentInterface;
|
|
284
|
-
_class.allParents = Object.assign(_class.allParents, parentInterface.allParents);
|
|
285
|
-
if (isRootParent(parentInterface)) {
|
|
286
|
-
_class.rootParents[parentInterface.qualifiedName] = parentInterface;
|
|
287
|
-
} else {
|
|
288
|
-
_class.rootParents = Object.assign(_class.rootParents, parentInterface.rootParents);
|
|
289
|
-
}
|
|
290
|
-
} else if (isInstanceOf(node, TypeAliasDeclaration)) {
|
|
291
|
-
const parentTypeAlias = flattenedSourceGraph.typeAliases[outEdge.w];
|
|
292
|
-
if (!parentTypeAlias) {
|
|
293
|
-
continue;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
_class.directParents[parentTypeAlias.qualifiedName] = parentTypeAlias;
|
|
297
|
-
_class.allParents[parentTypeAlias.qualifiedName] = parentTypeAlias;
|
|
298
|
-
_class.allParents = Object.assign(_class.allParents, parentTypeAlias.allParents);
|
|
299
|
-
if (isRootParent(parentTypeAlias)) {
|
|
300
|
-
_class.rootParents[parentTypeAlias.qualifiedName] = parentTypeAlias;
|
|
301
|
-
} else {
|
|
302
|
-
_class.rootParents = Object.assign(_class.rootParents, parentTypeAlias.rootParents);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
function loadVariableAndParents(
|
|
310
|
-
variableDeclaration: VariableDeclaration,
|
|
311
|
-
sourceGraph: Graph,
|
|
312
|
-
sourceLinks: { [qualifiedName: string]: any },
|
|
313
|
-
flattenedSourceGraph: FlattenedSourceGraph
|
|
314
|
-
): void {
|
|
315
|
-
const variable = getOrCreateVariable(variableDeclaration, sourceLinks, flattenedSourceGraph);
|
|
316
|
-
const outEdges = sourceGraph.outEdges(variableDeclaration.qualifiedName);
|
|
317
|
-
if (outEdges) {
|
|
318
|
-
for (const outEdge of outEdges) {
|
|
319
|
-
const node = sourceGraph.node(outEdge.w);
|
|
320
|
-
if (!node) {
|
|
321
|
-
continue;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
if (isInstanceOf(node, TypeAliasDeclaration)) {
|
|
325
|
-
const parentTypeAlias = flattenedSourceGraph.typeAliases[outEdge.w];
|
|
326
|
-
if (!parentTypeAlias) {
|
|
327
|
-
continue;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
variable.directParentTypes[parentTypeAlias.qualifiedName] = parentTypeAlias;
|
|
331
|
-
variable.allParentTypes[parentTypeAlias.qualifiedName] = parentTypeAlias;
|
|
332
|
-
variable.allParentTypes = Object.assign(variable.allParentTypes, parentTypeAlias.allParents);
|
|
333
|
-
if (isRootParent(parentTypeAlias)) {
|
|
334
|
-
variable.rootParentTypes[parentTypeAlias.qualifiedName] = parentTypeAlias;
|
|
335
|
-
} else {
|
|
336
|
-
variable.rootParentTypes = Object.assign(variable.rootParentTypes, parentTypeAlias.rootParents);
|
|
337
|
-
}
|
|
338
|
-
} else if (isInstanceOf(node, InterfaceDeclaration)) {
|
|
339
|
-
const parentInterface = flattenedSourceGraph.interfaces[outEdge.w];
|
|
340
|
-
if (!parentInterface) {
|
|
341
|
-
continue;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
variable.directParentTypes[parentInterface.qualifiedName] = parentInterface;
|
|
345
|
-
variable.allParentTypes[parentInterface.qualifiedName] = parentInterface;
|
|
346
|
-
variable.allParentTypes = Object.assign(variable.allParentTypes, parentInterface.allParents);
|
|
347
|
-
if (isRootParent(parentInterface)) {
|
|
348
|
-
variable.rootParentTypes[parentInterface.qualifiedName] = parentInterface;
|
|
349
|
-
} else {
|
|
350
|
-
variable.rootParentTypes = Object.assign(variable.rootParentTypes, parentInterface.rootParents);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
function getOrCreateVariable(
|
|
358
|
-
variableDeclaration: VariableDeclaration,
|
|
359
|
-
sourceLinks: { [qualifiedName: string]: any },
|
|
360
|
-
flattenedSourceGraph: FlattenedSourceGraph
|
|
361
|
-
): Variable {
|
|
362
|
-
if (flattenedSourceGraph.variables[variableDeclaration.qualifiedName]) {
|
|
363
|
-
return flattenedSourceGraph.variables[variableDeclaration.qualifiedName];
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
const variable = new Variable(
|
|
367
|
-
variableDeclaration.packageName,
|
|
368
|
-
variableDeclaration.name,
|
|
369
|
-
variableDeclaration.filePath as string,
|
|
370
|
-
variableDeclaration.isExported,
|
|
371
|
-
variableDeclaration.isConst,
|
|
372
|
-
sourceLinks[variableDeclaration.qualifiedName]
|
|
373
|
-
);
|
|
374
|
-
flattenedSourceGraph.variables[variableDeclaration.qualifiedName] = variable;
|
|
375
|
-
return variable;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
function loadTypeAliasAndChildren(
|
|
379
|
-
typeAliasDeclaration: TypeAliasDeclaration,
|
|
380
|
-
sourceGraph: Graph,
|
|
381
|
-
flattenedSourceGraph: FlattenedSourceGraph
|
|
382
|
-
): void {
|
|
383
|
-
if (!flattenedSourceGraph.typeAliases[typeAliasDeclaration.qualifiedName]) {
|
|
384
|
-
flattenedSourceGraph.typeAliases[typeAliasDeclaration.qualifiedName] = new TypeAlias(
|
|
385
|
-
typeAliasDeclaration.packageName,
|
|
386
|
-
typeAliasDeclaration.name,
|
|
387
|
-
typeAliasDeclaration.filePath
|
|
388
|
-
);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
const typeAlias = flattenedSourceGraph.typeAliases[typeAliasDeclaration.qualifiedName];
|
|
392
|
-
const inEdges = sourceGraph.inEdges(typeAliasDeclaration.qualifiedName);
|
|
393
|
-
if (inEdges) {
|
|
394
|
-
for (const inEdge of inEdges) {
|
|
395
|
-
const node = sourceGraph.node(inEdge.v);
|
|
396
|
-
if (!node) {
|
|
397
|
-
continue;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
if (isInstanceOf(node, TypeAliasDeclaration)) {
|
|
401
|
-
const childTypeAlias = flattenedSourceGraph.typeAliases[node.qualifiedName];
|
|
402
|
-
if (!childTypeAlias) {
|
|
403
|
-
continue;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
typeAlias.directChildren[childTypeAlias.qualifiedName] = childTypeAlias;
|
|
407
|
-
typeAlias.allChildren[childTypeAlias.qualifiedName] = childTypeAlias;
|
|
408
|
-
typeAlias.allChildren = Object.assign(typeAlias.allChildren, childTypeAlias.allChildren);
|
|
409
|
-
if (
|
|
410
|
-
Object.keys(childTypeAlias.directChildren).length === 0 &&
|
|
411
|
-
childTypeAlias.directChildren.constructor === Object
|
|
412
|
-
) {
|
|
413
|
-
typeAlias.baseChildren[childTypeAlias.qualifiedName] = childTypeAlias;
|
|
414
|
-
} else {
|
|
415
|
-
typeAlias.baseChildren = Object.assign(typeAlias.baseChildren, childTypeAlias.baseChildren);
|
|
416
|
-
}
|
|
417
|
-
} else if (isInstanceOf(node, InterfaceDeclaration)) {
|
|
418
|
-
const childInterface = flattenedSourceGraph.interfaces[node.qualifiedName];
|
|
419
|
-
if (!childInterface) {
|
|
420
|
-
continue;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
typeAlias.directChildren[childInterface.qualifiedName] = childInterface;
|
|
424
|
-
typeAlias.allChildren[childInterface.qualifiedName] = childInterface;
|
|
425
|
-
typeAlias.allChildren = Object.assign(typeAlias.allChildren, childInterface.allChildren);
|
|
426
|
-
if (
|
|
427
|
-
Object.keys(childInterface.directChildren).length === 0 &&
|
|
428
|
-
childInterface.directChildren.constructor === Object
|
|
429
|
-
) {
|
|
430
|
-
typeAlias.baseChildren[childInterface.qualifiedName] = childInterface;
|
|
431
|
-
} else {
|
|
432
|
-
typeAlias.baseChildren = Object.assign(typeAlias.baseChildren, childInterface.baseChildren);
|
|
433
|
-
}
|
|
434
|
-
} else if (isInstanceOf(node, VariableDeclaration)) {
|
|
435
|
-
const childVariable = flattenedSourceGraph.variables[node.qualifiedName];
|
|
436
|
-
if (!childVariable) {
|
|
437
|
-
continue;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
typeAlias.directChildren[childVariable.qualifiedName] = childVariable;
|
|
441
|
-
typeAlias.allChildren[childVariable.qualifiedName] = childVariable;
|
|
442
|
-
typeAlias.baseChildren[childVariable.qualifiedName] = childVariable;
|
|
443
|
-
} else if (isInstanceOf(node, ClassDeclaration)) {
|
|
444
|
-
const childClass = flattenedSourceGraph.classes[node.qualifiedName];
|
|
445
|
-
if (!childClass) {
|
|
446
|
-
continue;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
typeAlias.directChildren[childClass.qualifiedName] = childClass;
|
|
450
|
-
typeAlias.allChildren[childClass.qualifiedName] = childClass;
|
|
451
|
-
typeAlias.baseChildren[childClass.qualifiedName] = childClass;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
function loadInterfaceAndChildren(
|
|
458
|
-
interfaceDeclaration: InterfaceDeclaration,
|
|
459
|
-
sourceGraph: Graph,
|
|
460
|
-
flattenedSourceGraph: FlattenedSourceGraph
|
|
461
|
-
): void {
|
|
462
|
-
if (!flattenedSourceGraph.interfaces[interfaceDeclaration.qualifiedName]) {
|
|
463
|
-
flattenedSourceGraph.interfaces[interfaceDeclaration.qualifiedName] = new Interface(
|
|
464
|
-
interfaceDeclaration.packageName,
|
|
465
|
-
interfaceDeclaration.name,
|
|
466
|
-
interfaceDeclaration.properties,
|
|
467
|
-
interfaceDeclaration.methods,
|
|
468
|
-
interfaceDeclaration.filePath
|
|
469
|
-
);
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
const _interface = flattenedSourceGraph.interfaces[interfaceDeclaration.qualifiedName];
|
|
473
|
-
const inEdges = sourceGraph.inEdges(interfaceDeclaration.qualifiedName);
|
|
474
|
-
if (inEdges) {
|
|
475
|
-
for (const inEdge of inEdges) {
|
|
476
|
-
const node = sourceGraph.node(inEdge.v);
|
|
477
|
-
if (!node) {
|
|
478
|
-
continue;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
if (isInstanceOf(node, InterfaceDeclaration)) {
|
|
482
|
-
const childInterface = flattenedSourceGraph.interfaces[node.qualifiedName];
|
|
483
|
-
if (!childInterface) {
|
|
484
|
-
continue;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
_interface.directChildren[childInterface.qualifiedName] = childInterface;
|
|
488
|
-
_interface.allChildren[childInterface.qualifiedName] = childInterface;
|
|
489
|
-
_interface.allChildren = Object.assign(_interface.allChildren, childInterface.allChildren);
|
|
490
|
-
if (
|
|
491
|
-
Object.keys(childInterface.directChildren).length === 0 &&
|
|
492
|
-
childInterface.directChildren.constructor === Object
|
|
493
|
-
) {
|
|
494
|
-
_interface.baseChildren[childInterface.qualifiedName] = childInterface;
|
|
495
|
-
} else {
|
|
496
|
-
_interface.baseChildren = Object.assign(_interface.baseChildren, childInterface.baseChildren);
|
|
497
|
-
}
|
|
498
|
-
} else if (isInstanceOf(node, TypeAliasDeclaration)) {
|
|
499
|
-
const childTypeAlias = flattenedSourceGraph.typeAliases[node.qualifiedName];
|
|
500
|
-
if (!childTypeAlias) {
|
|
501
|
-
continue;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
_interface.directChildren[childTypeAlias.qualifiedName] = childTypeAlias;
|
|
505
|
-
_interface.allChildren[childTypeAlias.qualifiedName] = childTypeAlias;
|
|
506
|
-
_interface.allChildren = Object.assign(_interface.allChildren, childTypeAlias.allChildren);
|
|
507
|
-
if (
|
|
508
|
-
Object.keys(childTypeAlias.directChildren).length === 0 &&
|
|
509
|
-
childTypeAlias.directChildren.constructor === Object
|
|
510
|
-
) {
|
|
511
|
-
_interface.baseChildren[childTypeAlias.qualifiedName] = childTypeAlias;
|
|
512
|
-
} else {
|
|
513
|
-
_interface.baseChildren = Object.assign(_interface.baseChildren, childTypeAlias.baseChildren);
|
|
514
|
-
}
|
|
515
|
-
} else if (isInstanceOf(node, ClassDeclaration)) {
|
|
516
|
-
const childClass = flattenedSourceGraph.classes[node.qualifiedName];
|
|
517
|
-
if (!childClass) {
|
|
518
|
-
continue;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
_interface.directChildren[childClass.qualifiedName] = childClass;
|
|
522
|
-
_interface.allChildren[childClass.qualifiedName] = childClass;
|
|
523
|
-
_interface.allChildren = Object.assign(_interface.allChildren, childClass.allChildren);
|
|
524
|
-
if (Object.keys(childClass.directChildren).length === 0 && childClass.directChildren.constructor === Object) {
|
|
525
|
-
_interface.baseChildren[childClass.qualifiedName] = childClass;
|
|
526
|
-
} else {
|
|
527
|
-
_interface.baseChildren = Object.assign(_interface.baseChildren, childClass.baseChildren);
|
|
528
|
-
}
|
|
529
|
-
} else if (isInstanceOf(node, VariableDeclaration)) {
|
|
530
|
-
const childVariable = flattenedSourceGraph.variables[node.qualifiedName];
|
|
531
|
-
if (!childVariable) {
|
|
532
|
-
continue;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
_interface.directChildren[childVariable.qualifiedName] = childVariable;
|
|
536
|
-
_interface.allChildren[childVariable.qualifiedName] = childVariable;
|
|
537
|
-
_interface.baseChildren[childVariable.qualifiedName] = childVariable;
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
function loadClassAndChildren(
|
|
544
|
-
classDeclaration: ClassDeclaration,
|
|
545
|
-
sourceGraph: Graph,
|
|
546
|
-
sourceLinks: { [qualifiedName: string]: any },
|
|
547
|
-
flattenedSourceGraph: FlattenedSourceGraph
|
|
548
|
-
): void {
|
|
549
|
-
if (!flattenedSourceGraph.classes[classDeclaration.qualifiedName]) {
|
|
550
|
-
flattenedSourceGraph.classes[classDeclaration.qualifiedName] = new Class(
|
|
551
|
-
classDeclaration.packageName,
|
|
552
|
-
classDeclaration.name,
|
|
553
|
-
classDeclaration.filePath as string,
|
|
554
|
-
classDeclaration.isAbstract,
|
|
555
|
-
classDeclaration.isStatic,
|
|
556
|
-
classDeclaration.visibility,
|
|
557
|
-
classDeclaration.properties,
|
|
558
|
-
classDeclaration.methods,
|
|
559
|
-
sourceLinks[classDeclaration.qualifiedName]
|
|
560
|
-
);
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
const _class = flattenedSourceGraph.classes[classDeclaration.qualifiedName];
|
|
564
|
-
const inEdges = sourceGraph.inEdges(classDeclaration.qualifiedName);
|
|
565
|
-
if (inEdges) {
|
|
566
|
-
for (const inEdge of inEdges) {
|
|
567
|
-
const node = sourceGraph.node(inEdge.v);
|
|
568
|
-
if (!node) {
|
|
569
|
-
continue;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
if (isInstanceOf(node, ClassDeclaration)) {
|
|
573
|
-
const childClass = flattenedSourceGraph.classes[node.qualifiedName];
|
|
574
|
-
if (!childClass) {
|
|
575
|
-
continue;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
_class.directChildren[childClass.qualifiedName] = childClass;
|
|
579
|
-
_class.allChildren[childClass.qualifiedName] = childClass;
|
|
580
|
-
_class.allChildren = Object.assign(_class.allChildren, childClass.allChildren);
|
|
581
|
-
if (Object.keys(childClass.directChildren).length === 0 && childClass.directChildren.constructor === Object) {
|
|
582
|
-
_class.baseChildren[childClass.qualifiedName] = childClass;
|
|
583
|
-
} else {
|
|
584
|
-
_class.baseChildren = Object.assign(_class.baseChildren, childClass.baseChildren);
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
function addTypeParameters(flattenedSourceGraph: FlattenedSourceGraph, sourceGraph: Graph): void {
|
|
592
|
-
for (const typeAliasName of Object.keys(flattenedSourceGraph.typeAliases)) {
|
|
593
|
-
const typeAlias = flattenedSourceGraph.typeAliases[typeAliasName];
|
|
594
|
-
const typeAliasDeclaration: TypeAliasDeclaration = sourceGraph.node(typeAliasName);
|
|
595
|
-
if (!typeAliasDeclaration) {
|
|
596
|
-
continue;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
if (!typeAliasDeclaration.directParents) {
|
|
600
|
-
continue;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
addTypeParametersToSource(typeAlias, typeAliasDeclaration.directParents, flattenedSourceGraph);
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
for (const interfaceName of Object.keys(flattenedSourceGraph.interfaces)) {
|
|
607
|
-
const _interface = flattenedSourceGraph.interfaces[interfaceName];
|
|
608
|
-
const interfaceDeclaration: InterfaceDeclaration = sourceGraph.node(interfaceName);
|
|
609
|
-
if (!interfaceDeclaration) {
|
|
610
|
-
continue;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
addTypeParametersToSource(_interface, interfaceDeclaration.directParents, flattenedSourceGraph);
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
for (const className of Object.keys(flattenedSourceGraph.classes)) {
|
|
617
|
-
const _class = flattenedSourceGraph.classes[className];
|
|
618
|
-
const classDeclaration: ClassDeclaration = sourceGraph.node(className);
|
|
619
|
-
if (!classDeclaration) {
|
|
620
|
-
continue;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
addTypeParametersToSource(_class, classDeclaration.directParentClasses, flattenedSourceGraph);
|
|
624
|
-
addTypeParametersToSource(_class, classDeclaration.directParentInterfaces, flattenedSourceGraph);
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
for (const variableName of Object.keys(flattenedSourceGraph.variables)) {
|
|
628
|
-
const variable = flattenedSourceGraph.variables[variableName];
|
|
629
|
-
const variableDeclaration: VariableDeclaration = sourceGraph.node(variableName);
|
|
630
|
-
if (!variableDeclaration) {
|
|
631
|
-
continue;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
if (!variableDeclaration.type) {
|
|
635
|
-
continue;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
if (!variableDeclaration.type.directParents) {
|
|
639
|
-
continue;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
addTypeParametersToSource(variable, variableDeclaration.type.directParents, flattenedSourceGraph);
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
function addTypeParametersToSource(
|
|
647
|
-
source: Class | Interface | Variable | TypeAlias,
|
|
648
|
-
parentDeclarations: (ClassDeclaration | InterfaceDeclaration | TypeAliasDeclaration)[],
|
|
649
|
-
flattenedSourceGraph: FlattenedSourceGraph
|
|
650
|
-
): void {
|
|
651
|
-
if (!parentDeclarations) {
|
|
652
|
-
return;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
for (const parentDeclaration of parentDeclarations) {
|
|
656
|
-
if (!parentDeclaration.typeParameters) {
|
|
657
|
-
continue;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
for (const typeParameter of parentDeclaration.typeParameters) {
|
|
661
|
-
if (!source.typeParameters[parentDeclaration.qualifiedName]) {
|
|
662
|
-
source.typeParameters[parentDeclaration.qualifiedName] = [];
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
if (flattenedSourceGraph.typeAliases[typeParameter]) {
|
|
666
|
-
source.typeParameters[parentDeclaration.qualifiedName].push(flattenedSourceGraph.typeAliases[typeParameter]);
|
|
667
|
-
} else if (flattenedSourceGraph.interfaces[typeParameter]) {
|
|
668
|
-
source.typeParameters[parentDeclaration.qualifiedName].push(flattenedSourceGraph.interfaces[typeParameter]);
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
function pruneNonLoadables(flattenedSourceGraph: FlattenedSourceGraph): void {
|
|
675
|
-
for (const variableQualifiedName of Object.keys(flattenedSourceGraph.variables)) {
|
|
676
|
-
const variable = flattenedSourceGraph.variables[variableQualifiedName];
|
|
677
|
-
if (!variable.allParentTypes[LOADABLE_QUALIFIED_NAME]) {
|
|
678
|
-
delete flattenedSourceGraph.variables[variableQualifiedName];
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
for (const qualifiedName of Object.keys(flattenedSourceGraph.typeAliases)) {
|
|
683
|
-
const typeAlias = flattenedSourceGraph.typeAliases[qualifiedName];
|
|
684
|
-
if (!typeAlias.allParents[LOADABLE_QUALIFIED_NAME]) {
|
|
685
|
-
delete flattenedSourceGraph.typeAliases[qualifiedName];
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
for (const qualifiedName of Object.keys(flattenedSourceGraph.classes)) {
|
|
690
|
-
const _class = flattenedSourceGraph.classes[qualifiedName];
|
|
691
|
-
if (!_class.allParents[LOADABLE_QUALIFIED_NAME]) {
|
|
692
|
-
delete flattenedSourceGraph.classes[qualifiedName];
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
for (const qualifiedName of Object.keys(flattenedSourceGraph.interfaces)) {
|
|
697
|
-
const _interface = flattenedSourceGraph.interfaces[qualifiedName];
|
|
698
|
-
if (!_interface.allParents[LOADABLE_QUALIFIED_NAME] && qualifiedName != LOADABLE_QUALIFIED_NAME) {
|
|
699
|
-
delete flattenedSourceGraph.interfaces[qualifiedName];
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
}
|