Skip to content
This repository was archived by the owner on Jul 11, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .firebase/hosting.cHVibGlj.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
index.html,1586820061765,a027ac5a687715c8a26157edd0b402a46dae34d8d17c504f8a532cf7aa358c0b
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "bichigra-m"
}
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
coverage/
node_modules/
.yarn.lock
package-lock.json
package-lock.json
.now
297 changes: 35 additions & 262 deletions Readme.md

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions _mocks_/firebase-auth-mock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const auth = () =>{
return{
singOut: (user) => {
return new Promise((resolve) =>{
resolve ('ok ok')
})
}
}
}
const firebaseAuth = {
auth: auth
}

export default jest.fn(() => {
return firebaseAuth;
})
21 changes: 21 additions & 0 deletions _mocks_/firebase-mock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const firestore = () => {
return {
collection: (nameCollection) => {
return{
add: (objData) =>{
return new Promise((resolve) => {
resolve('ok ok')
})
}
}
}
}
}

const firebase = {
firestore: firestore,
}

export default jest.fn(()=>{
return firebase;
})
6 changes: 6 additions & 0 deletions database.rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"rules": {
".read": "auth != null",
".write": "auth != null"
}
}
56 changes: 56 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"database": {
"rules": "database.rules.json"
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"functions": {
"predeploy": [
"npm --prefix \"%RESOURCE_DIR%\" run lint",
"npm --prefix \"%RESOURCE_DIR%\" run build"
],
"source": "functions"
},
"storage": {
"rules": "storage.rules"
},
"emulators": {
"functions": {
"port": 5001
},
"firestore": {
"port": 8080
},
"database": {
"port": 9000
},
"hosting": {
"port": 5000
},
"pubsub": {
"port": 8085
}
},
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
27 changes: 27 additions & 0 deletions firepit-log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Welcome to firepit v1.1.0!
Doing JSON parses for version checks at /snapshot/firepit/vendor/node_modules/firebase-tools/package.json
JSONStream,abort-controller,accepts,agent-base,ajv,ansi-align,ansi-escapes,ansi-regex,ansi-styles,ansicolors,anymatch,archiver,archiver-utils,argparse,array-flatten,arrify,as-array,asn1,assert-plus,async,async-each,asynckit,aws-sign2,aws4,balanced-match,base64-js,basic-auth,basic-auth-connect,bcrypt-pbkdf,big-integer,bignumber.js,binary,binary-extensions,bl,bluebird,body-parser,boxen,brace-expansion,braces,buffer,buffer-crc32,buffer-equal-constant-time,buffer-indexof-polyfill,buffers,bytes,camelcase,capture-stack-trace,cardinal,caseless,chainsaw,chalk,char-spinner,chardet,chokidar,chownr,ci-info,cjson,cli-boxes,cli-color,cli-cursor,cli-spinners,cli-table,cli-width,clone,color,color-convert,color-name,color-string,colornames,colors,colorspace,combined-stream,commander,compare-semver,compress-commons,compressible,compression,concat-map,configstore,connect,connect-query,content-disposition,content-type,cookie,cookie-signature,core-util-is,crc,crc32-stream,create-error-class,cross-env,cross-spawn,crypto-random-string,csv-streamify,d,dashdash,debug,deep-extend,deep-is,defaults,delayed-stream,depd,destroy,diagnostics,didyoumean,dot-prop,dotenv,duplexer2,duplexer3,duplexify,ecc-jsbn,ecdsa-sig-formatter,ee-first,enabled,encodeurl,end-of-stream,env-variable,es5-ext,es6-iterator,es6-symbol,es6-weak-map,escape-html,escape-string-regexp,esprima,etag,event-emitter,event-target-shim,execa,exit-code,express,ext,extend,external-editor,extsprintf,fast-deep-equal,fast-json-stable-stringify,fast-safe-stringify,fast-text-encoding,fast-url-parser,fecha,figures,filesize,fill-range,finalhandler,firebase-tools,flat-arguments,forever-agent,form-data,forwarded,fresh,fs-constants,fs-extra,fs-minipass,fs.realpath,fstream,gaxios,gcp-metadata,get-stream,getpass,glob,glob-parent,glob-slash,glob-slasher,global-dirs,google-auth-library,google-gax,google-p12-pem,got,graceful-fs,gtoken,har-schema,har-validator,has-ansi,has-flag,home-dir,http-errors,http-signature,https-proxy-agent,iconv-lite,ieee754,import-lazy,imurmurhash,inflight,inherits,ini,inquirer,ip-regex,ipaddr.js,is-arrayish,is-binary-path,is-ci,is-extglob,is-fullwidth-code-point,is-glob,is-installed-globally,is-npm,is-number,is-obj,is-path-inside,is-promise,is-redirect,is-retry-allowed,is-stream,is-stream-ended,is-typedarray,is-url,is-wsl,is2,isarray,isexe,isstream,jju,join-path,js-yaml,jsbn,json-bigint,json-parse-helpfulerror,json-schema,json-schema-traverse,json-stringify-safe,jsonfile,jsonparse,jsonschema,jsonwebtoken,jsprim,jwa,jws,klaw,kuler,latest-version,lazystream,listenercount,lodash,lodash._isnative,lodash._objecttypes,lodash._shimkeys,lodash.at,lodash.camelcase,lodash.defaults,lodash.difference,lodash.flatten,lodash.has,lodash.includes,lodash.isarguments,lodash.isboolean,lodash.isinteger,lodash.isnumber,lodash.isobject,lodash.isplainobject,lodash.isstring,lodash.keys,lodash.once,lodash.snakecase,lodash.toarray,lodash.union,lodash.values,log-symbols,logform,long,lowercase-keys,lru-cache,lru-queue,make-dir,marked,marked-terminal,media-typer,memoizee,merge-descriptors,methods,mime,mime-db,mime-types,mimic-fn,minimatch,minimist,minipass,minizlib,mkdirp,morgan,ms,mute-stream,nash,negotiator,next-tick,nice-try,node-emoji,node-fetch,node-forge,normalize-path,npm-run-path,oauth-sign,on-finished,on-headers,once,one-time,onetime,open,ora,os-tmpdir,p-defer,p-finally,package-json,parseurl,path-is-absolute,path-is-inside,path-key,path-to-regexp,performance-now,picomatch,pify,plist,portfinder,prepend-http,process-nextick-args,progress,protobufjs,proxy-addr,pseudomap,psl,punycode,qs,range-parser,raw-body,rc,readable-stream,readdirp,redeyed,registry-auth-token,registry-url,request,restore-cursor,retry-request,rimraf,router,rsvp,run-async,rxjs,safe-buffer,safer-buffer,semver,semver-diff,send,serve-static,setimmediate,setprototypeof,shebang-command,shebang-regex,signal-exit,simple-swizzle,sprintf-js,sshpk,stack-trace,statuses,stream-shift,string-length,string-width,string_decoder,strip-ansi,strip-eof,strip-json-comments,superstatic,supports-color,supports-hyperlinks,tar,tar-stream,tcp-port-used,term-size,text-hex,through,through2,timed-out,timers-ext,tmp,to-regex-range,toidentifier,tough-cookie,toxic,traverse,triple-beam,try-require,tslib,tunnel-agent,tweetnacl,type,type-is,typedarray-to-buffer,unique-string,universal-analytics,unpipe,unzip-response,unzipper,update-notifier,uri-js,url-join,url-parse-lax,util-deprecate,utils-merge,uuid,valid-url,vary,verror,walkdir,wcwidth,which,widest-line,winston,winston-transport,wrappy,write-file-atomic,ws,xdg-basedir,xmlbuilder,xmldom,xtend,yallist,zip-stream,@google-cloud,@grpc,@protobufjs,@types
Installed ft@8.1.1 and packaged ft@8.1.1
Checking for npm/bin/npm-cli install at /Users/marielcarrillo/.cache/firebase/tools/lib/node_modules/npm/bin/npm-cli
Checking for npm/bin/npm-cli install at /Users/marielcarrillo/.cache/firebase/tools/node_modules/npm/bin/npm-cli
Checking for npm/bin/npm-cli install at /snapshot/firepit/node_modules/npm/bin/npm-cli
Found npm/bin/npm-cli install.
Checking for npm/bin/npm-cli install at /Users/marielcarrillo/.cache/firebase/tools/lib/node_modules/npm/bin/npm-cli
Checking for npm/bin/npm-cli install at /Users/marielcarrillo/.cache/firebase/tools/node_modules/npm/bin/npm-cli
Checking for npm/bin/npm-cli install at /snapshot/firepit/node_modules/npm/bin/npm-cli
Found npm/bin/npm-cli install.
ShellJSInternalError: ENOENT: no such file or directory, unlink '/Users/marielcarrillo/.cache/firebase/runtime/shell'
ShellJSInternalError: ENOENT: no such file or directory, unlink '/Users/marielcarrillo/.cache/firebase/runtime/node.bat'
ShellJSInternalError: ENOENT: no such file or directory, unlink '/Users/marielcarrillo/.cache/firebase/runtime/npm.bat'
Runtime binaries created.
/usr/local/bin/firebase
/usr/local/bin/firebase,/snapshot/firepit/firepit.js,init
Checking for npm/bin/npm-cli install at /Users/marielcarrillo/.cache/firebase/tools/lib/node_modules/npm/bin/npm-cli
Checking for npm/bin/npm-cli install at /Users/marielcarrillo/.cache/firebase/tools/node_modules/npm/bin/npm-cli
Checking for npm/bin/npm-cli install at /snapshot/firepit/node_modules/npm/bin/npm-cli
Found npm/bin/npm-cli install.
Checking for npm/bin/npm-cli install at /Users/marielcarrillo/.cache/firebase/tools/lib/node_modules/npm/bin/npm-cli
Checking for npm/bin/npm-cli install at /Users/marielcarrillo/.cache/firebase/tools/node_modules/npm/bin/npm-cli
Checking for npm/bin/npm-cli install at /snapshot/firepit/node_modules/npm/bin/npm-cli
Found npm/bin/npm-cli install.
ShellJSInternalError: ENOENT: no such file or directory, chmod '/Users/marielcarrillo/.cache/firebase/runtime/node.js'
4 changes: 4 additions & 0 deletions firestore.indexes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"indexes": [],
"fieldOverrides": []
}
17 changes: 17 additions & 0 deletions firestore.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {

// This rule allows anyone on the internet to view, edit, and delete
// all data in your Firestore database. It is useful for getting
// started, but it is configured to expire after 30 days because it
// leaves your app open to attackers. At that time, all client
// requests to your Firestore database will be denied.
//
// Make sure to write security rules for your app before that time, or else
// your app will lose access to your Firestore database
match /{document=**} {
allow read, write: if request.time < timestamp.date(2020, 5, 11);
}
}
}
123 changes: 123 additions & 0 deletions functions/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"parserOptions": {
// Required for certain syntax usages
"ecmaVersion": 2017
},
"plugins": [
"promise"
],
"extends": "eslint:recommended",
"rules": {
// Removed rule "disallow the use of console" from recommended eslint rules
"no-console": "off",

// Removed rule "disallow multiple spaces in regular expressions" from recommended eslint rules
"no-regex-spaces": "off",

// Removed rule "disallow the use of debugger" from recommended eslint rules
"no-debugger": "off",

// Removed rule "disallow unused variables" from recommended eslint rules
"no-unused-vars": "off",

// Removed rule "disallow mixed spaces and tabs for indentation" from recommended eslint rules
"no-mixed-spaces-and-tabs": "off",

// Removed rule "disallow the use of undeclared variables unless mentioned in /*global */ comments" from recommended eslint rules
"no-undef": "off",

// Warn against template literal placeholder syntax in regular strings
"no-template-curly-in-string": 1,

// Warn if return statements do not either always or never specify values
"consistent-return": 1,

// Warn if no return statements in callbacks of array methods
"array-callback-return": 1,

// Require the use of === and !==
"eqeqeq": 2,

// Disallow the use of alert, confirm, and prompt
"no-alert": 2,

// Disallow the use of arguments.caller or arguments.callee
"no-caller": 2,

// Disallow null comparisons without type-checking operators
"no-eq-null": 2,

// Disallow the use of eval()
"no-eval": 2,

// Warn against extending native types
"no-extend-native": 1,

// Warn against unnecessary calls to .bind()
"no-extra-bind": 1,

// Warn against unnecessary labels
"no-extra-label": 1,

// Disallow leading or trailing decimal points in numeric literals
"no-floating-decimal": 2,

// Warn against shorthand type conversions
"no-implicit-coercion": 1,

// Warn against function declarations and expressions inside loop statements
"no-loop-func": 1,

// Disallow new operators with the Function object
"no-new-func": 2,

// Warn against new operators with the String, Number, and Boolean objects
"no-new-wrappers": 1,

// Disallow throwing literals as exceptions
"no-throw-literal": 2,

// Require using Error objects as Promise rejection reasons
"prefer-promise-reject-errors": 2,

// Enforce “for” loop update clause moving the counter in the right direction
"for-direction": 2,

// Enforce return statements in getters
"getter-return": 2,

// Disallow await inside of loops
"no-await-in-loop": 2,

// Disallow comparing against -0
"no-compare-neg-zero": 2,

// Warn against catch clause parameters from shadowing variables in the outer scope
"no-catch-shadow": 1,

// Disallow identifiers from shadowing restricted names
"no-shadow-restricted-names": 2,

// Enforce return statements in callbacks of array methods
"callback-return": 2,

// Require error handling in callbacks
"handle-callback-err": 2,

// Warn against string concatenation with __dirname and __filename
"no-path-concat": 1,

// Prefer using arrow functions for callbacks
"prefer-arrow-callback": 1,

// Return inside each then() to create readable and reusable Promise chains.
// Forces developers to return console logs and http calls in promises.
"promise/always-return": 2,

//Enforces the use of catch() on un-returned promises
"promise/catch-or-return": 2,

// Warn against nested then() or catch() statements
"promise/no-nesting": 1
}
}
1 change: 1 addition & 0 deletions functions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
8 changes: 8 additions & 0 deletions functions/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const functions = require('firebase-functions');

// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
// exports.helloWorld = functions.https.onRequest((request, response) => {
// response.send("Hello from Firebase!");
// });
25 changes: 25 additions & 0 deletions functions/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "eslint .",
"serve": "firebase emulators:start --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "8"
},
"dependencies": {
"firebase-admin": "^8.9.0",
"firebase-functions": "^3.3.0"
},
"devDependencies": {
"eslint": "^5.12.0",
"eslint-plugin-promise": "^4.0.1",
"firebase-functions-test": "^0.1.6"
},
"private": true
}
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^24.8.0",
"eslint": "^6.0.1",
"eslint-config-airbnb-base": "^13.2.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jest": "^22.1.2",
Expand All @@ -32,5 +31,11 @@
"serve": "^11.0.2",
"stylelint": "^10.1.0",
"stylelint-config-recommended": "^2.2.0"
},
"dependencies": {
"@firebase/firestore": "^1.14.1",
"@firebase/storage": "^0.3.32",
"@google-cloud/storage": "^4.7.0",
"firebase": "^7.14.2"
}
}
}
Loading