Skip to content

Commit 64a3fd9

Browse files
committed
refactor: replace items, groups, sharing and user packages with single 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
1 parent f5a17b1 commit 64a3fd9

File tree

94 files changed

+160
-608
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+160
-608
lines changed

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ packages/*/debug/
7979
# no idea
8080
/packages/*/.rpt2_cache
8181

82-
# packages in development
83-
packages/arcgis-rest-portal/
84-
8582
#
8683
test.html
8784
test.js

README.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,7 @@ Some useful commands include:
7272
* [`@esri/arcgis-rest-request`](./packages/arcgis-rest-request/) - Underpins other packages and supports making low-level requests.
7373
* [`@esri/arcgis-rest-auth`](./packages/arcgis-rest-auth) - Provides methods for authenticating named users and applications.
7474
* [`@esri/arcgis-rest-common`](./packages/arcgis-rest-common-types) - - Stores shared methods and types used throughout the ArcGIS API.
75-
* [`@esri/arcgis-rest-items`](./packages/arcgis-rest-items) - Methods for working with ArcGIS Online/Enterprise content.
76-
* [`@esri/arcgis-rest-groups`](./packages/arcgis-rest-groups) - Methods for working with ArcGIS Online/Enterprise groups.
77-
* [`@esri/arcgis-rest-users`](./packages/arcgis-rest-users) - Methods for working with ArcGIS Online/Enterprise users.
78-
* [`@esri/arcgis-rest-sharing`](./packages/arcgis-rest-sharing) - Methods for updating permissions for ArcGIS Online/Enterprise content.
75+
* [`@esri/arcgis-rest-portal`](./packages/arcgis-rest-portal) - Methods for working with ArcGIS Online/Enterprise content and users.
7976
* [`@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.
8077
* [`@esri/arcgis-rest-geocoder`](./packages/arcgis-rest-geocoder) - Geocoding wrapper for `@esri/arcgis-rest-js`
8178
* [`@esri/arcgis-rest-routing`](./packages/arcgis-rest-routing) - Routing and directions wrapper for `@esri/arcgis-rest-js`.

demos/ago-node-cli/lib/item-export-command.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { getItem, getItemData } = require("@esri/arcgis-rest-items");
1+
const { getItem, getItemData } = require("@esri/arcgis-rest-portal");
22
const jsonfile = require('jsonfile');
33

44
module.exports = {

demos/ago-node-cli/lib/item-search-command.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
/**
33
* Bring in searchItems fn
44
*/
5-
const { searchItems } = require("@esri/arcgis-rest-items");
5+
const { searchItems } = require("@esri/arcgis-rest-portal");
66

77
module.exports = {
88
/**
99
* Execute the command
1010
*/
1111
execute: function (query) {
1212
// construct the search call..
13-
return searchItems({
13+
return searchItems({
1414
searchForm: {
1515
q: query,
1616
start: 1,

demos/ago-node-cli/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"license": "Apache-2.0",
2020
"dependencies": {
2121
"@esri/arcgis-rest-auth": "^1.19.2",
22-
"@esri/arcgis-rest-items": "^1.19.2",
22+
"@esri/arcgis-rest-portal": "^1.19.2",
2323
"@esri/arcgis-rest-request": "^1.19.2",
2424
"chalk": "^2.3.0",
2525
"commander": "^2.12.2",

demos/jsapi-integration/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

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

2525
<!--
2626
NOTE: rather than include the ArcGIS API for JavaScript via a <script> tag

demos/jsapi-integration/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "Apache-2.0",
88
"dependencies": {
99
"@esri/arcgis-rest-auth": "^1.19.2",
10-
"@esri/arcgis-rest-items": "^1.19.2",
10+
"@esri/arcgis-rest-portal": "^1.19.2",
1111
"@esri/arcgis-rest-request": "^1.19.2"
1212
},
1313
"devDependencies": {

demos/node-cli-item-management/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require("isomorphic-form-data");
33
const prompts = require("prompts");
44
const chalk = require("chalk");
55
const { UserSession } = require("@esri/arcgis-rest-auth");
6-
const { searchItems, removeItem } = require("@esri/arcgis-rest-items");
6+
const { searchItems, removeItem } = require("@esri/arcgis-rest-portal");
77

88
// 1. Promt the user for sign in. Create a `UserSession`
99
authenticate()

demos/node-cli-item-management/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"dependencies": {
1919
"@esri/arcgis-rest-auth": "^1.19.2",
20-
"@esri/arcgis-rest-items": "^1.19.2",
20+
"@esri/arcgis-rest-portal": "^1.19.2",
2121
"@esri/arcgis-rest-request": "^1.19.2",
2222
"chalk": "^2.3.0",
2323
"isomorphic-fetch": "^2.2.1",

demos/tree-shaking-rollup/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"rollup-plugin-node-resolve": "^4.0.1"
2020
},
2121
"dependencies": {
22-
"@esri/arcgis-rest-items": "^1.19.2",
22+
"@esri/arcgis-rest-portal": "^1.19.2",
2323
"@esri/arcgis-rest-request": "^1.19.2"
2424
}
2525
}

demos/tree-shaking-rollup/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { searchItems } from "@esri/arcgis-rest-items";
1+
import { searchItems } from "@esri/arcgis-rest-portal";
22

33
let element = document.createElement("div");
44
document.body.appendChild(element);

demos/tree-shaking-webpack/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"webpack-cli": "^3.3.0"
1919
},
2020
"dependencies": {
21-
"@esri/arcgis-rest-items": "^1.19.2",
21+
"@esri/arcgis-rest-portal": "^1.19.2",
2222
"@esri/arcgis-rest-request": "^1.19.2"
2323
}
2424
}

demos/tree-shaking-webpack/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { searchItems } from "@esri/arcgis-rest-items";
1+
import { searchItems } from "@esri/arcgis-rest-portal";
22

33
let element = document.createElement('div');
44
document.body.appendChild(element);

demos/webmap-checker-sapper/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
},
1515
"dependencies": {
1616
"@esri/arcgis-rest-auth": "^1.19.2",
17-
"@esri/arcgis-rest-items": "^1.19.2",
17+
"@esri/arcgis-rest-portal": "^1.19.2",
1818
"@esri/arcgis-rest-request": "^1.19.2",
19-
"@esri/arcgis-rest-users": "^1.19.2",
2019
"compression": "^1.7.1",
2120
"cookies": "^0.7.3",
2221
"dotenv": "^6.2.0",

demos/webmap-checker-sapper/src/routes/webmaps/[webmapId].html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h2>{item.title}</h2>
2121

2222
<script>
2323
import { UserSession } from "@esri/arcgis-rest-auth";
24-
import { getItem, getItemData } from "@esri/arcgis-rest-items";
24+
import { getItem, getItemData } from "@esri/arcgis-rest-portal";
2525
import { retryWithNewSession } from "../../utils.js";
2626
import LayerStatus from "../../components/LayerStatus.html";
2727
import WebMap from "../../components/WebMap.html";

demos/webmap-checker-sapper/src/routes/webmaps/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h1>Webmaps</h1>
1010

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

1616
export default {

demos/webmap-checker-sapper/src/userInfoMiddleware.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getSelf } from "@esri/arcgis-rest-request";
22
// we could use UserSession.getUser() instead
3-
import { getUser } from "@esri/arcgis-rest-users";
3+
import { getUser } from "@esri/arcgis-rest-portal";
44

55
// this middleware checks for a session and if we find a session add
66
// additional info to that session from the getUser and getSelf calls

packages/arcgis-rest-feature-service/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
"@esri/arcgis-rest-request": "^1.19.2",
2020
"@esri/arcgis-rest-common": "^1.19.2",
2121
"@esri/arcgis-rest-auth": "^1.19.2",
22-
"@esri/arcgis-rest-items": "^1.19.2"
22+
"@esri/arcgis-rest-portal": "^1.19.2"
2323

2424
},
2525
"peerDependencies": {
2626
"@esri/arcgis-rest-request": "^1.19.2",
2727
"@esri/arcgis-rest-common": "^1.19.2",
2828
"@esri/arcgis-rest-auth": "^1.19.2",
29-
"@esri/arcgis-rest-items": "^1.19.2"
29+
"@esri/arcgis-rest-portal": "^1.19.2"
3030
},
3131
"scripts": {
3232
"prepare": "npm run build",

packages/arcgis-rest-feature-service/src/admin/createServiceDefinition.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
moveItem,
77
IItemCrudRequestOptions,
88
determineOwner
9-
} from "@esri/arcgis-rest-items";
9+
} from "@esri/arcgis-rest-portal";
1010
import { IExtent, ISpatialReference } from "@esri/arcgis-rest-common";
1111

1212
/**

packages/arcgis-rest-feature-service/test/mocks/move.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
22
* Apache-2.0 */
33

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

66
export const MoveToFolderResponse: IItemMoveResponse = {
77
folder: "83216cba44bf4357bf06687ec88a847b",

packages/arcgis-rest-groups/README.md

-71
This file was deleted.

packages/arcgis-rest-groups/package.json

-64
This file was deleted.

packages/arcgis-rest-groups/src/index.ts

-12
This file was deleted.

packages/arcgis-rest-items/package-lock.json

-11
This file was deleted.

packages/arcgis-rest-items/src/index.ts

-11
This file was deleted.

packages/arcgis-rest-items/tsconfig.json

-6
This file was deleted.

0 commit comments

Comments
 (0)