Skip to content

Commit

Permalink
Merge pull request #511 from Esri/chore/breaking-cleanup
Browse files Browse the repository at this point in the history
Chore: miscellaneous breaking cleanup for v2.0.0
  • Loading branch information
john gravois authored Apr 12, 2019
2 parents b6041f2 + 3e8c2d1 commit 9da67f8
Show file tree
Hide file tree
Showing 140 changed files with 824 additions and 1,725 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ packages/*/debug/
# no idea
/packages/*/.rpt2_cache

# packages in development
packages/arcgis-rest-portal/

#
test.html
test.js
Expand Down
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,11 @@ Some useful commands include:

* [`@esri/arcgis-rest-request`](./packages/arcgis-rest-request/) - Underpins other packages and supports making low-level requests.
* [`@esri/arcgis-rest-auth`](./packages/arcgis-rest-auth) - Provides methods for authenticating named users and applications.
* [`@esri/arcgis-rest-common-types`](./packages/arcgis-rest-common-types) - Stores objects common across the ArcGIS API.
* [`@esri/arcgis-rest-items`](./packages/arcgis-rest-items) - Methods for working with ArcGIS Online/Enterprise content.
* [`@esri/arcgis-rest-groups`](./packages/arcgis-rest-groups) - Methods for working with ArcGIS Online/Enterprise groups.
* [`@esri/arcgis-rest-users`](./packages/arcgis-rest-users) - Methods for working with ArcGIS Online/Enterprise users.
* [`@esri/arcgis-rest-sharing`](./packages/arcgis-rest-sharing) - Methods for updating permissions for ArcGIS Online/Enterprise content.
* [`@esri/arcgis-rest-feature-service`](./packages/arcgis-rest-feature-service) - Functions for querying and editing the features inside feature services.
* [`@esri/arcgis-rest-common`](./packages/arcgis-rest-common-types) - - Stores shared methods and types used throughout the ArcGIS API.
* [`@esri/arcgis-rest-portal`](./packages/arcgis-rest-portal) - Methods for working with ArcGIS Online/Enterprise content and users.
* [`@esri/arcgis-rest-feature-service`](./packages/arcgis-rest-feature-service) - Functions for creating and updating feature services and querying and editing the features they contain.
* [`@esri/arcgis-rest-geocoder`](./packages/arcgis-rest-geocoder) - Geocoding wrapper for `@esri/arcgis-rest-js`
* [`@esri/arcgis-rest-feature-service-admin`](./packages/arcgis-rest-feature-service-admin) - Functions for creating and updating feature services.
* [`@esri/arcgis-rest-routing`](./packages/arcgis-rest-routing) - Routing and directions wrapper for `@esri/arcgis-rest-js`.
* [`@esri/arcgis-rest-common`](./packages/arcgis-rest-common) - Stores shared methods and types used throughout the ArcGIS API.


### Frequently Asked Questions

Expand Down
2 changes: 1 addition & 1 deletion demos/ago-node-cli/lib/item-export-command.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { getItem, getItemData } = require("@esri/arcgis-rest-items");
const { getItem, getItemData } = require("@esri/arcgis-rest-portal");
const jsonfile = require('jsonfile');

module.exports = {
Expand Down
4 changes: 2 additions & 2 deletions demos/ago-node-cli/lib/item-search-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
/**
* Bring in searchItems fn
*/
const { searchItems } = require("@esri/arcgis-rest-items");
const { searchItems } = require("@esri/arcgis-rest-portal");

module.exports = {
/**
* Execute the command
*/
execute: function (query) {
// construct the search call..
return searchItems({
return searchItems({
searchForm: {
q: query,
start: 1,
Expand Down
2 changes: 1 addition & 1 deletion demos/ago-node-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"license": "Apache-2.0",
"dependencies": {
"@esri/arcgis-rest-auth": "^1.19.2",
"@esri/arcgis-rest-items": "^1.19.2",
"@esri/arcgis-rest-portal": "^1.19.2",
"@esri/arcgis-rest-request": "^1.19.2",
"chalk": "^2.3.0",
"commander": "^2.12.2",
Expand Down
2 changes: 1 addition & 1 deletion demos/batch-geocoder-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"homepage": "https://github.com/Esri/arcgis-rest-js#readme",
"dependencies": {
"@esri/arcgis-rest-auth": "^1.19.2",
"@esri/arcgis-rest-common-types": "^1.19.2",
"@esri/arcgis-rest-common": "^1.19.2",
"@esri/arcgis-rest-geocoder": "^1.19.2",
"@esri/arcgis-rest-request": "^1.19.2",
"isomorphic-fetch": "^2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion demos/jsapi-integration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<script src="node_modules/@esri/arcgis-rest-request/dist/umd/request.umd.js"></script>
<script src="node_modules/@esri/arcgis-rest-auth/dist/umd/auth.umd.js"></script>
<script src="node_modules/@esri/arcgis-rest-items/dist/umd/items.umd.js"></script>
<script src="node_modules/@esri/arcgis-rest-portal/dist/umd/portal.umd.js"></script>

<!--
NOTE: rather than include the ArcGIS API for JavaScript via a <script> tag
Expand Down
2 changes: 1 addition & 1 deletion demos/jsapi-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "Apache-2.0",
"dependencies": {
"@esri/arcgis-rest-auth": "^1.19.2",
"@esri/arcgis-rest-items": "^1.19.2",
"@esri/arcgis-rest-portal": "^1.19.2",
"@esri/arcgis-rest-request": "^1.19.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion demos/node-cli-item-management/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require("isomorphic-form-data");
const prompts = require("prompts");
const chalk = require("chalk");
const { UserSession } = require("@esri/arcgis-rest-auth");
const { searchItems, removeItem } = require("@esri/arcgis-rest-items");
const { searchItems, removeItem } = require("@esri/arcgis-rest-portal");

// 1. Promt the user for sign in. Create a `UserSession`
authenticate()
Expand Down
2 changes: 1 addition & 1 deletion demos/node-cli-item-management/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"dependencies": {
"@esri/arcgis-rest-auth": "^1.19.2",
"@esri/arcgis-rest-items": "^1.19.2",
"@esri/arcgis-rest-portal": "^1.19.2",
"@esri/arcgis-rest-request": "^1.19.2",
"chalk": "^2.3.0",
"isomorphic-fetch": "^2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion demos/tree-shaking-rollup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"rollup-plugin-node-resolve": "^4.0.1"
},
"dependencies": {
"@esri/arcgis-rest-items": "^1.19.2",
"@esri/arcgis-rest-portal": "^1.19.2",
"@esri/arcgis-rest-request": "^1.19.2"
}
}
2 changes: 1 addition & 1 deletion demos/tree-shaking-rollup/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { searchItems } from "@esri/arcgis-rest-items";
import { searchItems } from "@esri/arcgis-rest-portal";

let element = document.createElement("div");
document.body.appendChild(element);
Expand Down
2 changes: 1 addition & 1 deletion demos/tree-shaking-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"webpack-cli": "^3.3.0"
},
"dependencies": {
"@esri/arcgis-rest-items": "^1.19.2",
"@esri/arcgis-rest-portal": "^1.19.2",
"@esri/arcgis-rest-request": "^1.19.2"
}
}
2 changes: 1 addition & 1 deletion demos/tree-shaking-webpack/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { searchItems } from "@esri/arcgis-rest-items";
import { searchItems } from "@esri/arcgis-rest-portal";

let element = document.createElement('div');
document.body.appendChild(element);
Expand Down
3 changes: 1 addition & 2 deletions demos/webmap-checker-sapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
},
"dependencies": {
"@esri/arcgis-rest-auth": "^1.19.2",
"@esri/arcgis-rest-items": "^1.19.2",
"@esri/arcgis-rest-portal": "^1.19.2",
"@esri/arcgis-rest-request": "^1.19.2",
"@esri/arcgis-rest-users": "^1.19.2",
"compression": "^1.7.1",
"cookies": "^0.7.3",
"dotenv": "^6.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>{item.title}</h2>

<script>
import { UserSession } from "@esri/arcgis-rest-auth";
import { getItem, getItemData } from "@esri/arcgis-rest-items";
import { getItem, getItemData } from "@esri/arcgis-rest-portal";
import { retryWithNewSession } from "../../utils.js";
import LayerStatus from "../../components/LayerStatus.html";
import WebMap from "../../components/WebMap.html";
Expand Down
2 changes: 1 addition & 1 deletion demos/webmap-checker-sapper/src/routes/webmaps/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h1>Webmaps</h1>

<script>
import { UserSession } from "@esri/arcgis-rest-auth";
import { searchItems } from "@esri/arcgis-rest-items";
import { searchItems } from "@esri/arcgis-rest-portal";
import { retryWithNewSession } from "../../utils.js";

export default {
Expand Down
2 changes: 1 addition & 1 deletion demos/webmap-checker-sapper/src/userInfoMiddleware.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getSelf } from "@esri/arcgis-rest-request";
// we could use UserSession.getUser() instead
import { getUser } from "@esri/arcgis-rest-users";
import { getUser } from "@esri/arcgis-rest-portal";

// this middleware checks for a session and if we find a session add
// additional info to that session from the getUser and getSelf calls
Expand Down
4 changes: 2 additions & 2 deletions packages/arcgis-rest-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"tslib": "^1.9.3"
},
"devDependencies": {
"@esri/arcgis-rest-common-types": "^1.19.2",
"@esri/arcgis-rest-common": "^1.19.2",
"@esri/arcgis-rest-request": "^1.19.2"
},
"peerDependencies": {
"@esri/arcgis-rest-common-types": "^1.19.2",
"@esri/arcgis-rest-common": "^1.19.2",
"@esri/arcgis-rest-request": "^1.19.2"
},
"scripts": {
Expand Down
20 changes: 10 additions & 10 deletions packages/arcgis-rest-auth/src/UserSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
} from "@esri/arcgis-rest-request";
import { generateToken } from "./generate-token";
import { fetchToken, IFetchTokenResponse } from "./fetch-token";
import { IUser } from "@esri/arcgis-rest-common-types";
import { IUser } from "@esri/arcgis-rest-common";

/**
* Internal utility for resolving a Promise from outside its constructor.
Expand Down Expand Up @@ -67,7 +67,7 @@ function defer<T>(): IDeferred<T> {
/**
* Options for static OAuth 2.0 helper methods on `UserSession`.
*/
export interface IOauth2Options {
export interface IOAuth2Options {
/**
* Client ID of your application. Can be obtained by registering an application
* on [ArcGIS for Developers](https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/signing-in-arcgis-online-users/#registering-your-application),
Expand Down Expand Up @@ -239,7 +239,7 @@ export class UserSession implements IAuthenticationManager {
* @browserOnly
*/
/* istanbul ignore next */
public static beginOAuth2(options: IOauth2Options, win: any = window) {
public static beginOAuth2(options: IOAuth2Options, win: any = window) {
const {
portal,
provider,
Expand All @@ -249,7 +249,7 @@ export class UserSession implements IAuthenticationManager {
popup,
state,
locale
}: IOauth2Options = {
}: IOAuth2Options = {
...{
portal: "https://www.arcgis.com/sharing/rest",
provider: "arcgis",
Expand Down Expand Up @@ -320,8 +320,8 @@ export class UserSession implements IAuthenticationManager {
* @browserOnly
*/
/* istanbul ignore next */
public static completeOAuth2(options: IOauth2Options, win: any = window) {
const { portal, clientId }: IOauth2Options = {
public static completeOAuth2(options: IOAuth2Options, win: any = window) {
const { portal, clientId }: IOAuth2Options = {
...{ portal: "https://www.arcgis.com/sharing/rest" },
...options
};
Expand Down Expand Up @@ -398,10 +398,10 @@ export class UserSession implements IAuthenticationManager {
* @nodeOnly
*/
public static authorize(
options: IOauth2Options,
options: IOAuth2Options,
response: http.ServerResponse
) {
const { portal, clientId, duration, redirectUri }: IOauth2Options = {
const { portal, clientId, duration, redirectUri }: IOAuth2Options = {
...{ portal: "https://arcgis.com/sharing/rest", duration: 20160 },
...options
};
Expand All @@ -422,10 +422,10 @@ export class UserSession implements IAuthenticationManager {
* @nodeOnly
*/
public static exchangeAuthorizationCode(
options: IOauth2Options,
options: IOAuth2Options,
authorizationCode: string
): Promise<UserSession> {
const { portal, clientId, redirectUri, refreshTokenTTL }: IOauth2Options = {
const { portal, clientId, redirectUri, refreshTokenTTL }: IOAuth2Options = {
...{
portal: "https://www.arcgis.com/sharing/rest",
refreshTokenTTL: 1440
Expand Down
66 changes: 0 additions & 66 deletions packages/arcgis-rest-common-types/README.md

This file was deleted.

48 changes: 0 additions & 48 deletions packages/arcgis-rest-common-types/package.json

This file was deleted.

Loading

0 comments on commit 9da67f8

Please sign in to comment.