@pbvision/firestore-orm 0.0.4 → 0.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pbvision/firestore-orm",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Firestore ORM Library",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -11,12 +11,12 @@
11
11
  "scripts": {
12
12
  "build-doc": "./docs/build.sh",
13
13
  "check-markdown-link": "./scripts/ci/markdown-link.sh",
14
- "debug": "yarn start-local-db; ./node_modules/nodemon/bin/nodemon.js --no-lazy --legacy-watch --watch ./src --watch ./example --watch ./test --inspect=9229 ./node_modules/jest/bin/jest.js --coverage --config=./jest.config.json --runInBand",
14
+ "debug": "yarn start-local-db && ./node_modules/nodemon/bin/nodemon.js --no-lazy --legacy-watch --watch ./src --watch ./example --watch ./test --inspect=9229 ./node_modules/jest/bin/jest.js --coverage --config=./jest.config.json --runInBand",
15
15
  "lint": "./scripts/ci/lint-format-js.sh",
16
- "restart-local-db": "./scripts/start-local-db.sh --force-recreate",
17
16
  "setup": "yarn install --frozen-lockfile && pip install -r requirements.txt",
18
17
  "start-local-db": "./scripts/start-local-db.sh",
19
- "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage --config=./jest.config.json"
18
+ "test": "yarn -s start-local-db && yarn -s test-without-starting-db",
19
+ "test-without-starting-db": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage --config=./jest.config.json"
20
20
  },
21
21
  "contributors": [
22
22
  "Yu Guan",
@@ -42,7 +42,6 @@
42
42
  "@google-cloud/firestore": "^7.1.0",
43
43
  "@pbvision/schema": "^0.2.15",
44
44
  "deep-object-diff": "^1.1.7",
45
- "eslint-import-resolver-webpack": "^0.13.8",
46
45
  "fast-deep-equal": "^3.1.3",
47
46
  "fast-json-stable-stringify": "^2.1.0",
48
47
  "rfdc": "^1.1.4",
@@ -55,6 +54,7 @@
55
54
  "@pbvision/jest-unit-test": "^0.2.3",
56
55
  "eslint": "^8.22.0",
57
56
  "eslint-config-standard": "15.0.0",
57
+ "eslint-import-resolver-webpack": "^0.13.8",
58
58
  "eslint-plugin-import": "^2.22.0",
59
59
  "eslint-plugin-node": "^11.1.0",
60
60
  "eslint-plugin-promise": "^6.0.0",
@@ -1,2 +1,12 @@
1
1
  #!/bin/bash
2
- gcloud emulators firestore start --host-port [::1]:8404
2
+ set -o errexit
3
+ set -o nounset
4
+
5
+ firestorePort=8404
6
+ pid=`lsof -tPi :$firestorePort -sTCP:LISTEN || echo 'port_not_in_use'`
7
+ if [ "$pid" != "port_not_in_use" ]; then
8
+ echo "local db emulator port $firestorePort already in use; replacing PID $pid"
9
+ kill $pid
10
+ fi
11
+ gcloud emulators firestore start --host-port [::1]:$firestorePort > /dev/null 2> /dev/null &
12
+ echo "firestore db emulator is now running in the background as PID $!"