@matdata/yasgui-utils 5.7.0 → 5.8.0
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 +157 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,13 +64,33 @@ YASGUI provides a complete SPARQL development environment with powerful features
|
|
|
64
64
|
### 🔧 Expert Features
|
|
65
65
|
- **[Multiple Tabs](./docs/user-guide.md#query-tabs)** - Work on multiple queries simultaneously
|
|
66
66
|
- **[Endpoint Management](./docs/user-guide.md#endpoint-quick-switch)** - Quick-switch between SPARQL endpoints
|
|
67
|
+
- **[Authentication Support](./docs/developer-guide.md#authentication)** - Basic Auth, Bearer Token, API Key, OAuth2
|
|
67
68
|
- **[Persistent Storage](./docs/user-guide.md#query-history-and-persistence)** - Auto-save queries and preferences
|
|
68
69
|
- **[URL Sharing](./docs/user-guide.md#share-queries)** - Share queries via URL parameters
|
|
69
70
|
- **[Fullscreen Mode](./docs/user-guide.md#fullscreen-mode)** - Maximize editor or results viewer
|
|
70
71
|
- **[Export Results](./docs/developer-guide.md#yasr-class)** - Download results in various formats
|
|
72
|
+
- **[Configuration Import/Export](./docs/user-guide.md#configuration-importexport)** - Backup and restore settings
|
|
71
73
|
|
|
72
74
|
For detailed feature documentation, see the **[User Guide](./docs/user-guide.md)**.
|
|
73
75
|
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Browser Support
|
|
79
|
+
|
|
80
|
+
YASGUI works on all modern browsers:
|
|
81
|
+
|
|
82
|
+
- ✅ Chrome / Edge (latest)
|
|
83
|
+
- ✅ Firefox (latest)
|
|
84
|
+
- ✅ Safari (latest)
|
|
85
|
+
- ✅ Opera (latest)
|
|
86
|
+
|
|
87
|
+
**Requirements:**
|
|
88
|
+
- JavaScript enabled
|
|
89
|
+
- Cookies/LocalStorage enabled (for query persistence)
|
|
90
|
+
- Modern ES6+ support
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
74
94
|
## Installation
|
|
75
95
|
|
|
76
96
|
### npm
|
|
@@ -94,17 +114,22 @@ yarn add @matdata/yasgui
|
|
|
94
114
|
|
|
95
115
|
### Docker
|
|
96
116
|
|
|
117
|
+
**Run with default endpoint:**
|
|
97
118
|
```bash
|
|
98
119
|
docker pull mathiasvda/yasgui:latest
|
|
99
120
|
docker run -p 8080:8080 mathiasvda/yasgui:latest
|
|
100
121
|
```
|
|
101
122
|
|
|
123
|
+
Access at: `http://localhost:8080`
|
|
124
|
+
|
|
102
125
|
**Custom endpoint:**
|
|
103
126
|
```bash
|
|
104
|
-
docker run -p 8080:8080
|
|
127
|
+
docker run -p 8080:8080 \
|
|
128
|
+
-e YASGUI_DEFAULT_ENDPOINT=https://your-endpoint.com/sparql \
|
|
129
|
+
mathiasvda/yasgui:latest
|
|
105
130
|
```
|
|
106
131
|
|
|
107
|
-
For detailed installation instructions and usage examples, see the **[Developer Guide](./docs/developer-guide.md#installation)**.
|
|
132
|
+
For detailed installation instructions and usage examples, see the **[Developer Guide](./docs/developer-guide.md#installation)** and **[User Guide - Docker](./docs/user-guide.md#running-yasgui-with-docker)**.
|
|
108
133
|
|
|
109
134
|
## Quick Start
|
|
110
135
|
|
|
@@ -146,10 +171,115 @@ const yasgui = new Yasgui(document.getElementById('yasgui'), {
|
|
|
146
171
|
});
|
|
147
172
|
```
|
|
148
173
|
|
|
174
|
+
### Authentication
|
|
175
|
+
|
|
176
|
+
YASGUI supports multiple authentication methods for secure SPARQL endpoints:
|
|
177
|
+
|
|
178
|
+
**Basic Authentication:**
|
|
179
|
+
```javascript
|
|
180
|
+
const yasgui = new Yasgui(document.getElementById('yasgui'), {
|
|
181
|
+
requestConfig: {
|
|
182
|
+
endpoint: 'https://secure-endpoint.com/sparql',
|
|
183
|
+
basicAuth: {
|
|
184
|
+
username: 'myuser',
|
|
185
|
+
password: 'mypassword'
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**Bearer Token (OAuth2/JWT):**
|
|
192
|
+
```javascript
|
|
193
|
+
const yasgui = new Yasgui(document.getElementById('yasgui'), {
|
|
194
|
+
requestConfig: {
|
|
195
|
+
endpoint: 'https://api.example.com/sparql',
|
|
196
|
+
bearerAuth: {
|
|
197
|
+
token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**API Key (Custom Headers):**
|
|
204
|
+
```javascript
|
|
205
|
+
const yasgui = new Yasgui(document.getElementById('yasgui'), {
|
|
206
|
+
requestConfig: {
|
|
207
|
+
endpoint: 'https://api.example.com/sparql',
|
|
208
|
+
apiKeyAuth: {
|
|
209
|
+
headerName: 'X-API-Key',
|
|
210
|
+
apiKey: 'your-api-key-here'
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Authentication can also be configured through the UI via the Settings modal (gear icon). For detailed authentication documentation including dynamic auth and OAuth2, see the **[Developer Guide - Authentication](./docs/developer-guide.md#authentication)**.
|
|
217
|
+
|
|
149
218
|
For framework-specific examples and advanced usage, see the **[Developer Guide](./docs/developer-guide.md#usage-examples)**.
|
|
150
219
|
|
|
151
220
|
---
|
|
152
221
|
|
|
222
|
+
## Configuration Options
|
|
223
|
+
|
|
224
|
+
YASGUI is highly configurable. Here are some common configuration options:
|
|
225
|
+
|
|
226
|
+
```javascript
|
|
227
|
+
const yasgui = new Yasgui(document.getElementById('yasgui'), {
|
|
228
|
+
// Request configuration
|
|
229
|
+
requestConfig: {
|
|
230
|
+
endpoint: 'https://dbpedia.org/sparql',
|
|
231
|
+
method: 'POST', // GET or POST
|
|
232
|
+
headers: { 'Custom-Header': 'value' }, // Custom HTTP headers
|
|
233
|
+
args: [{ name: 'param', value: 'val' }] // URL parameters
|
|
234
|
+
},
|
|
235
|
+
|
|
236
|
+
// UI configuration
|
|
237
|
+
theme: 'dark', // 'light' or 'dark'
|
|
238
|
+
orientation: 'horizontal', // 'horizontal' or 'vertical'
|
|
239
|
+
showSnippetsBar: true, // Show code snippets
|
|
240
|
+
|
|
241
|
+
// Persistence
|
|
242
|
+
persistenceId: 'my-yasgui-instance', // Custom storage ID
|
|
243
|
+
persistencyExpire: 7 * 24 * 60 * 60, // Storage expiration (7 days)
|
|
244
|
+
|
|
245
|
+
// Default query
|
|
246
|
+
yasqe: {
|
|
247
|
+
value: 'SELECT * WHERE { ?s ?p ?o } LIMIT 10'
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
For complete configuration options, see the **[Developer Guide - Configuration](./docs/developer-guide.md#configuration)**.
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Troubleshooting
|
|
257
|
+
|
|
258
|
+
### CORS Issues
|
|
259
|
+
|
|
260
|
+
If you encounter CORS errors when querying remote endpoints:
|
|
261
|
+
|
|
262
|
+
1. **Use a CORS proxy** - Set up a proxy server that adds CORS headers
|
|
263
|
+
2. **Configure the endpoint** - Some endpoints support CORS with proper configuration
|
|
264
|
+
3. **Server-side queries** - Execute queries server-side and display results client-side
|
|
265
|
+
|
|
266
|
+
See the **[User Guide - CORS Errors](./docs/user-guide.md#cors-errors)** for detailed solutions.
|
|
267
|
+
|
|
268
|
+
### Local Endpoint Access
|
|
269
|
+
|
|
270
|
+
To query local SPARQL endpoints from YASGUI:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
# Example: Running a local endpoint accessible to YASGUI
|
|
274
|
+
docker run -p 3030:3030 stain/jena-fuseki
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
Access at: `http://localhost:3030/dataset/sparql`
|
|
278
|
+
|
|
279
|
+
For more details, see **[User Guide - Querying Local Endpoints](./docs/user-guide.md#querying-local-endpoints)**.
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
153
283
|
## Contributing
|
|
154
284
|
|
|
155
285
|
We welcome contributions! To get started:
|
|
@@ -165,16 +295,40 @@ For detailed contribution guidelines, see the **[Developer Guide](./docs/develop
|
|
|
165
295
|
|
|
166
296
|
---
|
|
167
297
|
|
|
298
|
+
## Support & Community
|
|
299
|
+
|
|
300
|
+
### Getting Help
|
|
301
|
+
|
|
302
|
+
- 📖 **[User Guide](./docs/user-guide.md)** - Comprehensive usage documentation
|
|
303
|
+
- 🛠️ **[Developer Guide](./docs/developer-guide.md)** - API reference and integration
|
|
304
|
+
- 🐛 **[Issue Tracker](https://github.com/Matdata-eu/Yasgui/issues)** - Report bugs or request features
|
|
305
|
+
- 💬 **[Discussions](https://github.com/Matdata-eu/Yasgui/discussions)** - Ask questions and share ideas
|
|
306
|
+
|
|
307
|
+
### Reporting Issues
|
|
308
|
+
|
|
309
|
+
When reporting issues, please include:
|
|
310
|
+
- Browser version and operating system
|
|
311
|
+
- Steps to reproduce the problem
|
|
312
|
+
- Expected vs. actual behavior
|
|
313
|
+
- Console errors (if any)
|
|
314
|
+
- Minimal example query demonstrating the issue
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
168
318
|
## License
|
|
169
319
|
|
|
170
320
|
MIT License - see [LICENSE](./LICENSE) file for details.
|
|
171
321
|
|
|
322
|
+
### Credits
|
|
323
|
+
|
|
172
324
|
This is a fork from [Zazuko](https://github.com/zazuko/Yasgui) who forked it from [Triply](https://github.com/TriplyDB/Yasgui).
|
|
173
325
|
|
|
326
|
+
**Maintained by:** [Matdata](https://matdata.eu)
|
|
327
|
+
|
|
174
328
|
---
|
|
175
329
|
|
|
176
330
|
## Release Notes & Changelog
|
|
177
331
|
|
|
178
332
|
Release notes and changelog are available in the [Releases](https://github.com/Matdata-eu/Yasgui/releases) section.
|
|
179
333
|
|
|
180
|
-
For instructions on writing release notes, see [
|
|
334
|
+
For instructions on writing release notes, see [release-note-instructions.md](./docs/release-note-instructions.md).
|