|
71 | 71 | "onCommand:mdb.removeConnection",
|
72 | 72 | "onCommand:mdb.openMongoDBShell",
|
73 | 73 | "onView:mongoDB",
|
| 74 | + "onView:mongoDBConnectionExplorer", |
| 75 | + "onView:mongoDBPlaygroundsExplorer", |
74 | 76 | "onLanguage:json",
|
75 | 77 | "onLanguage:mongodb"
|
76 | 78 | ],
|
|
87 | 89 | "views": {
|
88 | 90 | "mongoDB": [
|
89 | 91 | {
|
90 |
| - "id": "mongoDB", |
91 |
| - "name": "MongoDB", |
92 |
| - "when": "config.mdb.show == true" |
| 92 | + "id": "mongoDBConnectionExplorer", |
| 93 | + "name": "Connections", |
| 94 | + "when": "config.mdb.showMongoDBConnectionExplorer == true" |
| 95 | + }, |
| 96 | + { |
| 97 | + "id": "mongoDBPlaygroundsExplorer", |
| 98 | + "name": "Playgrounds", |
| 99 | + "when": "config.mdb.showMongoDBPlaygrounds == true" |
93 | 100 | }
|
94 | 101 | ]
|
95 | 102 | },
|
96 | 103 | "viewsWelcome": [
|
97 | 104 | {
|
98 |
| - "view": "mongoDB", |
| 105 | + "view": "mongoDBConnectionExplorer", |
99 | 106 | "contents": "No connections found.\n[Add Connection](command:mdb.connect)"
|
| 107 | + }, |
| 108 | + { |
| 109 | + "view": "mongoDBPlaygroundsExplorer", |
| 110 | + "contents": "No '.mongodb' playground files found in the workspace.\n[Create New Playground](command:mdb.createNewPlaygroundFromPlaygroundExplorer)" |
100 | 111 | }
|
101 | 112 | ],
|
102 | 113 | "languages": [
|
|
168 | 179 | "command": "mdb.createPlayground",
|
169 | 180 | "title": "MongoDB: Create MongoDB Playground"
|
170 | 181 | },
|
| 182 | + { |
| 183 | + "command": "mdb.refreshPlaygrounds", |
| 184 | + "title": "MongoDB: Refresh Playgrounds List" |
| 185 | + }, |
| 186 | + { |
| 187 | + "command": "mdb.refreshPlaygroundsFromTreeView", |
| 188 | + "title": "Refresh" |
| 189 | + }, |
171 | 190 | {
|
172 | 191 | "command": "mdb.createNewPlaygroundFromViewAction",
|
173 | 192 | "title": "Create MongoDB Playground"
|
174 | 193 | },
|
| 194 | + { |
| 195 | + "command": "mdb.createNewPlaygroundFromPlaygroundExplorer", |
| 196 | + "title": "Create MongoDB Playground" |
| 197 | + }, |
175 | 198 | {
|
176 | 199 | "command": "mdb.changeActiveConnection",
|
177 | 200 | "title": "MongoDB: Change Active Connection"
|
|
236 | 259 | "dark": "images/dark/search-regular.svg"
|
237 | 260 | }
|
238 | 261 | },
|
| 262 | + { |
| 263 | + "command": "mdb.openPlaygroundFromTreeItem", |
| 264 | + "title": "Open Playground" |
| 265 | + }, |
239 | 266 | {
|
240 | 267 | "command": "mdb.connectToConnectionTreeItem",
|
241 | 268 | "title": "Connect"
|
|
317 | 344 | "view/title": [
|
318 | 345 | {
|
319 | 346 | "command": "mdb.createNewPlaygroundFromViewAction",
|
320 |
| - "when": "view == mongoDB" |
| 347 | + "when": "view == mongoDBPlaygroundsExplorer" |
| 348 | + }, |
| 349 | + { |
| 350 | + "command": "mdb.refreshPlaygroundsFromTreeView", |
| 351 | + "when": "view == mongoDBPlaygroundsExplorer" |
321 | 352 | },
|
322 | 353 | {
|
323 | 354 | "command": "mdb.addConnection",
|
324 |
| - "when": "view == mongoDB" |
| 355 | + "when": "view == mongoDBConnectionExplorer" |
325 | 356 | },
|
326 | 357 | {
|
327 | 358 | "command": "mdb.addConnectionWithURI",
|
328 |
| - "when": "view == mongoDB" |
| 359 | + "when": "view == mongoDBConnectionExplorer" |
329 | 360 | }
|
330 | 361 | ],
|
331 | 362 | "view/item/context": [
|
332 |
| - { |
333 |
| - "command": "mdb.addConnection", |
334 |
| - "when": "view == mongoDB && viewItem == mdbConnectionsTreeItem", |
335 |
| - "group": "inline" |
336 |
| - }, |
337 |
| - { |
338 |
| - "command": "mdb.addConnection", |
339 |
| - "when": "view == mongoDB && viewItem == mdbConnectionsTreeItem" |
340 |
| - }, |
341 |
| - { |
342 |
| - "command": "mdb.addConnectionWithURI", |
343 |
| - "when": "view == mongoDB && viewItem == mdbConnectionsTreeItem" |
344 |
| - }, |
345 | 363 | {
|
346 | 364 | "command": "mdb.addDatabase",
|
347 |
| - "when": "view == mongoDB && viewItem == connectedConnectionTreeItem", |
| 365 | + "when": "view == mongoDBConnectionExplorer && viewItem == connectedConnectionTreeItem", |
348 | 366 | "group": "inline"
|
349 | 367 | },
|
350 | 368 | {
|
351 | 369 | "command": "mdb.addDatabase",
|
352 |
| - "when": "view == mongoDB && viewItem == connectedConnectionTreeItem", |
| 370 | + "when": "view == mongoDBConnectionExplorer && viewItem == connectedConnectionTreeItem", |
353 | 371 | "group": "1@1"
|
354 | 372 | },
|
355 | 373 | {
|
356 | 374 | "command": "mdb.refreshConnection",
|
357 |
| - "when": "view == mongoDB && viewItem == connectedConnectionTreeItem", |
| 375 | + "when": "view == mongoDBConnectionExplorer && viewItem == connectedConnectionTreeItem", |
358 | 376 | "group": "1@2"
|
359 | 377 | },
|
360 | 378 | {
|
361 | 379 | "command": "mdb.treeViewOpenMongoDBShell",
|
362 |
| - "when": "view == mongoDB && viewItem == connectedConnectionTreeItem", |
| 380 | + "when": "view == mongoDBConnectionExplorer && viewItem == connectedConnectionTreeItem", |
363 | 381 | "group": "2@1"
|
364 | 382 | },
|
365 | 383 | {
|
366 | 384 | "command": "mdb.renameConnection",
|
367 |
| - "when": "view == mongoDB && viewItem == connectedConnectionTreeItem", |
| 385 | + "when": "view == mongoDBConnectionExplorer && viewItem == connectedConnectionTreeItem", |
368 | 386 | "group": "3@1"
|
369 | 387 | },
|
370 | 388 | {
|
371 | 389 | "command": "mdb.copyConnectionString",
|
372 |
| - "when": "view == mongoDB && viewItem == connectedConnectionTreeItem", |
| 390 | + "when": "view == mongoDBConnectionExplorer && viewItem == connectedConnectionTreeItem", |
373 | 391 | "group": "4@1"
|
374 | 392 | },
|
375 | 393 | {
|
376 | 394 | "command": "mdb.disconnectFromConnectionTreeItem",
|
377 |
| - "when": "view == mongoDB && viewItem == connectedConnectionTreeItem", |
| 395 | + "when": "view == mongoDBConnectionExplorer && viewItem == connectedConnectionTreeItem", |
378 | 396 | "group": "5@1"
|
379 | 397 | },
|
380 | 398 | {
|
381 | 399 | "command": "mdb.treeItemRemoveConnection",
|
382 |
| - "when": "view == mongoDB && viewItem == connectedConnectionTreeItem", |
| 400 | + "when": "view == mongoDBConnectionExplorer && viewItem == connectedConnectionTreeItem", |
383 | 401 | "group": "5@2"
|
384 | 402 | },
|
| 403 | + { |
| 404 | + "command": "mdb.openPlaygroundFromTreeItem", |
| 405 | + "when": "view == mongoDBPlaygroundsExplorer && viewItem == playgroundsTreeItem", |
| 406 | + "group": "1@1" |
| 407 | + }, |
385 | 408 | {
|
386 | 409 | "command": "mdb.connectToConnectionTreeItem",
|
387 |
| - "when": "view == mongoDB && viewItem == disconnectedConnectionTreeItem", |
| 410 | + "when": "view == mongoDBConnectionExplorer && viewItem == disconnectedConnectionTreeItem", |
388 | 411 | "group": "1@1"
|
389 | 412 | },
|
390 | 413 | {
|
391 | 414 | "command": "mdb.renameConnection",
|
392 |
| - "when": "view == mongoDB && viewItem == disconnectedConnectionTreeItem", |
| 415 | + "when": "view == mongoDBConnectionExplorer && viewItem == disconnectedConnectionTreeItem", |
393 | 416 | "group": "2@1"
|
394 | 417 | },
|
395 | 418 | {
|
396 | 419 | "command": "mdb.copyConnectionString",
|
397 |
| - "when": "view == mongoDB && viewItem == disconnectedConnectionTreeItem", |
| 420 | + "when": "view == mongoDBConnectionExplorer && viewItem == disconnectedConnectionTreeItem", |
398 | 421 | "group": "3@1"
|
399 | 422 | },
|
400 | 423 | {
|
401 | 424 | "command": "mdb.treeItemRemoveConnection",
|
402 |
| - "when": "view == mongoDB && viewItem == disconnectedConnectionTreeItem", |
| 425 | + "when": "view == mongoDBConnectionExplorer && viewItem == disconnectedConnectionTreeItem", |
403 | 426 | "group": "4@1"
|
404 | 427 | },
|
405 | 428 | {
|
406 | 429 | "command": "mdb.addCollection",
|
407 |
| - "when": "view == mongoDB && viewItem == databaseTreeItem", |
| 430 | + "when": "view == mongoDBConnectionExplorer && viewItem == databaseTreeItem", |
408 | 431 | "group": "inline"
|
409 | 432 | },
|
410 | 433 | {
|
411 | 434 | "command": "mdb.addCollection",
|
412 |
| - "when": "view == mongoDB && viewItem == databaseTreeItem", |
| 435 | + "when": "view == mongoDBConnectionExplorer && viewItem == databaseTreeItem", |
413 | 436 | "group": "1@1"
|
414 | 437 | },
|
415 | 438 | {
|
416 | 439 | "command": "mdb.refreshDatabase",
|
417 |
| - "when": "view == mongoDB && viewItem == databaseTreeItem", |
| 440 | + "when": "view == mongoDBConnectionExplorer && viewItem == databaseTreeItem", |
418 | 441 | "group": "1@2"
|
419 | 442 | },
|
420 | 443 | {
|
421 | 444 | "command": "mdb.copyDatabaseName",
|
422 |
| - "when": "view == mongoDB && viewItem == databaseTreeItem", |
| 445 | + "when": "view == mongoDBConnectionExplorer && viewItem == databaseTreeItem", |
423 | 446 | "group": "2@1"
|
424 | 447 | },
|
425 | 448 | {
|
426 | 449 | "command": "mdb.dropDatabase",
|
427 |
| - "when": "view == mongoDB && viewItem == databaseTreeItem", |
| 450 | + "when": "view == mongoDBConnectionExplorer && viewItem == databaseTreeItem", |
428 | 451 | "group": "3@1"
|
429 | 452 | },
|
430 | 453 | {
|
431 | 454 | "command": "mdb.viewCollectionDocuments",
|
432 |
| - "when": "view == mongoDB && viewItem == collectionTreeItem", |
| 455 | + "when": "view == mongoDBConnectionExplorer && viewItem == collectionTreeItem", |
433 | 456 | "group": "1@1"
|
434 | 457 | },
|
435 | 458 | {
|
436 | 459 | "command": "mdb.refreshCollection",
|
437 |
| - "when": "view == mongoDB && viewItem == collectionTreeItem", |
| 460 | + "when": "view == mongoDBConnectionExplorer && viewItem == collectionTreeItem", |
438 | 461 | "group": "1@2"
|
439 | 462 | },
|
440 | 463 | {
|
441 | 464 | "command": "mdb.copyCollectionName",
|
442 |
| - "when": "view == mongoDB && viewItem == collectionTreeItem", |
| 465 | + "when": "view == mongoDBConnectionExplorer && viewItem == collectionTreeItem", |
443 | 466 | "group": "2@1"
|
444 | 467 | },
|
445 | 468 | {
|
446 | 469 | "command": "mdb.dropCollection",
|
447 |
| - "when": "view == mongoDB && viewItem == collectionTreeItem", |
| 470 | + "when": "view == mongoDBConnectionExplorer && viewItem == collectionTreeItem", |
448 | 471 | "group": "3@1"
|
449 | 472 | },
|
450 | 473 | {
|
451 | 474 | "command": "mdb.searchForDocuments",
|
452 |
| - "when": "view == mongoDB && viewItem == documentListTreeItem", |
| 475 | + "when": "view == mongoDBConnectionExplorer && viewItem == documentListTreeItem", |
453 | 476 | "group": "inline"
|
454 | 477 | },
|
455 | 478 | {
|
456 | 479 | "command": "mdb.viewCollectionDocuments",
|
457 |
| - "when": "view == mongoDB && viewItem == documentListTreeItem", |
458 |
| - "group": "1@1" |
| 480 | + "when": "view == mongoDBConnectionExplorer && viewItem == documentListTreeItem" |
459 | 481 | },
|
460 | 482 | {
|
461 | 483 | "command": "mdb.refreshDocumentList",
|
462 |
| - "when": "view == mongoDB && viewItem == documentListTreeItem", |
463 |
| - "group": "1@2" |
| 484 | + "when": "view == mongoDBConnectionExplorer && viewItem == documentListTreeItem" |
464 | 485 | },
|
465 | 486 | {
|
466 | 487 | "command": "mdb.searchForDocuments",
|
467 |
| - "when": "view == mongoDB && viewItem == documentListTreeItem", |
| 488 | + "when": "view == mongoDBConnectionExplorer && viewItem == documentListTreeItem", |
468 | 489 | "group": "2@1"
|
469 | 490 | },
|
470 | 491 | {
|
471 | 492 | "command": "mdb.refreshSchema",
|
472 |
| - "when": "view == mongoDB && viewItem == schemaTreeItem" |
| 493 | + "when": "view == mongoDBConnectionExplorer && viewItem == schemaTreeItem" |
473 | 494 | },
|
474 | 495 | {
|
475 | 496 | "command": "mdb.copySchemaFieldName",
|
476 |
| - "when": "view == mongoDB && viewItem == fieldTreeItem" |
| 497 | + "when": "view == mongoDBConnectionExplorer && viewItem == fieldTreeItem" |
477 | 498 | },
|
478 | 499 | {
|
479 | 500 | "command": "mdb.createIndexFromTreeView",
|
480 |
| - "when": "view == mongoDB && viewItem == indexListTreeItem", |
| 501 | + "when": "view == mongoDBConnectionExplorer && viewItem == indexListTreeItem", |
481 | 502 | "group": "inline"
|
482 | 503 | },
|
483 | 504 | {
|
484 | 505 | "command": "mdb.refreshIndexes",
|
485 |
| - "when": "view == mongoDB && viewItem == indexListTreeItem" |
| 506 | + "when": "view == mongoDBConnectionExplorer && viewItem == indexListTreeItem" |
486 | 507 | },
|
487 | 508 | {
|
488 | 509 | "command": "mdb.createIndexFromTreeView",
|
489 |
| - "when": "view == mongoDB && viewItem == indexListTreeItem" |
| 510 | + "when": "view == mongoDBConnectionExplorer && viewItem == indexListTreeItem" |
490 | 511 | }
|
491 | 512 | ],
|
492 | 513 | "editor/title": [
|
|
497 | 518 | }
|
498 | 519 | ],
|
499 | 520 | "commandPalette": [
|
| 521 | + { |
| 522 | + "command": "mdb.refreshPlaygroundsFromTreeView", |
| 523 | + "when": "false" |
| 524 | + }, |
500 | 525 | {
|
501 | 526 | "command": "mdb.searchForDocuments",
|
502 | 527 | "when": "false"
|
|
513 | 538 | "command": "mdb.createNewPlaygroundFromViewAction",
|
514 | 539 | "when": "false"
|
515 | 540 | },
|
| 541 | + { |
| 542 | + "command": "mdb.createNewPlaygroundFromPlaygroundExplorer", |
| 543 | + "when": "false" |
| 544 | + }, |
516 | 545 | {
|
517 | 546 | "command": "mdb.changeActiveConnection",
|
518 | 547 | "when": "false"
|
|
533 | 562 | "command": "mdb.addDatabase",
|
534 | 563 | "when": "false"
|
535 | 564 | },
|
| 565 | + { |
| 566 | + "command": "mdb.openPlaygroundFromTreeItem", |
| 567 | + "when": "false" |
| 568 | + }, |
536 | 569 | {
|
537 | 570 | "command": "mdb.connectToConnectionTreeItem",
|
538 | 571 | "when": "false"
|
|
659 | 692 | "default": "mongo",
|
660 | 693 | "description": "The MongoDB shell to use."
|
661 | 694 | },
|
662 |
| - "mdb.show": { |
| 695 | + "mdb.showMongoDBConnectionExplorer": { |
| 696 | + "type": "boolean", |
| 697 | + "default": true, |
| 698 | + "description": "Show or hide the MongoDB connections view." |
| 699 | + }, |
| 700 | + "mdb.showMongoDBPlaygrounds": { |
663 | 701 | "type": "boolean",
|
664 | 702 | "default": true,
|
665 |
| - "description": "Show or hide the MongoDB view." |
| 703 | + "description": "Show or hide the MongoDB playgrounds view." |
| 704 | + }, |
| 705 | + "mdb.excludeFromPlaygroundsSearch": { |
| 706 | + "type": "array", |
| 707 | + "items": { |
| 708 | + "type": "string" |
| 709 | + }, |
| 710 | + "description": "Files and folders to exclude while searching for playground in the the current workspace.", |
| 711 | + "default": [ |
| 712 | + "**/.!(todo|todos|task|tasks)/**", |
| 713 | + "**/_output/**", |
| 714 | + "**/bower_components/**", |
| 715 | + "**/build/**", |
| 716 | + "**/dist/**", |
| 717 | + "**/node_modules/**", |
| 718 | + "**/out/**", |
| 719 | + "**/output/**", |
| 720 | + "**/release/**", |
| 721 | + "**/releases/**", |
| 722 | + "**/static/**", |
| 723 | + "**/target/**", |
| 724 | + "**/third_party/**", |
| 725 | + "**/vendor/**" |
| 726 | + ] |
666 | 727 | },
|
667 | 728 | "mdb.defaultLimit": {
|
668 | 729 | "type": "number",
|
|
723 | 784 | "debug": "^4.1.1",
|
724 | 785 | "dotenv": "^8.2.0",
|
725 | 786 | "encoding": "^0.1.12",
|
| 787 | + "micromatch": "^4.0.2", |
726 | 788 | "mongodb-cloud-info": "^1.1.2",
|
727 | 789 | "mongodb-connection-model": "^16.1.4",
|
728 | 790 | "mongodb-data-service": "^16.8.1",
|
|
0 commit comments