datastore-api 2.2.0 → 4.0.3
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/README.md +17 -0
- package/dist/datastore-api.cjs.development.js +1436 -0
- package/dist/datastore-api.cjs.development.js.map +1 -0
- package/dist/datastore-api.cjs.production.min.js +2 -0
- package/dist/datastore-api.cjs.production.min.js.map +1 -0
- package/dist/datastore-api.esm.js +1415 -0
- package/dist/datastore-api.esm.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -0
- package/dist/lib/dstore-api.d.ts +350 -0
- package/dist/mock/index.d.ts +107 -0
- package/dist/mock/operators.d.ts +8 -0
- package/package.json +21 -27
- package/src/index.ts +1 -0
- package/src/lib/dstore-api-cloud.spec.ts +435 -0
- package/src/lib/dstore-api-emulator.spec.ts +440 -0
- package/src/lib/dstore-api-simulator.spec.ts +461 -0
- package/src/lib/dstore-api.ts +706 -0
- package/src/mock/index.ts +649 -0
- package/src/mock/operators.ts +20 -0
- package/CHANGELOG.md +0 -124
package/README.md
CHANGED
|
@@ -78,3 +78,20 @@ server.get('/metrics', async (req, res) => {
|
|
|
78
78
|
- Others
|
|
79
79
|
- [google-cloud-kvstore](https://www.npmjs.com/package/google-cloud-kvstore)
|
|
80
80
|
- [datastore-entity](https://github.com/aubrian-halili/datastore-entity#readme)
|
|
81
|
+
- For debugging
|
|
82
|
+
- [dsadmin](https://github.com/remko/dsadmin) - `npx dsadmin --project=projectid`
|
|
83
|
+
- [google-datastore-emulator for node](https://github.com/ert78gb/google-datastore-emulator)
|
|
84
|
+
|
|
85
|
+
Setup your Tests like this:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
child_process.execSync(`rm -Rf ./dsData`)
|
|
89
|
+
const port = await getPort({ port: 8081 })
|
|
90
|
+
emulator = new Emulator({ debug: false, port, storeOnDisk: true , clean: false, dataDir: './dsData'})
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Then inspect datastore output with something like this:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
/opt/homebrew/share/google-cloud-sdk/platform/cloud-datastore-emulator/cloud_datastore_emulator start --host=localhost --port=8081 --store_on_disk=True ./dsData & npx dsadmin --project=huwawi2
|
|
97
|
+
```
|