diff --git a/.circleci/config.yml b/.circleci/config.yml index b4c3610..bc20956 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,20 +1,30 @@ -version: 2 -defaults: &defaults - working_directory: ~/repo - docker: - - image: circleci/node:12.2 -jobs: - dummy: +version: 2.1 +references: + defaults: &defaults docker: - - image: cimg/base:2020.01 + - image: circleci/node:12.2 + tag_filter: &tag_filter + filters: + branches: + ignore: /.*/ + tags: + only: /^v\d+\.\d+\.\d+$/ +jobs: + lint: + <<: *defaults steps: - - run: - name: Running dummy job - command: echo '' + - checkout + - run: npm install + - run: npm run lint + - persist_to_workspace: + root: . + paths: + - . deploy: <<: *defaults steps: - - checkout + - attach_workspace: + at: . - run: name: Authenticate with registry command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/repo/.npmrc @@ -31,12 +41,12 @@ workflows: version: 2 untagged-build: jobs: - - dummy + - lint tagged-build: jobs: + - lint: + <<: *tag_filter - deploy: - filters: - branches: - ignore: /.*/ - tags: - only: /^v\d+\.\d+\.\d+$/ \ No newline at end of file + requires: + - lint + <<: *tag_filter diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..6c61533 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,10 @@ +{ + "env": { + "node": true + }, + "extends": ["eslint:recommended", "plugin:prettier/recommended"], + "parser": "babel-eslint", + "rules": { + "no-console": "warn" + } +} diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..3f714ac --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,4 @@ +module.exports = { + singleQuote: true, + semi: false, +} diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 2a8b07b..0000000 --- a/index.d.ts +++ /dev/null @@ -1,145 +0,0 @@ -export interface Location { - latitude: number; - longitude: number; -}; - -/** - * An object representing an interaction with one or more registered geofence radii. - */ -export interface GeofenceEvent { - id: string; - name: string; - venueId?: string; - venue?: Venue; - partnerVenueId?: string; - location: Location; - timestamp: number; -}; - -/** - * Foursquare location object for a venue. - */ -export interface LocationInformation { - address?: string; - crossStreet?: string; - city?: string; - state?: string; - postalCode?: string; - country?: string; - location?: Location; -}; - -/** - * Foursquare representation of a chain of venues, i.e. Starbucks. - */ -export interface Chain { - id: string; - name: string; -}; - -/** - * Foursquare category for a venue. - */ -export interface Category { - id: string; - name: string; - pluralName?: string; - shortName?: string; - icon?: CategoryIcon; - isPrimary: boolean; -}; - -/** - * The icon image information for a category. - */ -export interface CategoryIcon { - prefix: string; - suffix: string; -}; - -/** - * Representation of a venue in the Foursquare Places database. - */ -export interface Venue { - id: string; - name: string; - locationInformation?: LocationInformation; - partnerVenueId?: string; - probability?: number; - chains: [Chain]; - categories: [Category]; - hierarchy: [VenueParent]; -}; - -export interface VenueParent { - id: string; - name: string; - categories: [Category]; -}; - -/** - * Everything Pilgrim knows about a user's location, including raw data and a probable venue. - */ -export interface Visit { - location?: Location; - locationType: number; - confidence: number; - arrivalTime?: number; - venue?: Venue; - otherPossibleVenues?: [Venue]; -}; - -/** - * An object representing the current location of the user. - */ -export interface CurrentLocation { - currentPlace: Visit; - matchedGeofences: [GeofenceEvent]; -}; - -export interface PilgrimSdk { - /** - * If the current device is supported (no iPads or iPod touches; cellular network required) (iOS only) - */ - isSupportedDevice(): Promise; - - /** - * If the user is on a supported device and all the required settings ("always" location permission) are on (iOS only) - */ - canEnable(): Promise; - - /** - * Returns a unique identifier that gets generated the first time this sdk runs on a specific device. - */ - getInstallId(): Promise; - - /** - * Call this after configuring the SDK to start the SDK and begin receiving location updates. - * */ - start(): void; - - /** - * Stop receiving location updates, until you call `start` again. - */ - stop(): void; - - /** - * Gets the current location of the user. - * This includes possibly a visit and and an array of geofences. - */ - getCurrentLocation(): Promise; - - /** - * Generates a visit and optional nearby venues at the given location. - */ - fireTestVisit(latitude: number, longitude: number): void; - - /** - * Initializes a debug mode view controller for viewing PilgrimSDK logs and presents it. - */ - showDebugScreen(): void; - -} - -declare let PilgrimSdk: PilgrimSdk -export default PilgrimSdk \ No newline at end of file diff --git a/index.js b/index.js deleted file mode 100644 index 8a73d2e..0000000 --- a/index.js +++ /dev/null @@ -1,5 +0,0 @@ - -import { NativeModules } from 'react-native'; - -const PilgrimSdk = NativeModules.RNPilgrimSdk; -export default PilgrimSdk; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..e0e3d68 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1064 @@ +{ + "name": "@foursquare/pilgrim-sdk-react-native", + "version": "1.0.9", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha1-Fo2ho26Q2miujUnA8bSMfGJJITo=", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/generator": { + "version": "7.10.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/@babel/generator/-/generator-7.10.4.tgz", + "integrity": "sha1-5J7u2f4RS2L6WxgYVqQ6XjL18kM=", + "dev": true, + "requires": { + "@babel/types": "^7.10.4", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.10.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha1-0tOyDFmtjEcRL6fSqUvAnV74Lxo=", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.10.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha1-mMHL6g4jMvM/mkZhuM4VBbLBm6I=", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.10.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.4.tgz", + "integrity": "sha1-LHBXbqo7VgmyTLmdsoiMw/xCUdE=", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha1-p4x6clHgH2FlEtMbEK3PUq2l4NI=", + "dev": true + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha1-fRvf1ldTU4+r5sOFls23bZrGAUM=", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } + } + }, + "@babel/parser": { + "version": "7.10.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/@babel/parser/-/parser-7.10.4.tgz", + "integrity": "sha1-nu3yfhmY2Hc5+1AopRIFV8BqGmQ=", + "dev": true + }, + "@babel/template": { + "version": "7.10.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha1-MlGZbEIA68cdGo/EBfupQPNrong=", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/traverse": { + "version": "7.10.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/@babel/traverse/-/traverse-7.10.4.tgz", + "integrity": "sha1-5kLlOVo7CcyVyOdKJ0MrSEtpeBg=", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.10.4", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + }, + "dependencies": { + "globals": { + "version": "11.12.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/globals/-/globals-11.12.0.tgz", + "integrity": "sha1-q4eVM4hooLq9hSV1gBjCp+uVxC4=", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.10.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/@babel/types/-/types-7.10.4.tgz", + "integrity": "sha1-NpUXGINS4YIZmB79FWv9sZn/8e4=", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-HBJhu+qhCoBVu8XYq4S3sq/IRqA=", + "dev": true + }, + "acorn": { + "version": "7.3.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/acorn/-/acorn-7.3.1.tgz", + "integrity": "sha1-hQEHVNtTw/uvO56j4IOqXF0Uf/0=", + "dev": true + }, + "acorn-jsx": { + "version": "5.2.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha1-TGYGkXPW/daO2FI5/CViJhgrLr4=", + "dev": true + }, + "ajv": { + "version": "6.12.2", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/ajv/-/ajv-6.12.2.tgz", + "integrity": "sha1-xinF7O0XuvMUQ3kY0tqIyZ1ZWM0=", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "3.2.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha1-46PaS/uubIapwoViXeEkojQCb78=", + "dev": true + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha1-bIw/uCfdQ+45GPJ7gngqt2WKb9k=", + "dev": true + }, + "babel-eslint": { + "version": "10.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/babel-eslint/-/babel-eslint-10.1.0.tgz", + "integrity": "sha1-aWjlaKkQt4+zd5zdi2rC9HmUMjI=", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0", + "eslint-visitor-keys": "^1.0.0", + "resolve": "^1.12.0" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M=", + "dev": true + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha1-ThSHCmGNni7dl92DRf2dncMVZGo=", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha1-kK51xCTQCNJiTFvynq0xd+v881k=", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha1-aOMlkd9z4lrRxLSRCKLsUHliv9E=", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha1-9zqFudXUHQRVUcF34ogtSshXKKY=", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/debug/-/debug-4.1.1.tgz", + "integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha1-rd6+rXKmV023g2OdyHoSF3OXOWE=", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=", + "dev": true + }, + "enquirer": { + "version": "2.3.5", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/enquirer/-/enquirer-2.3.5.tgz", + "integrity": "sha1-OrK4ON8KnYq559/yNbDocS75I4E=", + "dev": true, + "requires": { + "ansi-colors": "^3.2.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "7.3.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/eslint/-/eslint-7.3.1.tgz", + "integrity": "sha1-djkr1+REaNBGFJuhKNFWbFmsvhk=", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.0", + "eslint-utils": "^2.0.0", + "eslint-visitor-keys": "^1.2.0", + "espree": "^7.1.0", + "esquery": "^1.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, + "eslint-config-prettier": { + "version": "6.11.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz", + "integrity": "sha1-9tIjjBKQ0ByFmotcH301KgsNqLE=", + "dev": true, + "requires": { + "get-stdin": "^6.0.0" + } + }, + "eslint-plugin-prettier": { + "version": "3.1.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz", + "integrity": "sha1-Foq0MVTi6lfbmSos0JfIKBcfdcI=", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-scope": { + "version": "5.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/eslint-scope/-/eslint-scope-5.1.0.tgz", + "integrity": "sha1-0Plx3+WcaeDK2mhLI9Sdv4JgDOU=", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha1-0t5eA0JOcH3BDHQGjd7a5wh0Gyc=", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha1-MOvR73wv3/AcOk8VEESvJfqwUj4=", + "dev": true + }, + "espree": { + "version": "7.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/espree/-/espree-7.1.0.tgz", + "integrity": "sha1-qcfxinUgVnNb8boUyxtwrcOlzhw=", + "dev": true, + "requires": { + "acorn": "^7.2.0", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.2.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=", + "dev": true + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha1-t4tYKKqOIU4p+3TE1bdS4cAz2lc=", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha1-N0MJ05/ZNa5QDnuS6Ka0xyDllkI=", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0=", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU=", + "dev": true + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha1-c+4RmC2Gyq95WYKNUZz+kn+sXwM=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha1-yg9u+m3T1WEzP7FFFQZcL6/fQ5w=", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha1-XSltbwS9pEpGMKMBQTvbwuwIXsA=", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha1-RXWyHivO50NKqb5mL0t7X5wrUTg=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha1-ngm/cSs2CrkiXoEgSPcf3pyJZXs=", + "dev": true + }, + "glob": { + "version": "7.1.6", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/glob/-/glob-7.1.6.tgz", + "integrity": "sha1-FB8zuBp8JJLhJVlDB0gMRmeSeKY=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha1-tsHvQXxOVmPqSY8cRa+saRa7wik=", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/globals/-/globals-12.4.0.tgz", + "integrity": "sha1-oYgTV2pBsAokqX5/gVkYwuGZJfg=", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=", + "dev": true + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha1-Yz/2GFBueTr1rJG/SLcmd+FcvmY=", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=", + "dev": true + }, + "js-yaml": { + "version": "3.14.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha1-p6NBcPJqIbsWJCTYray0ETpp5II=", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha1-gFZNLkg9rPbo7yCWUKZ98/DCg6Q=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/levn/-/levn-0.4.1.tgz", + "integrity": "sha1-rkViwAdHO5MqYgDUAyaN0v/8at4=", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=", + "dev": true + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8=", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/ms/-/ms-2.1.2.tgz", + "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha1-TyNqY3Pa4FZqbUPhMmZ09QwpFJk=", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha1-aR0nCeeMefrjoVZiJFLQB2LKqqI=", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=", + "dev": true + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha1-3rxkidem5rDnYRiIzsiAM30xY5Y=", + "dev": true + }, + "prettier": { + "version": "2.0.5", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/prettier/-/prettier-2.0.5.tgz", + "integrity": "sha1-1tVigkVSQ/L5LMFxZpLAiqMVItQ=", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha1-0j1B/hN1ZG3i0BBNNFSjAIgCz3s=", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, + "progress": { + "version": "2.0.3", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/progress/-/progress-2.0.3.tgz", + "integrity": "sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", + "dev": true + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha1-IG0K0KVkjP+9uK5GQ489xRyfeOI=", + "dev": true + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha1-sllBtUloIxzC0bt2p5y38sC/hEQ=", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY=", + "dev": true + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha1-stEE/g2Psnz54KHNqCYt04M8bKs=", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "7.3.2", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/semver/-/semver-7.3.2.tgz", + "integrity": "sha1-YElisFK4HtB4aq6EOJ/7pw/9OTg=", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha1-ys12k0YaY3pXiNkqfdT7oGjoFjY=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha1-CxVx3XZpzNTz4G4U7x7tJiJa5TI=", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/strip-json-comments/-/strip-json-comments-3.1.0.tgz", + "integrity": "sha1-djjTFCISns9EV0QACfugP5+awYA=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/table/-/table-5.4.6.tgz", + "integrity": "sha1-EpLRlQDOP4YFOwXw6Ofko7shB54=", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha1-B7ggO/pwVsBlcFDjzNLDdzC6uPE=", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha1-CeJJ696FHTseSNJ8EFREZn8XuD0=", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "v8-compile-cache": { + "version": "2.1.1", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", + "integrity": "sha1-VLw83UMxe8qR413K8wWxpyN950U=", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/which/-/which-2.0.2.tgz", + "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha1-YQY29rH3A4kb00dxzLF/uTtHB5w=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://foursquaredev.jfrog.io/foursquaredev/api/npm/npm/write/-/write-1.0.3.tgz", + "integrity": "sha1-CADhRSO5I6OH5BUSPIZWFqrg9cM=", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + } + } +} diff --git a/package.json b/package.json index df6b096..5ae3e52 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,9 @@ "homepage": "https://enterprise.foursquare.com/products/pilgrim", "version": "1.0.9", "description": "React native wrapper for the Pilgrim SDK", - "main": "index.js", + "main": "src/index.js", "scripts": { + "lint": "eslint src", "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [ @@ -18,5 +19,12 @@ }, "peerDependencies": { "react-native": "^0.41.2" + }, + "devDependencies": { + "babel-eslint": "^10.1.0", + "eslint": "^7.3.1", + "eslint-config-prettier": "^6.11.0", + "eslint-plugin-prettier": "^3.1.4", + "prettier": "^2.0.5" } -} \ No newline at end of file +} diff --git a/src/index.d.ts b/src/index.d.ts new file mode 100644 index 0000000..e46a8b7 --- /dev/null +++ b/src/index.d.ts @@ -0,0 +1,144 @@ +export interface Location { + latitude: number + longitude: number +} + +/** + * An object representing an interaction with one or more registered geofence radii. + */ +export interface GeofenceEvent { + id: string + name: string + venueId?: string + venue?: Venue + partnerVenueId?: string + location: Location + timestamp: number +} + +/** + * Foursquare location object for a venue. + */ +export interface LocationInformation { + address?: string + crossStreet?: string + city?: string + state?: string + postalCode?: string + country?: string + location?: Location +} + +/** + * Foursquare representation of a chain of venues, i.e. Starbucks. + */ +export interface Chain { + id: string + name: string +} + +/** + * Foursquare category for a venue. + */ +export interface Category { + id: string + name: string + pluralName?: string + shortName?: string + icon?: CategoryIcon + isPrimary: boolean +} + +/** + * The icon image information for a category. + */ +export interface CategoryIcon { + prefix: string + suffix: string +} + +/** + * Representation of a venue in the Foursquare Places database. + */ +export interface Venue { + id: string + name: string + locationInformation?: LocationInformation + partnerVenueId?: string + probability?: number + chains: [Chain] + categories: [Category] + hierarchy: [VenueParent] +} + +export interface VenueParent { + id: string + name: string + categories: [Category] +} + +/** + * Everything Pilgrim knows about a user's location, including raw data and a probable venue. + */ +export interface Visit { + location?: Location + locationType: number + confidence: number + arrivalTime?: number + venue?: Venue + otherPossibleVenues?: [Venue] +} + +/** + * An object representing the current location of the user. + */ +export interface CurrentLocation { + currentPlace: Visit + matchedGeofences: [GeofenceEvent] +} + +export interface PilgrimSdk { + /** + * If the current device is supported (no iPads or iPod touches; cellular network required) (iOS only) + */ + isSupportedDevice(): Promise + + /** + * If the user is on a supported device and all the required settings ("always" location permission) are on (iOS only) + */ + canEnable(): Promise + + /** + * Returns a unique identifier that gets generated the first time this sdk runs on a specific device. + */ + getInstallId(): Promise + + /** + * Call this after configuring the SDK to start the SDK and begin receiving location updates. + * */ + start(): void + + /** + * Stop receiving location updates, until you call `start` again. + */ + stop(): void + + /** + * Gets the current location of the user. + * This includes possibly a visit and and an array of geofences. + */ + getCurrentLocation(): Promise + + /** + * Generates a visit and optional nearby venues at the given location. + */ + fireTestVisit(latitude: number, longitude: number): void + + /** + * Initializes a debug mode view controller for viewing PilgrimSDK logs and presents it. + */ + showDebugScreen(): void +} + +declare let PilgrimSdk: PilgrimSdk +export default PilgrimSdk diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..4845dd7 --- /dev/null +++ b/src/index.js @@ -0,0 +1,4 @@ +import { NativeModules } from 'react-native' + +const PilgrimSdk = NativeModules.RNPilgrimSdk +export default PilgrimSdk