realm
Version:
Realm is a mobile database: an alternative to SQLite and key-value stores
320 lines (319 loc) • 9.38 kB
JSON
{
"name": "realm",
"version": "12.2.0",
"description": "Realm is a mobile database: an alternative to SQLite and key-value stores",
"license": "apache-2.0",
"homepage": "https://realm.io",
"keywords": [
"database",
"db",
"react",
"react-native",
"persistence",
"localstorage",
"sqlite",
"asyncstorage",
"rocksdb",
"leveldb",
"realm"
],
"author": {
"name": "Realm",
"email": "help@realm.io",
"url": "https://realm.io"
},
"types": "./types.d.cts",
"main": "./index.node.js",
"react-native": "./index.react-native.js",
"exports": {
".": {
"types": "./types.d.cts",
"node": "./index.node.js",
"require": "./index.node.js",
"react-native": "./index.react-native.js"
},
"./scripts/submit-analytics": "./scripts/submit-analytics.mjs",
"./react-native.config.js": "./react-native.config.js",
"./package.json": "./package.json",
"./realm-constants.json": "./realm-constants.json"
},
"files": [
"dependencies.list",
"dist",
"index.node.js",
"index.react-native.js",
"types.d.cts",
"react-native/android",
"react-native/ios/realm-js-ios.xcframework",
"react-native/ios/realm-js-ios.xcframework/**/*.a",
"react-native/ios/RealmReact",
"scripts/submit-analytics.mjs",
"react-native.config.js",
"RealmJS.podspec"
],
"scripts": {
"test": "wireit",
"test:types": "tsc --project type-tests/tsconfig.json",
"lint": "eslint --ext .js,.mjs,.ts .",
"build": "echo 'Run bundle, build:node, build:ios or build:android or other scripts depending on these instead' && exit 1",
"bundle": "wireit",
"bundle:coverage": "ENABLE_TEST_COVERAGE_INSTRUMENTATION=true npm run bundle",
"bindgen:configure": "wireit",
"bindgen:build:node": "wireit",
"bindgen:generate:typescript": "wireit",
"bindgen:generate:wrappers": "wireit",
"bindgen:generate:spec-schema": "wireit",
"build:node": "wireit",
"build:node:prebuild": "wireit",
"build:node:prebuild:arm": "wireit",
"build:node:prebuild:arm64": "wireit",
"build:node:prebuild:x64": "wireit",
"build:node:prebuild:ia32": "wireit",
"build:android": "wireit",
"build:ios": "wireit",
"build:ios:debug:simulator": "wireit",
"build:ios:debug:ios": "wireit",
"build:ios:debug:catalyst": "wireit",
"install": "prebuild-install --runtime napi || echo 'Failed to download prebuild for Realm'",
"docs": "wireit",
"postinstall": "node ./scripts/submit-analytics.mjs"
},
"wireit": {
"test": {
"command": "mocha --exit",
"dependencies": [
"build:node",
"bindgen:generate:typescript",
"bindgen:generate:wrappers",
"../realm-network-transport:bundle"
]
},
"bundle": {
"command": "rollup --config",
"env": {
"ENABLE_TEST_COVERAGE_INSTRUMENTATION": {
"external": true
}
},
"dependencies": [
"../realm-network-transport:bundle",
"bindgen:generate:typescript",
"bindgen:generate:wrappers"
],
"files": [
"rollup.config.mjs",
"src/**/*.ts",
"tsconfig.json",
"src/**/tsconfig.json"
],
"output": [
"dist"
]
},
"bindgen:configure": {
"command": "cmake-js configure --debug --directory bindgen"
},
"bindgen:build:node": {
"command": "cmake --build bindgen/build --target realm-js-node",
"dependencies": [
"bindgen:configure"
]
},
"bindgen:generate:typescript": {
"command": "realm-bindgen --template bindgen/src/templates/typescript.ts --spec bindgen/vendor/realm-core/bindgen/spec.yml --spec bindgen/js_spec.yml --opt-in bindgen/js_opt_in_spec.yml --output ./generated/ts",
"dependencies": [
"bindgen:generate:spec-schema"
],
"files": [
"bindgen/vendor/realm-core/bindgen/spec.yml",
"bindgen/vendor/realm-core/bindgen/src",
"bindgen/js_spec.yml",
"bindgen/js_opt_in_spec.yml",
"bindgen/src",
"!bindgen/src/templates",
"bindgen/src/templates/typescript.ts"
],
"output": [
"generated/ts/core.ts",
"generated/ts/native.d.mts"
]
},
"bindgen:generate:wrappers": {
"command": "realm-bindgen --template bindgen/src/templates/node-wrapper.ts --spec bindgen/vendor/realm-core/bindgen/spec.yml --spec bindgen/js_spec.yml --opt-in bindgen/js_opt_in_spec.yml --output ./generated/ts",
"dependencies": [
"bindgen:generate:spec-schema"
],
"files": [
"bindgen/vendor/realm-core/bindgen/spec.yml",
"bindgen/vendor/realm-core/bindgen/src",
"bindgen/js_spec.yml",
"bindgen/js_opt_in_spec.yml",
"bindgen/src",
"!bindgen/src/templates",
"bindgen/src/templates/node-wrapper.ts"
],
"output": [
"generated/ts/native-node.mjs",
"generated/ts/native-react-native.mjs"
]
},
"bindgen:generate:spec-schema": {
"command": "typescript-json-schema bindgen/vendor/realm-core/bindgen/tsconfig.json RelaxedSpec --include bindgen/vendor/realm-core/bindgen/src/spec/relaxed-model.ts --out bindgen/vendor/realm-core/bindgen/generated/spec.schema.json --required --noExtraProps",
"files": [
"bindgen/vendor/realm-core/bindgen/src/spec/relaxed-model.ts",
"bindgen/vendor/realm-core/bindgen/tsconfig.json"
],
"output": [
"bindgen/vendor/realm-core/bindgen/generated/spec.schema.json"
]
},
"build:node": {
"dependencies": [
{
"script": "bindgen:build:node",
"cascade": false
}
]
},
"build:node:prebuild": {
"command": "cross-env-shell prebuild --runtime napi --arch $PREBUILD_ARCH -- --directory bindgen",
"env": {
"PREBUILD_ARCH": {
"external": true
}
}
},
"build:node:prebuild:arm": {
"command": "npm run build:node:prebuild",
"env": {
"PREBUILD_ARCH": "arm"
}
},
"build:node:prebuild:arm64": {
"command": "npm run build:node:prebuild",
"env": {
"PREBUILD_ARCH": "arm64"
}
},
"build:node:prebuild:x64": {
"command": "npm run build:node:prebuild",
"env": {
"PREBUILD_ARCH": "x64"
}
},
"build:node:prebuild:ia32": {
"command": "npm run build:node:prebuild",
"env": {
"PREBUILD_ARCH": "ia32"
}
},
"build:android": {
"command": "node ../../scripts/build-android.js",
"files": [
"../../src/android/**",
"bindgen/src/**/*.ts",
"bindgen/vendor/realm-core/bindgen/src/**/*.ts",
"bindgen/vendor/realm-core/bindgen/src/**/*.h",
"bindgen/src/**/*.h"
]
},
"build:ios": {
"command": "../../scripts/build-ios.sh -c ${CONFIGURATION:=Release} ${PLATFORMS}",
"files": [
"../../src/ios/**",
"bindgen/src/**/*.ts",
"bindgen/vendor/realm-core/bindgen/src/**/*.ts",
"bindgen/vendor/realm-core/bindgen/src/**/*.h",
"bindgen/src/**/*.h"
],
"env": {
"PLATFORMS": {
"external": true
},
"CONFIGURATION": {
"external": true
}
}
},
"build:ios:debug:simulator": {
"command": "npm run build:ios",
"env": {
"PLATFORMS": "simulator",
"CONFIGURATION": "Debug"
}
},
"build:ios:debug:ios": {
"command": "npm run build:ios",
"env": {
"PLATFORMS": "ios",
"CONFIGURATION": "Debug"
}
},
"build:ios:debug:catalyst": {
"command": "npm run build:ios",
"env": {
"PLATFORMS": "catalyst",
"CONFIGURATION": "Debug"
}
},
"docs": {
"command": "typedoc",
"dependencies": [
"bundle"
]
}
},
"dependencies": {
"bson": "^4.7.2",
"debug": "^4.3.4",
"node-fetch": "^2.6.9",
"node-machine-id": "^1.1.12",
"prebuild-install": "^7.1.1"
},
"peerDependencies": {
"react-native": ">=0.71.0"
},
"peerDependenciesMeta": {
"react-native": {
"optional": true
}
},
"devDependencies": {
"@realm/bindgen": "^0.1.0",
"@realm/network-transport": "^0.7.2",
"@rollup/plugin-commonjs": "^23.0.2",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-replace": "^5.0.1",
"@rollup/plugin-typescript": "^9.0.2",
"@types/chai": "^4.3.3",
"@types/mocha": "^10.0.0",
"@types/node": "^18.15.10",
"@types/path-browserify": "^1.0.0",
"chai": "4.3.6",
"cmake-js": "6.3.2",
"cross-env": "^7.0.3",
"mocha": "^10.1.0",
"path-browserify": "^1.0.1",
"prebuild": "^11.0.4",
"react-native": "0.71.7",
"rollup-plugin-dts": "^5.0.0",
"rollup-plugin-istanbul": "^4.0.0",
"tsm": "^2.2.2",
"typedoc-plugin-missing-exports": "^2.0.1"
},
"repository": {
"type": "git",
"url": "https://github.com/realm/realm-js.git",
"directory": "packages/realm"
},
"binary": {
"module_name": "realm",
"module_path": "generated/ts",
"host": "https://static.realm.io",
"remote_path": "realm-js-prebuilds/{version}",
"napi_versions": [
6
]
}
}