@geosynk/vertigis-web-sdk 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -177,7 +177,7 @@ This SDK includes an automated configuration wizard that sets up seamless OAuth
|
|
|
177
177
|
3. Under **Redirect URIs**, add the following development endpoints:
|
|
178
178
|
- `https://localtest.me:3001`
|
|
179
179
|
- `https://localtest.me:3001/oauth_callback.html`
|
|
180
|
-
4. Copy the generated **
|
|
180
|
+
4. Copy the generated **Client ID** (App ID) (e.g., `myClientId123`).
|
|
181
181
|
|
|
182
182
|
#### Step 2: Run the Automated Portal Configurator
|
|
183
183
|
Run the interactive configurator in your project:
|
|
@@ -186,7 +186,7 @@ npm run auth:portal
|
|
|
186
186
|
```
|
|
187
187
|
You will be prompted for:
|
|
188
188
|
- **Portal URL** `[Required]`: Your Enterprise Portal instance (e.g., `https://gis.{org}.com/portal`).
|
|
189
|
-
- **
|
|
189
|
+
- **Client ID** `[Required]`: The OAuth Application Client ID obtained from Step 1.
|
|
190
190
|
- **Account ID** `[Optional]`: Organization identifier (e.g., `{org}` or `enterprise`).
|
|
191
191
|
- **Web Map Item ID or URL** `[Optional]`: If provided, automatically updates `webMap` in `app/app.json`. If omitted, your current `app.json` remains untouched.
|
|
192
192
|
|
|
@@ -195,14 +195,15 @@ Or execute directly via non-interactive CLI flags:
|
|
|
195
195
|
# Minimal (configures Portal OAuth, leaves current app.json untouched):
|
|
196
196
|
npm run auth:portal -- \
|
|
197
197
|
--portal https://gis.{org}.com/portal \
|
|
198
|
-
--
|
|
198
|
+
--client-id myClientId123
|
|
199
199
|
|
|
200
200
|
# Full (configures Portal OAuth AND updates app.json web map):
|
|
201
201
|
npm run auth:portal -- \
|
|
202
202
|
--portal https://gis.{org}.com/portal \
|
|
203
|
-
--
|
|
203
|
+
--client-id myClientId123 \
|
|
204
204
|
--webmap 4f970e5d0a684b0f9f30cf00fa0119e6
|
|
205
205
|
```
|
|
206
|
+
*(Note: `--app-id` and `--clientId` are also supported as aliases).*
|
|
206
207
|
|
|
207
208
|
#### Step 3: Start Development Server
|
|
208
209
|
```bash
|
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@ Usage:
|
|
|
26
26
|
|
|
27
27
|
Options:
|
|
28
28
|
--portal <url> [Required] ArcGIS Enterprise Portal or AGOL URL (e.g. https://gis.{org}.com/portal)
|
|
29
|
-
--
|
|
29
|
+
--client-id <id> [Required] Portal OAuth Application Client ID
|
|
30
30
|
--account-id <id> [Optional] Account ID / Org slug (default: derived from hostname or "enterprise")
|
|
31
31
|
--webmap <id-or-url> [Optional] Web Map Item ID or full URL to update in app.json
|
|
32
32
|
--reset Revert back to public sample ArcGIS Online map and disable portal auth
|
|
@@ -37,7 +37,7 @@ Examples:
|
|
|
37
37
|
npm run auth:portal
|
|
38
38
|
|
|
39
39
|
Direct CLI Mode:
|
|
40
|
-
npm run auth:portal -- --portal https://gis.
|
|
40
|
+
npm run auth:portal -- --portal https://gis.{org}.com/portal --client-id myClientId123
|
|
41
41
|
|
|
42
42
|
Reset to Defaults:
|
|
43
43
|
npm run auth:portal -- --reset
|
|
@@ -107,7 +107,7 @@ async function main() {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
let portalUrl = getArgValue("--portal");
|
|
110
|
-
let appId = getArgValue("--
|
|
110
|
+
let appId = getArgValue("--client-id") || getArgValue("--clientId") || getArgValue("--app-id");
|
|
111
111
|
let accountId = getArgValue("--account-id");
|
|
112
112
|
let webMap = getArgValue("--webmap") || getArgValue("--webMap");
|
|
113
113
|
|
|
@@ -138,12 +138,12 @@ async function main() {
|
|
|
138
138
|
|
|
139
139
|
appId = appId || await prompt(
|
|
140
140
|
rl,
|
|
141
|
-
"Portal OAuth Application
|
|
142
|
-
existingConfig.appId || ""
|
|
141
|
+
"Portal OAuth Application Client ID",
|
|
142
|
+
existingConfig.clientId || existingConfig.appId || ""
|
|
143
143
|
);
|
|
144
144
|
|
|
145
145
|
if (!appId) {
|
|
146
|
-
console.error("\n✖ Error:
|
|
146
|
+
console.error("\n✖ Error: Client ID is required to configure OAuth.");
|
|
147
147
|
rl.close();
|
|
148
148
|
process.exit(1);
|
|
149
149
|
}
|
|
@@ -253,7 +253,7 @@ async function main() {
|
|
|
253
253
|
console.log(" [SUCCESS] ArcGIS Enterprise Portal Authentication Configured!");
|
|
254
254
|
console.log("================================================================================");
|
|
255
255
|
console.log(` - Portal: ${portalUrl}`);
|
|
256
|
-
console.log(` -
|
|
256
|
+
console.log(` - Client ID: ${appId}`);
|
|
257
257
|
console.log(` - Account ID: ${accountId}`);
|
|
258
258
|
if (webMap) {
|
|
259
259
|
console.log(` - Web Map: ${webMap}`);
|