@proteinjs/reflection-build 1.2.1 → 1.3.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/CHANGELOG.md +11 -0
- package/{test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/LICENSE → LICENSE} +5 -6
- package/dist/src/build.js +30 -15
- package/dist/src/build.js.map +1 -1
- package/dist/src/codegen/writeGeneratedIndex.d.ts +7 -1
- package/dist/src/codegen/writeGeneratedIndex.js +13 -5
- package/dist/src/codegen/writeGeneratedIndex.js.map +1 -1
- package/dist/src/parser/createSourceGraph.d.ts +1 -1
- package/dist/src/parser/createSourceGraph.js +36 -22
- package/dist/src/parser/createSourceGraph.js.map +1 -1
- 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 +4 -3
- package/src/build.ts +45 -14
- package/src/codegen/writeGeneratedIndex.ts +23 -4
- package/src/parser/createSourceGraph.ts +21 -12
- package/test/examples/source-repository/a/dist/build.js +30 -15
- package/test/examples/source-repository/a/dist/build.js.map +1 -1
- package/test/examples/source-repository/a/dist/codegen/writeGeneratedIndex.d.ts +7 -1
- package/test/examples/source-repository/a/dist/codegen/writeGeneratedIndex.js +13 -5
- package/test/examples/source-repository/a/dist/codegen/writeGeneratedIndex.js.map +1 -1
- 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/dist/parser/createSourceGraph.d.ts +1 -1
- package/test/examples/source-repository/a/dist/parser/createSourceGraph.js +36 -22
- package/test/examples/source-repository/a/dist/parser/createSourceGraph.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 +0 -53
- package/test/examples/source-repository/a/package.json +1 -1
- package/test/examples/source-repository/b/dist/build.js +30 -15
- package/test/examples/source-repository/b/dist/build.js.map +1 -1
- package/test/examples/source-repository/b/dist/codegen/writeGeneratedIndex.d.ts +7 -1
- package/test/examples/source-repository/b/dist/codegen/writeGeneratedIndex.js +13 -5
- package/test/examples/source-repository/b/dist/codegen/writeGeneratedIndex.js.map +1 -1
- 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/dist/parser/createSourceGraph.d.ts +1 -1
- package/test/examples/source-repository/b/dist/parser/createSourceGraph.js +36 -22
- package/test/examples/source-repository/b/dist/parser/createSourceGraph.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 +0 -53
- package/test/examples/source-repository/b/package.json +1 -1
- 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 -75
- 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 -188
- package/test/examples/source-repository/a/node_modules/glob-watcher/node_modules/fsevents/build/gyp-mac-tool +0 -772
- 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 -75
- 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 -188
- package/test/examples/source-repository/b/node_modules/glob-watcher/node_modules/fsevents/build/gyp-mac-tool +0 -772
- 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,356 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* NAN - Native Abstractions for Node.js
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2018 NAN contributors
|
|
5
|
-
*
|
|
6
|
-
* MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
|
|
7
|
-
********************************************************************/
|
|
8
|
-
|
|
9
|
-
#ifndef NAN_MAYBE_43_INL_H_
|
|
10
|
-
#define NAN_MAYBE_43_INL_H_
|
|
11
|
-
|
|
12
|
-
template<typename T>
|
|
13
|
-
using MaybeLocal = v8::MaybeLocal<T>;
|
|
14
|
-
|
|
15
|
-
inline
|
|
16
|
-
MaybeLocal<v8::String> ToDetailString(v8::Local<v8::Value> val) {
|
|
17
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
18
|
-
v8::EscapableHandleScope scope(isolate);
|
|
19
|
-
return scope.Escape(val->ToDetailString(isolate->GetCurrentContext())
|
|
20
|
-
.FromMaybe(v8::Local<v8::String>()));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
inline
|
|
24
|
-
MaybeLocal<v8::Uint32> ToArrayIndex(v8::Local<v8::Value> val) {
|
|
25
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
26
|
-
v8::EscapableHandleScope scope(isolate);
|
|
27
|
-
return scope.Escape(val->ToArrayIndex(isolate->GetCurrentContext())
|
|
28
|
-
.FromMaybe(v8::Local<v8::Uint32>()));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
inline
|
|
32
|
-
Maybe<bool> Equals(v8::Local<v8::Value> a, v8::Local<v8::Value>(b)) {
|
|
33
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
34
|
-
v8::HandleScope scope(isolate);
|
|
35
|
-
return a->Equals(isolate->GetCurrentContext(), b);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
inline
|
|
39
|
-
MaybeLocal<v8::Object> NewInstance(v8::Local<v8::Function> h) {
|
|
40
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
41
|
-
v8::EscapableHandleScope scope(isolate);
|
|
42
|
-
return scope.Escape(h->NewInstance(isolate->GetCurrentContext())
|
|
43
|
-
.FromMaybe(v8::Local<v8::Object>()));
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
inline
|
|
47
|
-
MaybeLocal<v8::Object> NewInstance(
|
|
48
|
-
v8::Local<v8::Function> h
|
|
49
|
-
, int argc
|
|
50
|
-
, v8::Local<v8::Value> argv[]) {
|
|
51
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
52
|
-
v8::EscapableHandleScope scope(isolate);
|
|
53
|
-
return scope.Escape(h->NewInstance(isolate->GetCurrentContext(), argc, argv)
|
|
54
|
-
.FromMaybe(v8::Local<v8::Object>()));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
inline
|
|
58
|
-
MaybeLocal<v8::Object> NewInstance(v8::Local<v8::ObjectTemplate> h) {
|
|
59
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
60
|
-
v8::EscapableHandleScope scope(isolate);
|
|
61
|
-
return scope.Escape(h->NewInstance(isolate->GetCurrentContext())
|
|
62
|
-
.FromMaybe(v8::Local<v8::Object>()));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
inline MaybeLocal<v8::Function> GetFunction(
|
|
67
|
-
v8::Local<v8::FunctionTemplate> t) {
|
|
68
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
69
|
-
v8::EscapableHandleScope scope(isolate);
|
|
70
|
-
return scope.Escape(t->GetFunction(isolate->GetCurrentContext())
|
|
71
|
-
.FromMaybe(v8::Local<v8::Function>()));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
inline Maybe<bool> Set(
|
|
75
|
-
v8::Local<v8::Object> obj
|
|
76
|
-
, v8::Local<v8::Value> key
|
|
77
|
-
, v8::Local<v8::Value> value) {
|
|
78
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
79
|
-
v8::HandleScope scope(isolate);
|
|
80
|
-
return obj->Set(isolate->GetCurrentContext(), key, value);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
inline Maybe<bool> Set(
|
|
84
|
-
v8::Local<v8::Object> obj
|
|
85
|
-
, uint32_t index
|
|
86
|
-
, v8::Local<v8::Value> value) {
|
|
87
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
88
|
-
v8::HandleScope scope(isolate);
|
|
89
|
-
return obj->Set(isolate->GetCurrentContext(), index, value);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
#if NODE_MODULE_VERSION < NODE_4_0_MODULE_VERSION
|
|
93
|
-
#include "nan_define_own_property_helper.h" // NOLINT(build/include)
|
|
94
|
-
#endif
|
|
95
|
-
|
|
96
|
-
inline Maybe<bool> DefineOwnProperty(
|
|
97
|
-
v8::Local<v8::Object> obj
|
|
98
|
-
, v8::Local<v8::String> key
|
|
99
|
-
, v8::Local<v8::Value> value
|
|
100
|
-
, v8::PropertyAttribute attribs = v8::None) {
|
|
101
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
102
|
-
v8::HandleScope scope(isolate);
|
|
103
|
-
#if NODE_MODULE_VERSION >= NODE_4_0_MODULE_VERSION
|
|
104
|
-
return obj->DefineOwnProperty(isolate->GetCurrentContext(), key, value,
|
|
105
|
-
attribs);
|
|
106
|
-
#else
|
|
107
|
-
Maybe<v8::PropertyAttribute> maybeCurrent =
|
|
108
|
-
obj->GetPropertyAttributes(isolate->GetCurrentContext(), key);
|
|
109
|
-
if (maybeCurrent.IsNothing()) {
|
|
110
|
-
return Nothing<bool>();
|
|
111
|
-
}
|
|
112
|
-
v8::PropertyAttribute current = maybeCurrent.FromJust();
|
|
113
|
-
return imp::DefineOwnPropertyHelper(current, obj, key, value, attribs);
|
|
114
|
-
#endif
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
NAN_DEPRECATED inline Maybe<bool> ForceSet(
|
|
118
|
-
v8::Local<v8::Object> obj
|
|
119
|
-
, v8::Local<v8::Value> key
|
|
120
|
-
, v8::Local<v8::Value> value
|
|
121
|
-
, v8::PropertyAttribute attribs = v8::None) {
|
|
122
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
123
|
-
v8::HandleScope scope(isolate);
|
|
124
|
-
#if NODE_MODULE_VERSION >= NODE_9_0_MODULE_VERSION
|
|
125
|
-
return key->IsName()
|
|
126
|
-
? obj->DefineOwnProperty(isolate->GetCurrentContext(),
|
|
127
|
-
key.As<v8::Name>(), value, attribs)
|
|
128
|
-
: Nothing<bool>();
|
|
129
|
-
#else
|
|
130
|
-
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
|
|
131
|
-
#endif
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
inline MaybeLocal<v8::Value> Get(
|
|
135
|
-
v8::Local<v8::Object> obj
|
|
136
|
-
, v8::Local<v8::Value> key) {
|
|
137
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
138
|
-
v8::EscapableHandleScope scope(isolate);
|
|
139
|
-
return scope.Escape(obj->Get(isolate->GetCurrentContext(), key)
|
|
140
|
-
.FromMaybe(v8::Local<v8::Value>()));
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
inline
|
|
144
|
-
MaybeLocal<v8::Value> Get(v8::Local<v8::Object> obj, uint32_t index) {
|
|
145
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
146
|
-
v8::EscapableHandleScope scope(isolate);
|
|
147
|
-
return scope.Escape(obj->Get(isolate->GetCurrentContext(), index)
|
|
148
|
-
.FromMaybe(v8::Local<v8::Value>()));
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
inline v8::PropertyAttribute GetPropertyAttributes(
|
|
152
|
-
v8::Local<v8::Object> obj
|
|
153
|
-
, v8::Local<v8::Value> key) {
|
|
154
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
155
|
-
v8::HandleScope scope(isolate);
|
|
156
|
-
return obj->GetPropertyAttributes(isolate->GetCurrentContext(), key)
|
|
157
|
-
.FromJust();
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
inline Maybe<bool> Has(
|
|
161
|
-
v8::Local<v8::Object> obj
|
|
162
|
-
, v8::Local<v8::String> key) {
|
|
163
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
164
|
-
v8::HandleScope scope(isolate);
|
|
165
|
-
return obj->Has(isolate->GetCurrentContext(), key);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
inline Maybe<bool> Has(v8::Local<v8::Object> obj, uint32_t index) {
|
|
169
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
170
|
-
v8::HandleScope scope(isolate);
|
|
171
|
-
return obj->Has(isolate->GetCurrentContext(), index);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
inline Maybe<bool> Delete(
|
|
175
|
-
v8::Local<v8::Object> obj
|
|
176
|
-
, v8::Local<v8::String> key) {
|
|
177
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
178
|
-
v8::HandleScope scope(isolate);
|
|
179
|
-
return obj->Delete(isolate->GetCurrentContext(), key);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
inline
|
|
183
|
-
Maybe<bool> Delete(v8::Local<v8::Object> obj, uint32_t index) {
|
|
184
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
185
|
-
v8::HandleScope scope(isolate);
|
|
186
|
-
return obj->Delete(isolate->GetCurrentContext(), index);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
inline
|
|
190
|
-
MaybeLocal<v8::Array> GetPropertyNames(v8::Local<v8::Object> obj) {
|
|
191
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
192
|
-
v8::EscapableHandleScope scope(isolate);
|
|
193
|
-
return scope.Escape(obj->GetPropertyNames(isolate->GetCurrentContext())
|
|
194
|
-
.FromMaybe(v8::Local<v8::Array>()));
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
inline
|
|
198
|
-
MaybeLocal<v8::Array> GetOwnPropertyNames(v8::Local<v8::Object> obj) {
|
|
199
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
200
|
-
v8::EscapableHandleScope scope(isolate);
|
|
201
|
-
return scope.Escape(obj->GetOwnPropertyNames(isolate->GetCurrentContext())
|
|
202
|
-
.FromMaybe(v8::Local<v8::Array>()));
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
inline Maybe<bool> SetPrototype(
|
|
206
|
-
v8::Local<v8::Object> obj
|
|
207
|
-
, v8::Local<v8::Value> prototype) {
|
|
208
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
209
|
-
v8::HandleScope scope(isolate);
|
|
210
|
-
return obj->SetPrototype(isolate->GetCurrentContext(), prototype);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
inline MaybeLocal<v8::String> ObjectProtoToString(
|
|
214
|
-
v8::Local<v8::Object> obj) {
|
|
215
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
216
|
-
v8::EscapableHandleScope scope(isolate);
|
|
217
|
-
return scope.Escape(obj->ObjectProtoToString(isolate->GetCurrentContext())
|
|
218
|
-
.FromMaybe(v8::Local<v8::String>()));
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
inline Maybe<bool> HasOwnProperty(
|
|
222
|
-
v8::Local<v8::Object> obj
|
|
223
|
-
, v8::Local<v8::String> key) {
|
|
224
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
225
|
-
v8::HandleScope scope(isolate);
|
|
226
|
-
return obj->HasOwnProperty(isolate->GetCurrentContext(), key);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
inline Maybe<bool> HasRealNamedProperty(
|
|
230
|
-
v8::Local<v8::Object> obj
|
|
231
|
-
, v8::Local<v8::String> key) {
|
|
232
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
233
|
-
v8::HandleScope scope(isolate);
|
|
234
|
-
return obj->HasRealNamedProperty(isolate->GetCurrentContext(), key);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
inline Maybe<bool> HasRealIndexedProperty(
|
|
238
|
-
v8::Local<v8::Object> obj
|
|
239
|
-
, uint32_t index) {
|
|
240
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
241
|
-
v8::HandleScope scope(isolate);
|
|
242
|
-
return obj->HasRealIndexedProperty(isolate->GetCurrentContext(), index);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
inline Maybe<bool> HasRealNamedCallbackProperty(
|
|
246
|
-
v8::Local<v8::Object> obj
|
|
247
|
-
, v8::Local<v8::String> key) {
|
|
248
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
249
|
-
v8::HandleScope scope(isolate);
|
|
250
|
-
return obj->HasRealNamedCallbackProperty(isolate->GetCurrentContext(), key);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
inline MaybeLocal<v8::Value> GetRealNamedPropertyInPrototypeChain(
|
|
254
|
-
v8::Local<v8::Object> obj
|
|
255
|
-
, v8::Local<v8::String> key) {
|
|
256
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
257
|
-
v8::EscapableHandleScope scope(isolate);
|
|
258
|
-
return scope.Escape(obj->GetRealNamedPropertyInPrototypeChain(
|
|
259
|
-
isolate->GetCurrentContext(), key)
|
|
260
|
-
.FromMaybe(v8::Local<v8::Value>()));
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
inline MaybeLocal<v8::Value> GetRealNamedProperty(
|
|
264
|
-
v8::Local<v8::Object> obj
|
|
265
|
-
, v8::Local<v8::String> key) {
|
|
266
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
267
|
-
v8::EscapableHandleScope scope(isolate);
|
|
268
|
-
return scope.Escape(
|
|
269
|
-
obj->GetRealNamedProperty(isolate->GetCurrentContext(), key)
|
|
270
|
-
.FromMaybe(v8::Local<v8::Value>()));
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
inline MaybeLocal<v8::Value> CallAsFunction(
|
|
274
|
-
v8::Local<v8::Object> obj
|
|
275
|
-
, v8::Local<v8::Object> recv
|
|
276
|
-
, int argc
|
|
277
|
-
, v8::Local<v8::Value> argv[]) {
|
|
278
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
279
|
-
v8::EscapableHandleScope scope(isolate);
|
|
280
|
-
return scope.Escape(
|
|
281
|
-
obj->CallAsFunction(isolate->GetCurrentContext(), recv, argc, argv)
|
|
282
|
-
.FromMaybe(v8::Local<v8::Value>()));
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
inline MaybeLocal<v8::Value> CallAsConstructor(
|
|
286
|
-
v8::Local<v8::Object> obj
|
|
287
|
-
, int argc, v8::Local<v8::Value> argv[]) {
|
|
288
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
289
|
-
v8::EscapableHandleScope scope(isolate);
|
|
290
|
-
return scope.Escape(
|
|
291
|
-
obj->CallAsConstructor(isolate->GetCurrentContext(), argc, argv)
|
|
292
|
-
.FromMaybe(v8::Local<v8::Value>()));
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
inline
|
|
296
|
-
MaybeLocal<v8::String> GetSourceLine(v8::Local<v8::Message> msg) {
|
|
297
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
298
|
-
v8::EscapableHandleScope scope(isolate);
|
|
299
|
-
return scope.Escape(msg->GetSourceLine(isolate->GetCurrentContext())
|
|
300
|
-
.FromMaybe(v8::Local<v8::String>()));
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
inline Maybe<int> GetLineNumber(v8::Local<v8::Message> msg) {
|
|
304
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
305
|
-
v8::HandleScope scope(isolate);
|
|
306
|
-
return msg->GetLineNumber(isolate->GetCurrentContext());
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
inline Maybe<int> GetStartColumn(v8::Local<v8::Message> msg) {
|
|
310
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
311
|
-
v8::HandleScope scope(isolate);
|
|
312
|
-
return msg->GetStartColumn(isolate->GetCurrentContext());
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
inline Maybe<int> GetEndColumn(v8::Local<v8::Message> msg) {
|
|
316
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
317
|
-
v8::HandleScope scope(isolate);
|
|
318
|
-
return msg->GetEndColumn(isolate->GetCurrentContext());
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
inline MaybeLocal<v8::Object> CloneElementAt(
|
|
322
|
-
v8::Local<v8::Array> array
|
|
323
|
-
, uint32_t index) {
|
|
324
|
-
#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION)
|
|
325
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
326
|
-
v8::EscapableHandleScope scope(isolate);
|
|
327
|
-
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
|
328
|
-
v8::Local<v8::Value> elem;
|
|
329
|
-
v8::Local<v8::Object> obj;
|
|
330
|
-
if (!array->Get(context, index).ToLocal(&elem)) {
|
|
331
|
-
return scope.Escape(obj);
|
|
332
|
-
}
|
|
333
|
-
if (!elem->ToObject(context).ToLocal(&obj)) {
|
|
334
|
-
return scope.Escape(v8::Local<v8::Object>());
|
|
335
|
-
}
|
|
336
|
-
return scope.Escape(obj->Clone());
|
|
337
|
-
#else
|
|
338
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
339
|
-
v8::EscapableHandleScope scope(isolate);
|
|
340
|
-
return scope.Escape(array->CloneElementAt(isolate->GetCurrentContext(), index)
|
|
341
|
-
.FromMaybe(v8::Local<v8::Object>()));
|
|
342
|
-
#endif
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
inline MaybeLocal<v8::Value> Call(
|
|
346
|
-
v8::Local<v8::Function> fun
|
|
347
|
-
, v8::Local<v8::Object> recv
|
|
348
|
-
, int argc
|
|
349
|
-
, v8::Local<v8::Value> argv[]) {
|
|
350
|
-
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
351
|
-
v8::EscapableHandleScope scope(isolate);
|
|
352
|
-
return scope.Escape(fun->Call(isolate->GetCurrentContext(), recv, argc, argv)
|
|
353
|
-
.FromMaybe(v8::Local<v8::Value>()));
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
#endif // NAN_MAYBE_43_INL_H_
|
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* NAN - Native Abstractions for Node.js
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2018 NAN contributors
|
|
5
|
-
*
|
|
6
|
-
* MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
|
|
7
|
-
********************************************************************/
|
|
8
|
-
|
|
9
|
-
#ifndef NAN_MAYBE_PRE_43_INL_H_
|
|
10
|
-
#define NAN_MAYBE_PRE_43_INL_H_
|
|
11
|
-
|
|
12
|
-
template<typename T>
|
|
13
|
-
class MaybeLocal {
|
|
14
|
-
public:
|
|
15
|
-
inline MaybeLocal() : val_(v8::Local<T>()) {}
|
|
16
|
-
|
|
17
|
-
template<typename S>
|
|
18
|
-
# if NODE_MODULE_VERSION >= NODE_0_12_MODULE_VERSION
|
|
19
|
-
inline
|
|
20
|
-
MaybeLocal(v8::Local<S> that) : val_(that) {} // NOLINT(runtime/explicit)
|
|
21
|
-
# else
|
|
22
|
-
inline
|
|
23
|
-
MaybeLocal(v8::Local<S> that) : // NOLINT(runtime/explicit)
|
|
24
|
-
val_(*reinterpret_cast<v8::Local<T>*>(&that)) {}
|
|
25
|
-
# endif
|
|
26
|
-
|
|
27
|
-
inline bool IsEmpty() const { return val_.IsEmpty(); }
|
|
28
|
-
|
|
29
|
-
template<typename S>
|
|
30
|
-
inline bool ToLocal(v8::Local<S> *out) const {
|
|
31
|
-
*out = val_;
|
|
32
|
-
return !IsEmpty();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
inline v8::Local<T> ToLocalChecked() const {
|
|
36
|
-
#if defined(V8_ENABLE_CHECKS)
|
|
37
|
-
assert(!IsEmpty() && "ToLocalChecked is Empty");
|
|
38
|
-
#endif // V8_ENABLE_CHECKS
|
|
39
|
-
return val_;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
template<typename S>
|
|
43
|
-
inline v8::Local<S> FromMaybe(v8::Local<S> default_value) const {
|
|
44
|
-
return IsEmpty() ? default_value : v8::Local<S>(val_);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
private:
|
|
48
|
-
v8::Local<T> val_;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
inline
|
|
52
|
-
MaybeLocal<v8::String> ToDetailString(v8::Handle<v8::Value> val) {
|
|
53
|
-
return MaybeLocal<v8::String>(val->ToDetailString());
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
inline
|
|
57
|
-
MaybeLocal<v8::Uint32> ToArrayIndex(v8::Handle<v8::Value> val) {
|
|
58
|
-
return MaybeLocal<v8::Uint32>(val->ToArrayIndex());
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
inline
|
|
62
|
-
Maybe<bool> Equals(v8::Handle<v8::Value> a, v8::Handle<v8::Value>(b)) {
|
|
63
|
-
return Just<bool>(a->Equals(b));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
inline
|
|
67
|
-
MaybeLocal<v8::Object> NewInstance(v8::Handle<v8::Function> h) {
|
|
68
|
-
return MaybeLocal<v8::Object>(h->NewInstance());
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
inline
|
|
72
|
-
MaybeLocal<v8::Object> NewInstance(
|
|
73
|
-
v8::Local<v8::Function> h
|
|
74
|
-
, int argc
|
|
75
|
-
, v8::Local<v8::Value> argv[]) {
|
|
76
|
-
return MaybeLocal<v8::Object>(h->NewInstance(argc, argv));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
inline
|
|
80
|
-
MaybeLocal<v8::Object> NewInstance(v8::Handle<v8::ObjectTemplate> h) {
|
|
81
|
-
return MaybeLocal<v8::Object>(h->NewInstance());
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
inline
|
|
85
|
-
MaybeLocal<v8::Function> GetFunction(v8::Handle<v8::FunctionTemplate> t) {
|
|
86
|
-
return MaybeLocal<v8::Function>(t->GetFunction());
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
inline Maybe<bool> Set(
|
|
90
|
-
v8::Handle<v8::Object> obj
|
|
91
|
-
, v8::Handle<v8::Value> key
|
|
92
|
-
, v8::Handle<v8::Value> value) {
|
|
93
|
-
return Just<bool>(obj->Set(key, value));
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
inline Maybe<bool> Set(
|
|
97
|
-
v8::Handle<v8::Object> obj
|
|
98
|
-
, uint32_t index
|
|
99
|
-
, v8::Handle<v8::Value> value) {
|
|
100
|
-
return Just<bool>(obj->Set(index, value));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
#include "nan_define_own_property_helper.h" // NOLINT(build/include)
|
|
104
|
-
|
|
105
|
-
inline Maybe<bool> DefineOwnProperty(
|
|
106
|
-
v8::Handle<v8::Object> obj
|
|
107
|
-
, v8::Handle<v8::String> key
|
|
108
|
-
, v8::Handle<v8::Value> value
|
|
109
|
-
, v8::PropertyAttribute attribs = v8::None) {
|
|
110
|
-
v8::PropertyAttribute current = obj->GetPropertyAttributes(key);
|
|
111
|
-
return imp::DefineOwnPropertyHelper(current, obj, key, value, attribs);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
NAN_DEPRECATED inline Maybe<bool> ForceSet(
|
|
115
|
-
v8::Handle<v8::Object> obj
|
|
116
|
-
, v8::Handle<v8::Value> key
|
|
117
|
-
, v8::Handle<v8::Value> value
|
|
118
|
-
, v8::PropertyAttribute attribs = v8::None) {
|
|
119
|
-
return Just<bool>(obj->ForceSet(key, value, attribs));
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
inline MaybeLocal<v8::Value> Get(
|
|
123
|
-
v8::Handle<v8::Object> obj
|
|
124
|
-
, v8::Handle<v8::Value> key) {
|
|
125
|
-
return MaybeLocal<v8::Value>(obj->Get(key));
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
inline MaybeLocal<v8::Value> Get(
|
|
129
|
-
v8::Handle<v8::Object> obj
|
|
130
|
-
, uint32_t index) {
|
|
131
|
-
return MaybeLocal<v8::Value>(obj->Get(index));
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
inline Maybe<v8::PropertyAttribute> GetPropertyAttributes(
|
|
135
|
-
v8::Handle<v8::Object> obj
|
|
136
|
-
, v8::Handle<v8::Value> key) {
|
|
137
|
-
return Just<v8::PropertyAttribute>(obj->GetPropertyAttributes(key));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
inline Maybe<bool> Has(
|
|
141
|
-
v8::Handle<v8::Object> obj
|
|
142
|
-
, v8::Handle<v8::String> key) {
|
|
143
|
-
return Just<bool>(obj->Has(key));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
inline Maybe<bool> Has(
|
|
147
|
-
v8::Handle<v8::Object> obj
|
|
148
|
-
, uint32_t index) {
|
|
149
|
-
return Just<bool>(obj->Has(index));
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
inline Maybe<bool> Delete(
|
|
153
|
-
v8::Handle<v8::Object> obj
|
|
154
|
-
, v8::Handle<v8::String> key) {
|
|
155
|
-
return Just<bool>(obj->Delete(key));
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
inline Maybe<bool> Delete(
|
|
159
|
-
v8::Handle<v8::Object> obj
|
|
160
|
-
, uint32_t index) {
|
|
161
|
-
return Just<bool>(obj->Delete(index));
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
inline
|
|
165
|
-
MaybeLocal<v8::Array> GetPropertyNames(v8::Handle<v8::Object> obj) {
|
|
166
|
-
return MaybeLocal<v8::Array>(obj->GetPropertyNames());
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
inline
|
|
170
|
-
MaybeLocal<v8::Array> GetOwnPropertyNames(v8::Handle<v8::Object> obj) {
|
|
171
|
-
return MaybeLocal<v8::Array>(obj->GetOwnPropertyNames());
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
inline Maybe<bool> SetPrototype(
|
|
175
|
-
v8::Handle<v8::Object> obj
|
|
176
|
-
, v8::Handle<v8::Value> prototype) {
|
|
177
|
-
return Just<bool>(obj->SetPrototype(prototype));
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
inline MaybeLocal<v8::String> ObjectProtoToString(
|
|
181
|
-
v8::Handle<v8::Object> obj) {
|
|
182
|
-
return MaybeLocal<v8::String>(obj->ObjectProtoToString());
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
inline Maybe<bool> HasOwnProperty(
|
|
186
|
-
v8::Handle<v8::Object> obj
|
|
187
|
-
, v8::Handle<v8::String> key) {
|
|
188
|
-
return Just<bool>(obj->HasOwnProperty(key));
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
inline Maybe<bool> HasRealNamedProperty(
|
|
192
|
-
v8::Handle<v8::Object> obj
|
|
193
|
-
, v8::Handle<v8::String> key) {
|
|
194
|
-
return Just<bool>(obj->HasRealNamedProperty(key));
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
inline Maybe<bool> HasRealIndexedProperty(
|
|
198
|
-
v8::Handle<v8::Object> obj
|
|
199
|
-
, uint32_t index) {
|
|
200
|
-
return Just<bool>(obj->HasRealIndexedProperty(index));
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
inline Maybe<bool> HasRealNamedCallbackProperty(
|
|
204
|
-
v8::Handle<v8::Object> obj
|
|
205
|
-
, v8::Handle<v8::String> key) {
|
|
206
|
-
return Just<bool>(obj->HasRealNamedCallbackProperty(key));
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
inline MaybeLocal<v8::Value> GetRealNamedPropertyInPrototypeChain(
|
|
210
|
-
v8::Handle<v8::Object> obj
|
|
211
|
-
, v8::Handle<v8::String> key) {
|
|
212
|
-
return MaybeLocal<v8::Value>(
|
|
213
|
-
obj->GetRealNamedPropertyInPrototypeChain(key));
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
inline MaybeLocal<v8::Value> GetRealNamedProperty(
|
|
217
|
-
v8::Handle<v8::Object> obj
|
|
218
|
-
, v8::Handle<v8::String> key) {
|
|
219
|
-
return MaybeLocal<v8::Value>(obj->GetRealNamedProperty(key));
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
inline MaybeLocal<v8::Value> CallAsFunction(
|
|
223
|
-
v8::Handle<v8::Object> obj
|
|
224
|
-
, v8::Handle<v8::Object> recv
|
|
225
|
-
, int argc
|
|
226
|
-
, v8::Handle<v8::Value> argv[]) {
|
|
227
|
-
return MaybeLocal<v8::Value>(obj->CallAsFunction(recv, argc, argv));
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
inline MaybeLocal<v8::Value> CallAsConstructor(
|
|
231
|
-
v8::Handle<v8::Object> obj
|
|
232
|
-
, int argc
|
|
233
|
-
, v8::Local<v8::Value> argv[]) {
|
|
234
|
-
return MaybeLocal<v8::Value>(obj->CallAsConstructor(argc, argv));
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
inline
|
|
238
|
-
MaybeLocal<v8::String> GetSourceLine(v8::Handle<v8::Message> msg) {
|
|
239
|
-
return MaybeLocal<v8::String>(msg->GetSourceLine());
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
inline Maybe<int> GetLineNumber(v8::Handle<v8::Message> msg) {
|
|
243
|
-
return Just<int>(msg->GetLineNumber());
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
inline Maybe<int> GetStartColumn(v8::Handle<v8::Message> msg) {
|
|
247
|
-
return Just<int>(msg->GetStartColumn());
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
inline Maybe<int> GetEndColumn(v8::Handle<v8::Message> msg) {
|
|
251
|
-
return Just<int>(msg->GetEndColumn());
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
inline MaybeLocal<v8::Object> CloneElementAt(
|
|
255
|
-
v8::Handle<v8::Array> array
|
|
256
|
-
, uint32_t index) {
|
|
257
|
-
return MaybeLocal<v8::Object>(array->CloneElementAt(index));
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
inline MaybeLocal<v8::Value> Call(
|
|
261
|
-
v8::Local<v8::Function> fun
|
|
262
|
-
, v8::Local<v8::Object> recv
|
|
263
|
-
, int argc
|
|
264
|
-
, v8::Local<v8::Value> argv[]) {
|
|
265
|
-
return MaybeLocal<v8::Value>(fun->Call(recv, argc, argv));
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
#endif // NAN_MAYBE_PRE_43_INL_H_
|