@daaku/firebase-rest-api
Advanced tools
Comparing version 2.1.0 to 2.2.0
// FirebaseConfig holds the base configuration and provides helpers to build | ||
// paths & URLs in the context of that configuration. | ||
export class FirebaseConfig { | ||
apiKey; | ||
projectID; | ||
databaseID; | ||
host; | ||
protocol; | ||
databasePath; | ||
endpointURL; | ||
constructor({ apiKey, projectID, databaseID = '(default)', host = 'firestore.googleapis.com', protocol = 'https', }) { | ||
@@ -45,5 +38,3 @@ this.apiKey = apiKey; | ||
if (Array.isArray(data)) { | ||
throw data.length === 1 | ||
? Object.assign(new Error(), data[0].error) | ||
: data; | ||
throw data.length === 1 ? Object.assign(new Error(), data[0].error) : data; | ||
} | ||
@@ -50,0 +41,0 @@ throw Object.assign(new Error(), data.error); |
{ | ||
"name": "@daaku/firebase-rest-api", | ||
"author": "Naitik Shah <n@daaku.org>", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Minimal wrapper around fetch to make Firebase REST API calls.", | ||
"repository": "git@github.com:daaku/firebase-rest-api", | ||
"license": "MIT", | ||
"prettier": "prettier-config-daaku", | ||
"type": "module", | ||
@@ -16,14 +15,14 @@ "exports": { | ||
}, | ||
"eslintConfig": { | ||
"extends": "@daaku" | ||
"prettier": { | ||
"arrowParens": "avoid", | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
}, | ||
"scripts": { | ||
"check:types": "tsc --noEmit", | ||
"check:lint": "eslint --fix --ignore-pattern dist .", | ||
"check": "run-p 'check:*' 'test'", | ||
"build:js": "tsc", | ||
"build:test": "esbuild --bundle --sourcemap --define:process.env.NODE_ENV=\\\"production\\\" --outdir=dist/bundle test/tests.ts", | ||
"test": "npm run build:test && qunit-puppeteer", | ||
"build": "run-p check:lint test build:js", | ||
"deploy": "npm run build && npm publish --access=public" | ||
"build": "tsc", | ||
"test": "vite build && URI=file://$PWD/dist/test/index.html qunit-puppeteer", | ||
"deploy": "npm run test && npm publish --access=public", | ||
"prepare": "npm run build", | ||
"dev": "vite" | ||
}, | ||
@@ -35,11 +34,8 @@ "keywords": [ | ||
"devDependencies": { | ||
"@daaku/eslint-config": "^4.2.0", | ||
"@daaku/qunit-puppeteer": "^2.0.0", | ||
"@daaku/qunit-puppeteer": "^3.0.0", | ||
"@types/qunit": "^2.11.3", | ||
"esbuild": "^0.14.11", | ||
"eslint": "^8.7.0", | ||
"npm-run-all": "^4.1.5", | ||
"qunit": "^2.17.2", | ||
"typescript": "^4.5.4" | ||
"typescript": "^5.3.2", | ||
"vite": "^5.0.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5
6567
70