Skip to content

Commit

Permalink
refactor: replace items, groups, sharing and user packages with singl…
Browse files Browse the repository at this point in the history
…e portal package

AFFECTS PACKAGES:
@esri/arcgis-rest-feature-service
node-cli
@esri/jsapi-integration
cli-item-management
@esri/arcgis-rest-tree-shaking-rollup
@esri/arcgis-rest-tree-shaking-webpack
sapper-webmap-checker

BREAKING CHANGE:
replace items, groups, sharing and user packages with single portal package
  • Loading branch information
jgravois committed Apr 12, 2019
1 parent f5a17b1 commit 64a3fd9
Show file tree
Hide file tree
Showing 94 changed files with 160 additions and 608 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
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ 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`](./packages/arcgis-rest-common-types) - - Stores shared methods and types used throughout 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-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-routing`](./packages/arcgis-rest-routing) - Routing and directions wrapper for `@esri/arcgis-rest-js`.
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/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-feature-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"@esri/arcgis-rest-request": "^1.19.2",
"@esri/arcgis-rest-common": "^1.19.2",
"@esri/arcgis-rest-auth": "^1.19.2",
"@esri/arcgis-rest-items": "^1.19.2"
"@esri/arcgis-rest-portal": "^1.19.2"

},
"peerDependencies": {
"@esri/arcgis-rest-request": "^1.19.2",
"@esri/arcgis-rest-common": "^1.19.2",
"@esri/arcgis-rest-auth": "^1.19.2",
"@esri/arcgis-rest-items": "^1.19.2"
"@esri/arcgis-rest-portal": "^1.19.2"
},
"scripts": {
"prepare": "npm run build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
moveItem,
IItemCrudRequestOptions,
determineOwner
} from "@esri/arcgis-rest-items";
} from "@esri/arcgis-rest-portal";
import { IExtent, ISpatialReference } from "@esri/arcgis-rest-common";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/arcgis-rest-feature-service/test/mocks/move.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
* Apache-2.0 */

import { IItemMoveResponse } from "@esri/arcgis-rest-items";
import { IItemMoveResponse } from "@esri/arcgis-rest-portal";

export const MoveToFolderResponse: IItemMoveResponse = {
folder: "83216cba44bf4357bf06687ec88a847b",
Expand Down
71 changes: 0 additions & 71 deletions packages/arcgis-rest-groups/README.md

This file was deleted.

64 changes: 0 additions & 64 deletions packages/arcgis-rest-groups/package.json

This file was deleted.

12 changes: 0 additions & 12 deletions packages/arcgis-rest-groups/src/index.ts

This file was deleted.

11 changes: 0 additions & 11 deletions packages/arcgis-rest-items/package-lock.json

This file was deleted.

11 changes: 0 additions & 11 deletions packages/arcgis-rest-items/src/index.ts

This file was deleted.

6 changes: 0 additions & 6 deletions packages/arcgis-rest-items/tsconfig.json

This file was deleted.

Loading

0 comments on commit 64a3fd9

Please sign in to comment.