realm
Version:
Realm by MongoDB is an offline-first mobile database: an alternative to SQLite and key-value stores
381 lines (380 loc) • 11.3 kB
JSON
{
"name": "realm",
"version": "12.6.1",
"description": "Realm by MongoDB is an offline-first mobile database: an alternative to SQLite and key-value stores",
"license": "apache-2.0",
"homepage": "https://www.mongodb.com/docs/realm/",
"keywords": [
"database",
"db",
"storage",
"react",
"react-native",
"persistence",
"local storage",
"localstorage",
"sqlite",
"async storage",
"asyncstorage",
"rocksdb",
"leveldb",
"realm",
"mongodb",
"offline first",
"offlinefirst",
"localfirst",
"local first"
],
"author": {
"name": "MongoDB",
"email": "help@realm.io",
"url": "https://www.mongodb.com/docs/realm/"
},
"config": {
"anonymizedBundleId": "tkgif/+3l1e9wStGJp2TOngAK3UcQ2u7OM8ZYJU5JYo="
},
"types": "./dist/public-types/index.d.ts",
"main": "./dist/platform/node/index.js",
"react-native": "./index.react-native.js",
"exports": {
".": {
"types": "./dist/public-types/index.d.ts",
"node": "./dist/platform/node/index.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"
},
"imports": {
"#realm.node": "./binding/build/realm.node"
},
"files": [
"dependencies.list",
"dist",
"binding/index.js",
"binding/index.d.ts",
"binding/dist",
"binding/generated/*.cjs",
"binding/generated/*.d.cts",
"binding/generated/*.d.ts",
"public-types",
"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",
"bindgen/vendor/realm-core/dependencies.list",
"scripts/submit-analytics.mjs",
"react-native.config.js",
"RealmJS.podspec",
"binding.gyp"
],
"scripts": {
"test": "wireit",
"test:types": "tsc --project type-tests/tsconfig.json",
"lint": "eslint --ext .js,.mjs,.ts .",
"build:ts": "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",
"check-types": "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": [
"../fetch:build",
"build:node",
"bindgen:build:typescript",
"bindgen:generate:node-wrapper",
"bindgen:generate:react-native-wrapper",
"bindgen:transpile"
],
"env": {
"TSX_TSCONFIG_PATH": "tsconfig.tests.json"
}
},
"build:ts": {
"command": "tsc --build",
"dependencies": [
"../fetch:build",
"bindgen:generate:typescript",
"bindgen:generate:node-wrapper",
"bindgen:generate:react-native-wrapper",
"bindgen:transpile"
]
},
"bindgen:transpile": {
"command": "babel binding/generated --out-dir binding/generated --extensions .mjs --out-file-extension .cjs --plugins @babel/plugin-transform-modules-commonjs",
"dependencies": [
"bindgen:generate:node-wrapper",
"bindgen:generate:react-native-wrapper"
],
"files": [
"binding/generated/*.mjs"
],
"output": [
"binding/generated/*.cjs"
]
},
"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:build:typescript": {
"command": "tsc --project tsconfig.binding.json",
"dependencies": [
"bindgen:generate:typescript"
],
"files": [
"binding/generated/core.ts"
],
"output": [
"binding/dist/core.js",
"binding/dist/core.d.ts"
]
},
"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 binding/generated",
"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": [
"binding/generated/core.ts",
"binding/generated/native.d.ts"
]
},
"bindgen:generate:node-wrapper": {
"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 binding/generated",
"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/base-wrapper.ts",
"bindgen/src/templates/node-wrapper.ts"
],
"output": [
"binding/generated/native.node.mjs",
"binding/generated/native.node.d.mts",
"binding/generated/native.node.d.cts"
]
},
"bindgen:generate:react-native-wrapper": {
"command": "realm-bindgen --template bindgen/src/templates/react-native-wrapper.ts --spec bindgen/vendor/realm-core/bindgen/spec.yml --spec bindgen/js_spec.yml --opt-in bindgen/js_opt_in_spec.yml --output binding/generated",
"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/base-wrapper.ts",
"bindgen/src/templates/react-native-wrapper.ts"
],
"output": [
"binding/generated/native.react-native.mjs",
"binding/generated/native.react-native.d.mts",
"binding/generated/native.react-native.d.cts"
]
},
"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": "tsx ./scripts/build-android.ts",
"files": [
"bindgen/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"
}
},
"check-types": {
"command": "tsc --project tsconfig.public-types-check.json",
"dependencies": [
"build:ts"
]
},
"docs": {
"command": "typedoc",
"dependencies": [
"build:ts"
]
}
},
"dependencies": {
"@realm/fetch": "^0.1.1",
"bson": "^4.7.2",
"debug": "^4.3.4",
"node-machine-id": "^1.1.12",
"prebuild-install": "^7.1.1"
},
"peerDependencies": {
"react-native": ">=0.71.0"
},
"peerDependenciesMeta": {
"react-native": {
"optional": true
}
},
"devDependencies": {
"@babel/cli": "^7.23.9",
"@babel/core": "^7.23.9",
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@realm/bindgen": "^0.1.0",
"@types/chai": "^4.3.3",
"@types/mocha": "^10.0.0",
"@types/node": "^18.19.8",
"@types/path-browserify": "^1.0.0",
"command-line-args": "^5.2.1",
"chai": "4.3.6",
"cmake-js": "6.3.2",
"cross-env": "^7.0.3",
"mocha": "^10.1.0",
"path-browserify": "^1.0.1",
"prebuild": "^12.1.0",
"react-native": "0.73.2",
"typedoc-plugin-missing-exports": "^2.2.0"
},
"engines": {
"node": ">=18"
},
"repository": {
"type": "git",
"url": "https://github.com/realm/realm-js.git",
"directory": "packages/realm"
},
"binary": {
"module_name": "realm",
"module_path": "binding/build",
"host": "https://static.realm.io",
"remote_path": "realm-js-prebuilds/{version}",
"napi_versions": [
6
]
}
}