claude-flow-novice 2.0.4 → 2.0.5
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/dist/src/cli/commands/guidance.js +668 -487
- package/dist/src/cli/commands/index-validate.js +29 -18
- package/dist/src/cli/commands/mcp-troubleshoot.js +282 -230
- package/dist/src/cli/commands/neural-goal-init.js +125 -92
- package/dist/src/cli/commands/swarm-exec.js +393 -317
- package/dist/src/cli/commands/validate-framework.js +1100 -983
- package/dist/src/cli/commands/validate.js +223 -144
- package/dist/src/cli/main.js +1 -1
- package/dist/src/cli/simple-commands/__tests__/agent.test.js +277 -265
- package/dist/src/cli/simple-commands/__tests__/memory.test.js +7 -6
- package/dist/src/cli/simple-commands/__tests__/swarm.test.js +356 -373
- package/dist/src/cli/simple-commands/__tests__/task.test.js +7 -6
- package/dist/src/cli/simple-commands/agent.js +193 -157
- package/dist/src/cli/simple-commands/analysis.js +446 -336
- package/dist/src/cli/simple-commands/automation-executor.js +1339 -1095
- package/dist/src/cli/simple-commands/automation.js +469 -481
- package/dist/src/cli/simple-commands/batch-manager.js +313 -261
- package/dist/src/cli/simple-commands/claude-telemetry.js +267 -241
- package/dist/src/cli/simple-commands/claude-track.js +90 -68
- package/dist/src/cli/simple-commands/concurrent-display.js +320 -266
- package/dist/src/cli/simple-commands/config.js +290 -245
- package/dist/src/cli/simple-commands/coordination.js +234 -182
- package/dist/src/cli/simple-commands/enhanced-ui-views.js +615 -812
- package/dist/src/cli/simple-commands/enhanced-webui-complete.js +981 -922
- package/dist/src/cli/simple-commands/fix-hook-variables.js +294 -274
- package/dist/src/cli/simple-commands/github/gh-coordinator.js +457 -378
- package/dist/src/cli/simple-commands/github/github-api.js +574 -535
- package/dist/src/cli/simple-commands/github/init.js +303 -276
- package/dist/src/cli/simple-commands/github.js +247 -222
- package/dist/src/cli/simple-commands/goal.js +63 -51
- package/dist/src/cli/simple-commands/hive-mind/auto-save-middleware.js +278 -208
- package/dist/src/cli/simple-commands/hive-mind/communication.js +696 -601
- package/dist/src/cli/simple-commands/hive-mind/core.js +979 -907
- package/dist/src/cli/simple-commands/hive-mind/db-optimizer.js +655 -406
- package/dist/src/cli/simple-commands/hive-mind/mcp-wrapper.js +1245 -1125
- package/dist/src/cli/simple-commands/hive-mind/memory.js +1090 -854
- package/dist/src/cli/simple-commands/hive-mind/performance-optimizer.js +574 -459
- package/dist/src/cli/simple-commands/hive-mind/performance-test.js +347 -263
- package/dist/src/cli/simple-commands/hive-mind/queen.js +768 -727
- package/dist/src/cli/simple-commands/hive-mind/session-manager.js +1049 -745
- package/dist/src/cli/simple-commands/hive-mind-optimize.js +283 -227
- package/dist/src/cli/simple-commands/hive-mind-wizard.js +217 -174
- package/dist/src/cli/simple-commands/hive-mind.js +2282 -1841
- package/dist/src/cli/simple-commands/hive.js +79 -90
- package/dist/src/cli/simple-commands/hook-safety.js +521 -431
- package/dist/src/cli/simple-commands/hooks/session-start-soul.js +254 -203
- package/dist/src/cli/simple-commands/hooks.js +1204 -1064
- package/dist/src/cli/simple-commands/init/agent-copier.js +319 -294
- package/dist/src/cli/simple-commands/init/batch-init.js +562 -496
- package/dist/src/cli/simple-commands/init/claude-commands/claude-flow-commands.js +19 -13
- package/dist/src/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +19 -13
- package/dist/src/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +88 -61
- package/dist/src/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +150 -125
- package/dist/src/cli/simple-commands/init/claude-commands/slash-commands.js +49 -42
- package/dist/src/cli/simple-commands/init/claude-commands/sparc-commands.js +61 -43
- package/dist/src/cli/simple-commands/init/copy-revised-templates.js +147 -141
- package/dist/src/cli/simple-commands/init/executable-wrapper.js +44 -31
- package/dist/src/cli/simple-commands/init/gitignore-updater.js +90 -64
- package/dist/src/cli/simple-commands/init/help.js +107 -104
- package/dist/src/cli/simple-commands/init/hive-mind-init.js +528 -509
- package/dist/src/cli/simple-commands/init/index.js +1759 -1510
- package/dist/src/cli/simple-commands/init/performance-monitor.js +317 -234
- package/dist/src/cli/simple-commands/init/rollback/backup-manager.js +504 -441
- package/dist/src/cli/simple-commands/init/rollback/index.js +364 -289
- package/dist/src/cli/simple-commands/init/rollback/recovery-manager.js +728 -652
- package/dist/src/cli/simple-commands/init/rollback/rollback-executor.js +481 -416
- package/dist/src/cli/simple-commands/init/rollback/state-tracker.js +448 -369
- package/dist/src/cli/simple-commands/init/sparc/roo-readme.js +2 -1
- package/dist/src/cli/simple-commands/init/sparc/roomodes-config.js +99 -122
- package/dist/src/cli/simple-commands/init/sparc/workflows.js +37 -32
- package/dist/src/cli/simple-commands/init/sparc-structure.js +62 -55
- package/dist/src/cli/simple-commands/init/template-copier.js +533 -421
- package/dist/src/cli/simple-commands/init/templates/coordination-md.js +6 -3
- package/dist/src/cli/simple-commands/init/templates/enhanced-templates.js +318 -344
- package/dist/src/cli/simple-commands/init/templates/github-safe-enhanced.js +218 -173
- package/dist/src/cli/simple-commands/init/templates/github-safe.js +75 -65
- package/dist/src/cli/simple-commands/init/templates/memory-bank-md.js +6 -3
- package/dist/src/cli/simple-commands/init/templates/readme-files.js +4 -2
- package/dist/src/cli/simple-commands/init/templates/safe-hook-patterns.js +230 -187
- package/dist/src/cli/simple-commands/init/templates/sparc-modes.js +80 -53
- package/dist/src/cli/simple-commands/init/templates/verification-claude-md.js +85 -101
- package/dist/src/cli/simple-commands/init/validation/config-validator.js +330 -283
- package/dist/src/cli/simple-commands/init/validation/health-checker.js +561 -495
- package/dist/src/cli/simple-commands/init/validation/index.js +358 -302
- package/dist/src/cli/simple-commands/init/validation/mode-validator.js +359 -308
- package/dist/src/cli/simple-commands/init/validation/post-init-validator.js +366 -389
- package/dist/src/cli/simple-commands/init/validation/pre-init-validator.js +268 -270
- package/dist/src/cli/simple-commands/init/validation/test-runner.js +447 -427
- package/dist/src/cli/simple-commands/init.js +2 -1
- package/dist/src/cli/simple-commands/mcp-health.js +158 -131
- package/dist/src/cli/simple-commands/mcp-integration-layer.js +634 -533
- package/dist/src/cli/simple-commands/mcp.js +400 -345
- package/dist/src/cli/simple-commands/memory-consolidation.js +537 -426
- package/dist/src/cli/simple-commands/memory.js +311 -247
- package/dist/src/cli/simple-commands/migrate-hooks.js +46 -39
- package/dist/src/cli/simple-commands/monitor.js +363 -294
- package/dist/src/cli/simple-commands/neural.js +65 -51
- package/dist/src/cli/simple-commands/pair-autofix-only.js +662 -538
- package/dist/src/cli/simple-commands/pair-basic.js +656 -528
- package/dist/src/cli/simple-commands/pair-old.js +543 -430
- package/dist/src/cli/simple-commands/pair-working.js +751 -615
- package/dist/src/cli/simple-commands/pair.js +751 -615
- package/dist/src/cli/simple-commands/performance-hooks.js +111 -83
- package/dist/src/cli/simple-commands/performance-metrics.js +433 -348
- package/dist/src/cli/simple-commands/process-ui-enhanced.js +787 -708
- package/dist/src/cli/simple-commands/process-ui.js +254 -230
- package/dist/src/cli/simple-commands/realtime-update-system.js +611 -525
- package/dist/src/cli/simple-commands/sparc/architecture.js +1530 -1704
- package/dist/src/cli/simple-commands/sparc/commands.js +516 -438
- package/dist/src/cli/simple-commands/sparc/completion.js +1481 -1224
- package/dist/src/cli/simple-commands/sparc/coordinator.js +978 -913
- package/dist/src/cli/simple-commands/sparc/index.js +298 -241
- package/dist/src/cli/simple-commands/sparc/phase-base.js +390 -314
- package/dist/src/cli/simple-commands/sparc/pseudocode.js +869 -965
- package/dist/src/cli/simple-commands/sparc/refinement.js +1273 -980
- package/dist/src/cli/simple-commands/sparc/specification.js +645 -559
- package/dist/src/cli/simple-commands/sparc-modes/architect.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/ask.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/code.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/debug.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/devops.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/docs-writer.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/generic.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/index.js +55 -47
- package/dist/src/cli/simple-commands/sparc-modes/integration.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/mcp.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/monitoring.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/optimization.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/security-review.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/sparc-orchestrator.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/spec-pseudocode.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/supabase-admin.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/swarm.js +87 -101
- package/dist/src/cli/simple-commands/sparc-modes/tdd.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/tutorial.js +1 -1
- package/dist/src/cli/simple-commands/sparc.js +493 -465
- package/dist/src/cli/simple-commands/start-ui.js +132 -108
- package/dist/src/cli/simple-commands/start-wrapper.js +268 -240
- package/dist/src/cli/simple-commands/start.js +1 -1
- package/dist/src/cli/simple-commands/status.js +275 -254
- package/dist/src/cli/simple-commands/stream-chain-clean.js +171 -128
- package/dist/src/cli/simple-commands/stream-chain-fixed.js +82 -61
- package/dist/src/cli/simple-commands/stream-chain-real.js +331 -267
- package/dist/src/cli/simple-commands/stream-chain-working.js +263 -211
- package/dist/src/cli/simple-commands/stream-chain.js +318 -260
- package/dist/src/cli/simple-commands/stream-processor.js +315 -290
- package/dist/src/cli/simple-commands/swarm-executor.js +222 -189
- package/dist/src/cli/simple-commands/swarm-metrics-integration.js +300 -208
- package/dist/src/cli/simple-commands/swarm-ui.js +703 -623
- package/dist/src/cli/simple-commands/swarm-webui-integration.js +286 -258
- package/dist/src/cli/simple-commands/swarm.js +1082 -887
- package/dist/src/cli/simple-commands/task.js +206 -161
- package/dist/src/cli/simple-commands/timestamp-fix.js +89 -59
- package/dist/src/cli/simple-commands/token-tracker.js +316 -258
- package/dist/src/cli/simple-commands/tool-execution-framework.js +519 -433
- package/dist/src/cli/simple-commands/train-and-stream.js +331 -275
- package/dist/src/cli/simple-commands/training-pipeline.js +725 -619
- package/dist/src/cli/simple-commands/training.js +227 -170
- package/dist/src/cli/simple-commands/verification-hooks.js +284 -261
- package/dist/src/cli/simple-commands/verification-integration.js +417 -389
- package/dist/src/cli/simple-commands/verification-training-integration.js +606 -486
- package/dist/src/cli/simple-commands/verification.js +513 -493
- package/dist/src/cli/simple-commands/web-server.js +836 -766
- package/dist/src/cli/simple-commands/webui-validator.js +124 -106
- package/dist/src/coordination/byzantine-memory-channels.js +25 -1
- package/dist/src/coordination/event-bus/demo-wasm-integration.js +251 -212
- package/dist/src/coordination/event-bus/qe-event-bus.js +748 -608
- package/dist/src/coordination/event-bus/qe-event-bus.test.js +454 -379
- package/dist/src/coordination/iteration-tracker.js +454 -363
- package/dist/src/index.js +384 -35
- package/dist/src/mcp/DEPRECATED.js +60 -46
- package/dist/src/mcp/fixes/mcp-error-fixes.js +134 -115
- package/dist/src/mcp/implementations/agent-tracker.js +128 -114
- package/dist/src/mcp/implementations/daa-tools.js +350 -292
- package/dist/src/mcp/implementations/workflow-tools.js +361 -329
- package/dist/src/mcp/mcp-config-manager.js +1331 -1183
- package/dist/src/mcp/mcp-server-novice-simplified.js +17 -11
- package/dist/src/mcp/mcp-server-novice.js +17 -11
- package/dist/src/mcp/mcp-server-sdk.js +17 -11
- package/dist/src/mcp/mcp-server.js +1484 -1620
- package/dist/src/mcp/ruv-swarm-wrapper.js +239 -209
- package/dist/src/memory/advanced-serializer.js +589 -609
- package/dist/src/memory/enhanced-examples.js +305 -220
- package/dist/src/memory/enhanced-memory.js +336 -295
- package/dist/src/memory/enhanced-session-serializer.js +492 -408
- package/dist/src/memory/fallback-memory-system.js +1021 -900
- package/dist/src/memory/fallback-store.js +131 -93
- package/dist/src/memory/high-performance-serialization.js +730 -592
- package/dist/src/memory/in-memory-store.js +213 -161
- package/dist/src/memory/index.js +157 -123
- package/dist/src/memory/lock-free-structures.js +764 -578
- package/dist/src/memory/memory-mapped-persistence.js +766 -585
- package/dist/src/memory/memory-pressure-manager.js +707 -569
- package/dist/src/memory/migration.js +445 -358
- package/dist/src/memory/shared-memory.js +768 -641
- package/dist/src/memory/sqlite-store.js +325 -245
- package/dist/src/memory/sqlite-wrapper.js +151 -122
- package/dist/src/memory/swarm-memory.js +603 -470
- package/dist/src/memory/test-example.js +134 -126
- package/dist/src/memory/ultra-fast-memory-store.js +821 -622
- package/dist/src/memory/unified-memory-manager.js +437 -356
- package/dist/src/swarm/CodeRefactoringSwarm.js +952 -777
- package/dist/src/utils/__tests__/github-cli-safety-wrapper.test.js +400 -332
- package/dist/src/utils/error-handler.js +2 -36
- package/dist/src/utils/github-cli-safe.js +64 -56
- package/dist/src/utils/github-cli-safety-wrapper.js +546 -451
- package/dist/src/utils/npx-isolated-cache.js +119 -104
- package/dist/src/utils/preference-manager.js +652 -622
- package/dist/src/utils/timezone-utils.js +105 -86
- package/dist/src/web/api/apm-routes.js +353 -0
- package/dist/src/web/api/config/api-config.js +184 -0
- package/dist/src/web/api/middleware/auth.js +203 -0
- package/dist/src/web/api/middleware/cache.js +273 -0
- package/dist/src/web/api/middleware/error-handler.js +257 -0
- package/dist/src/web/api/middleware/request-logger.js +215 -0
- package/dist/src/web/api/middleware/validation.js +323 -0
- package/dist/src/web/api/routes/events.js +463 -0
- package/dist/src/web/api/routes/hierarchy.js +300 -0
- package/dist/src/web/api/routes/index.js +12 -0
- package/dist/src/web/api/routes/metrics.js +559 -0
- package/dist/src/web/api/routes/parallel-status.js +359 -0
- package/dist/src/web/api/routes/status.js +448 -0
- package/dist/src/web/api/server.js +462 -0
- package/dist/src/web/dashboard/hooks/useWebSocket.js +383 -0
- package/dist/src/web/dashboard/index.js +85 -0
- package/dist/src/web/dashboard/realtime/CustomSyncManager.js +439 -0
- package/dist/src/web/dashboard/realtime/NativeWebSocketManager.js +323 -0
- package/dist/src/web/dashboard/realtime/PerformanceBenchmark.js +527 -0
- package/dist/src/web/dashboard/realtime/RealtimeCommunicationManager.js +474 -0
- package/dist/src/web/dashboard/realtime/RealtimeServer.js +666 -0
- package/dist/src/web/dashboard/realtime/SSEManager.js +426 -0
- package/dist/src/web/dashboard/types.js +4 -0
- package/dist/src/web/messaging/agent-status-tracker.js +453 -0
- package/dist/src/web/messaging/human-intervention-system.js +305 -0
- package/dist/src/web/messaging/message-filter.js +302 -0
- package/dist/src/web/messaging/swarm-message-router.js +324 -0
- package/dist/src/web/messaging/transparency-logger.js +421 -0
- package/dist/src/web/portal-server.js +460 -0
- package/dist/src/web/server.js +322 -0
- package/dist/src/web/websocket/apm-websocket-handler.js +453 -0
- package/dist/src/web/websocket/websocket-manager.js +780 -0
- package/package.json +5 -3
- package/dist/src/cli/minimal-main.js +0 -22
- package/dist/src/enterprise/analytics-manager.js +0 -1135
- package/dist/src/enterprise/audit-manager.js +0 -1115
- package/dist/src/enterprise/cloud-manager.js +0 -891
- package/dist/src/enterprise/deployment-manager.js +0 -966
- package/dist/src/enterprise/index.js +0 -6
- package/dist/src/enterprise/project-manager.js +0 -584
- package/dist/src/enterprise/security-manager.js +0 -991
- package/dist/src/migration/index.js +0 -92
- package/dist/src/migration/logger.js +0 -121
- package/dist/src/migration/migration-analyzer.js +0 -268
- package/dist/src/migration/migration-runner.js +0 -522
- package/dist/src/migration/migration-validator.js +0 -285
- package/dist/src/migration/progress-reporter.js +0 -150
- package/dist/src/migration/rollback-manager.js +0 -321
- package/dist/src/migration/tests/migration-system.test.js +0 -7
- package/dist/src/migration/types.js +0 -3
- package/dist/src/swarm/__tests__/integration.test.js +0 -227
- package/dist/src/swarm/__tests__/prompt-copier.test.js +0 -344
- package/dist/src/swarm/advanced-orchestrator.js +0 -1095
- package/dist/src/swarm/claude-code-interface.js +0 -961
- package/dist/src/swarm/claude-flow-executor.js +0 -229
- package/dist/src/swarm/consensus-coordinator.js +0 -475
- package/dist/src/swarm/coordinator.js +0 -2993
- package/dist/src/swarm/direct-executor.js +0 -1180
- package/dist/src/swarm/error-recovery/advanced-error-detection.js +0 -691
- package/dist/src/swarm/error-recovery/automated-recovery-workflows.js +0 -998
- package/dist/src/swarm/error-recovery/error-recovery-coordinator.js +0 -1197
- package/dist/src/swarm/error-recovery/recovery-monitoring.js +0 -772
- package/dist/src/swarm/error-recovery/resilience-architecture.js +0 -714
- package/dist/src/swarm/error-recovery/self-healing-mechanisms.js +0 -1319
- package/dist/src/swarm/error-recovery/test-error-recovery-effectiveness.js +0 -808
- package/dist/src/swarm/executor-v2.js +0 -322
- package/dist/src/swarm/executor.js +0 -815
- package/dist/src/swarm/hive-mind-integration.js +0 -703
- package/dist/src/swarm/index.js +0 -41
- package/dist/src/swarm/json-output-aggregator.js +0 -267
- package/dist/src/swarm/large-scale-coordinator.js +0 -542
- package/dist/src/swarm/mcp-integration-wrapper.js +0 -628
- package/dist/src/swarm/memory.js +0 -1117
- package/dist/src/swarm/optimizations/__tests__/optimization.test.js +0 -348
- package/dist/src/swarm/optimizations/async-file-manager.js +0 -285
- package/dist/src/swarm/optimizations/circular-buffer.js +0 -162
- package/dist/src/swarm/optimizations/connection-pool.js +0 -244
- package/dist/src/swarm/optimizations/index.js +0 -28
- package/dist/src/swarm/optimizations/optimized-executor.js +0 -320
- package/dist/src/swarm/optimizations/ttl-map.js +0 -234
- package/dist/src/swarm/prompt-cli.js +0 -200
- package/dist/src/swarm/prompt-copier-enhanced.js +0 -202
- package/dist/src/swarm/prompt-copier.js +0 -381
- package/dist/src/swarm/prompt-manager.js +0 -295
- package/dist/src/swarm/prompt-utils.js +0 -310
- package/dist/src/swarm/result-aggregator.js +0 -718
- package/dist/src/swarm/sparc-executor.js +0 -1568
- package/dist/src/swarm/strategies/auto.js +0 -758
- package/dist/src/swarm/strategies/base.js +0 -128
- package/dist/src/swarm/strategies/research.js +0 -914
- package/dist/src/swarm/strategies/strategy-metrics-patch.js +0 -2
- package/dist/src/swarm/types.js +0 -52
- package/dist/src/swarm/workers/copy-worker.js +0 -56
- package/dist/src/validators/epic-config-schema.js +0 -214
- package/dist/src/validators/index.js +0 -10
- package/dist/src/validators/swarm-init-validator.js +0 -259
- package/dist/src/validators/todowrite-batching-validator.js +0 -215
- package/dist/src/validators/todowrite-integration.js +0 -187
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/documentSymbols/browser/documentSymbols.js +0 -23
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +0 -57
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +0 -401
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +0 -181
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js +0 -44
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +0 -157
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/edit.js +0 -71
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/editorState/browser/editorState.js +0 -112
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findController.js +0 -990
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findDecorations.js +0 -296
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findModel.js +0 -488
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findOptionsWidget.js +0 -138
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findState.js +0 -243
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findWidget.js +0 -1177
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/folding.js +0 -1093
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +0 -133
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingModel.js +0 -538
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingRanges.js +0 -351
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +0 -49
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/format.js +0 -360
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/formatActions.js +0 -263
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/formattingEdit.js +0 -54
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +0 -149
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/hover/browser/contentHover.js +0 -874
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/inlineCompletions/browser/commandIds.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/inlineCompletions/browser/commands.js +0 -199
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/linesOperations/browser/copyLinesCommand.js +0 -70
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js +0 -26
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +0 -153
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +0 -33
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +0 -354
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/smartSelect/browser/bracketSelections.js +0 -146
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/suggest/browser/completionModel.js +0 -224
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +0 -119
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/edcore.main.js +0 -14
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.all.js +0 -63
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.api.js +0 -55
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.main.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.worker.js +0 -25
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/standalone/browser/colorizer.js +0 -118
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/language/css/css.worker.js +0 -36869
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/language/css/cssMode.js +0 -2035
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/browser/accessibilityService.js +0 -88
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/common/accessibility.js +0 -9
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/action.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/actionCommonCategories.js +0 -13
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionList.js +0 -276
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionWidget.js +0 -248
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/common/actionWidget.js +0 -5
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actions/common/actions.js +0 -409
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/audioCues/browser/audioCueService.js +0 -176
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/browser/clipboardService.js +0 -141
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/common/clipboardService.js +0 -6
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/commands/common/commands.js +0 -80
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configuration.js +0 -86
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationModels.js +0 -554
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationRegistry.js +0 -317
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurations.js +0 -41
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/browser/contextKeyService.js +0 -432
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkey.js +0 -1547
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkeys.js +0 -18
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuHandler.js +0 -124
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuService.js +0 -101
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextView.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextViewService.js +0 -72
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dialogs/common/dialogs.js +0 -2
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dnd/browser/dnd.js +0 -36
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/editor/common/editor.js +0 -17
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/environment/common/environment.js +0 -2
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/extensions/common/extensions.js +0 -47
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/files/common/files.js +0 -9
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +0 -105
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/descriptors.js +0 -11
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/extensions.js +0 -15
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/abstractKeybindingService.js +0 -277
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js +0 -53
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +0 -354
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/browser/defaultStyles.js +0 -162
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/common/colorRegistry.js +0 -482
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/abap/abap.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/apex/apex.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/azcli/azcli.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bat/bat.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bicep/bicep.js +0 -11
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cameligo/cameligo.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/clojure/clojure.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/coffee/coffee.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cpp/cpp.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/csharp/csharp.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/csp/csp.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/css/css.js +0 -12
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cypher/cypher.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/dart/dart.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/dockerfile/dockerfile.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/ecl/ecl.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/elixir/elixir.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/flow9/flow9.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.js +0 -745
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.de.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.es.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.fr.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.it.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ja.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ko.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ru.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.zh-cn.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.zh-tw.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/language/css/cssMode.js +0 -13
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/language/css/cssWorker.js +0 -81
- package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/cli.js +0 -64
- package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/example.js +0 -36
- package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/index.js +0 -205
- package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/test.js +0 -260
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.browser.js +0 -34
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.js +0 -35
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.native.js +0 -26
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/index.browser.js +0 -34
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/index.js +0 -45
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/nanoid.js +0 -1
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/non-secure/index.js +0 -21
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/url-alphabet/index.js +0 -3
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/bin/nodemon.js +0 -16
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/cli/index.js +0 -49
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/cli/parse.js +0 -230
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/command.js +0 -43
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/defaults.js +0 -34
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/exec.js +0 -234
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/index.js +0 -93
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/load.js +0 -225
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/help/index.js +0 -27
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/index.js +0 -1
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/index.js +0 -4
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/match.js +0 -287
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/run.js +0 -562
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/signals.js +0 -34
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/watch.js +0 -244
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/nodemon.js +0 -317
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/add.js +0 -89
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/index.js +0 -53
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/parse.js +0 -43
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/spawn.js +0 -74
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/bus.js +0 -44
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/clone.js +0 -40
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/colour.js +0 -26
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/index.js +0 -103
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/log.js +0 -82
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/merge.js +0 -47
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/version.js +0 -100
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/brace-expansion/index.js +0 -201
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/has-flag/index.js +0 -8
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/minimatch/minimatch.js +0 -947
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/supports-color/browser.js +0 -5
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/supports-color/index.js +0 -131
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/bin/pidtree.js +0 -128
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/index.js +0 -49
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/bin.js +0 -61
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/get.js +0 -45
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/pidtree.js +0 -104
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/ps.js +0 -47
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/wmic.js +0 -49
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/doc.js +0 -1270
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/acorn.js +0 -15
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/angular.js +0 -2
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/babel.js +0 -15
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/estree.js +0 -36
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/flow.js +0 -19
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/glimmer.js +0 -29
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/graphql.js +0 -29
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/html.js +0 -22
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/markdown.js +0 -63
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/meriyah.js +0 -4
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/postcss.js +0 -54
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/typescript.js +0 -20
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/yaml.js +0 -160
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/standalone.js +0 -34
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/bin/react-scripts.js +0 -58
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/env.js +0 -112
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/getHttpsConfig.js +0 -74
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/babelTransform.js +0 -37
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/cssTransform.js +0 -22
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/fileTransform.js +0 -40
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/modules.js +0 -142
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/paths.js +0 -153
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpack/persistentCache/createEnvironmentHash.js +0 -9
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpack.config.js +0 -796
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpackDevServer.config.js +0 -135
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/scripts/build.js +0 -225
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/scripts/eject.js +0 -340
package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/language/css/cssMode.js
DELETED
|
@@ -1,2035 +0,0 @@
|
|
|
1
|
-
/*!-----------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
4
|
-
* Released under the MIT license
|
|
5
|
-
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
-
*-----------------------------------------------------------------------------*/
|
|
7
|
-
|
|
8
|
-
var __defProp = Object.defineProperty;
|
|
9
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
11
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
-
|
|
22
|
-
// src/fillers/monaco-editor-core.ts
|
|
23
|
-
var monaco_editor_core_exports = {};
|
|
24
|
-
__reExport(monaco_editor_core_exports, monaco_editor_core_star);
|
|
25
|
-
import * as monaco_editor_core_star from "../../editor/editor.api.js";
|
|
26
|
-
|
|
27
|
-
// src/language/css/workerManager.ts
|
|
28
|
-
var STOP_WHEN_IDLE_FOR = 2 * 60 * 1e3;
|
|
29
|
-
var WorkerManager = class {
|
|
30
|
-
_defaults;
|
|
31
|
-
_idleCheckInterval;
|
|
32
|
-
_lastUsedTime;
|
|
33
|
-
_configChangeListener;
|
|
34
|
-
_worker;
|
|
35
|
-
_client;
|
|
36
|
-
constructor(defaults) {
|
|
37
|
-
this._defaults = defaults;
|
|
38
|
-
this._worker = null;
|
|
39
|
-
this._client = null;
|
|
40
|
-
this._idleCheckInterval = window.setInterval(() => this._checkIfIdle(), 30 * 1e3);
|
|
41
|
-
this._lastUsedTime = 0;
|
|
42
|
-
this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker());
|
|
43
|
-
}
|
|
44
|
-
_stopWorker() {
|
|
45
|
-
if (this._worker) {
|
|
46
|
-
this._worker.dispose();
|
|
47
|
-
this._worker = null;
|
|
48
|
-
}
|
|
49
|
-
this._client = null;
|
|
50
|
-
}
|
|
51
|
-
dispose() {
|
|
52
|
-
clearInterval(this._idleCheckInterval);
|
|
53
|
-
this._configChangeListener.dispose();
|
|
54
|
-
this._stopWorker();
|
|
55
|
-
}
|
|
56
|
-
_checkIfIdle() {
|
|
57
|
-
if (!this._worker) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
let timePassedSinceLastUsed = Date.now() - this._lastUsedTime;
|
|
61
|
-
if (timePassedSinceLastUsed > STOP_WHEN_IDLE_FOR) {
|
|
62
|
-
this._stopWorker();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
_getClient() {
|
|
66
|
-
this._lastUsedTime = Date.now();
|
|
67
|
-
if (!this._client) {
|
|
68
|
-
this._worker = monaco_editor_core_exports.editor.createWebWorker({
|
|
69
|
-
moduleId: "vs/language/css/cssWorker",
|
|
70
|
-
label: this._defaults.languageId,
|
|
71
|
-
createData: {
|
|
72
|
-
options: this._defaults.options,
|
|
73
|
-
languageId: this._defaults.languageId
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
this._client = this._worker.getProxy();
|
|
77
|
-
}
|
|
78
|
-
return this._client;
|
|
79
|
-
}
|
|
80
|
-
getLanguageServiceWorker(...resources) {
|
|
81
|
-
let _client;
|
|
82
|
-
return this._getClient().then((client) => {
|
|
83
|
-
_client = client;
|
|
84
|
-
}).then((_) => {
|
|
85
|
-
if (this._worker) {
|
|
86
|
-
return this._worker.withSyncedResources(resources);
|
|
87
|
-
}
|
|
88
|
-
}).then((_) => _client);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
// node_modules/vscode-languageserver-types/lib/esm/main.js
|
|
93
|
-
var integer;
|
|
94
|
-
(function(integer2) {
|
|
95
|
-
integer2.MIN_VALUE = -2147483648;
|
|
96
|
-
integer2.MAX_VALUE = 2147483647;
|
|
97
|
-
})(integer || (integer = {}));
|
|
98
|
-
var uinteger;
|
|
99
|
-
(function(uinteger2) {
|
|
100
|
-
uinteger2.MIN_VALUE = 0;
|
|
101
|
-
uinteger2.MAX_VALUE = 2147483647;
|
|
102
|
-
})(uinteger || (uinteger = {}));
|
|
103
|
-
var Position;
|
|
104
|
-
(function(Position3) {
|
|
105
|
-
function create(line, character) {
|
|
106
|
-
if (line === Number.MAX_VALUE) {
|
|
107
|
-
line = uinteger.MAX_VALUE;
|
|
108
|
-
}
|
|
109
|
-
if (character === Number.MAX_VALUE) {
|
|
110
|
-
character = uinteger.MAX_VALUE;
|
|
111
|
-
}
|
|
112
|
-
return { line, character };
|
|
113
|
-
}
|
|
114
|
-
Position3.create = create;
|
|
115
|
-
function is(value) {
|
|
116
|
-
var candidate = value;
|
|
117
|
-
return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
|
|
118
|
-
}
|
|
119
|
-
Position3.is = is;
|
|
120
|
-
})(Position || (Position = {}));
|
|
121
|
-
var Range;
|
|
122
|
-
(function(Range3) {
|
|
123
|
-
function create(one, two, three, four) {
|
|
124
|
-
if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
|
|
125
|
-
return { start: Position.create(one, two), end: Position.create(three, four) };
|
|
126
|
-
} else if (Position.is(one) && Position.is(two)) {
|
|
127
|
-
return { start: one, end: two };
|
|
128
|
-
} else {
|
|
129
|
-
throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
Range3.create = create;
|
|
133
|
-
function is(value) {
|
|
134
|
-
var candidate = value;
|
|
135
|
-
return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
|
|
136
|
-
}
|
|
137
|
-
Range3.is = is;
|
|
138
|
-
})(Range || (Range = {}));
|
|
139
|
-
var Location;
|
|
140
|
-
(function(Location2) {
|
|
141
|
-
function create(uri, range) {
|
|
142
|
-
return { uri, range };
|
|
143
|
-
}
|
|
144
|
-
Location2.create = create;
|
|
145
|
-
function is(value) {
|
|
146
|
-
var candidate = value;
|
|
147
|
-
return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
|
|
148
|
-
}
|
|
149
|
-
Location2.is = is;
|
|
150
|
-
})(Location || (Location = {}));
|
|
151
|
-
var LocationLink;
|
|
152
|
-
(function(LocationLink2) {
|
|
153
|
-
function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
|
|
154
|
-
return { targetUri, targetRange, targetSelectionRange, originSelectionRange };
|
|
155
|
-
}
|
|
156
|
-
LocationLink2.create = create;
|
|
157
|
-
function is(value) {
|
|
158
|
-
var candidate = value;
|
|
159
|
-
return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri) && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange)) && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
|
|
160
|
-
}
|
|
161
|
-
LocationLink2.is = is;
|
|
162
|
-
})(LocationLink || (LocationLink = {}));
|
|
163
|
-
var Color;
|
|
164
|
-
(function(Color2) {
|
|
165
|
-
function create(red, green, blue, alpha) {
|
|
166
|
-
return {
|
|
167
|
-
red,
|
|
168
|
-
green,
|
|
169
|
-
blue,
|
|
170
|
-
alpha
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
Color2.create = create;
|
|
174
|
-
function is(value) {
|
|
175
|
-
var candidate = value;
|
|
176
|
-
return Is.numberRange(candidate.red, 0, 1) && Is.numberRange(candidate.green, 0, 1) && Is.numberRange(candidate.blue, 0, 1) && Is.numberRange(candidate.alpha, 0, 1);
|
|
177
|
-
}
|
|
178
|
-
Color2.is = is;
|
|
179
|
-
})(Color || (Color = {}));
|
|
180
|
-
var ColorInformation;
|
|
181
|
-
(function(ColorInformation2) {
|
|
182
|
-
function create(range, color) {
|
|
183
|
-
return {
|
|
184
|
-
range,
|
|
185
|
-
color
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
ColorInformation2.create = create;
|
|
189
|
-
function is(value) {
|
|
190
|
-
var candidate = value;
|
|
191
|
-
return Range.is(candidate.range) && Color.is(candidate.color);
|
|
192
|
-
}
|
|
193
|
-
ColorInformation2.is = is;
|
|
194
|
-
})(ColorInformation || (ColorInformation = {}));
|
|
195
|
-
var ColorPresentation;
|
|
196
|
-
(function(ColorPresentation2) {
|
|
197
|
-
function create(label, textEdit, additionalTextEdits) {
|
|
198
|
-
return {
|
|
199
|
-
label,
|
|
200
|
-
textEdit,
|
|
201
|
-
additionalTextEdits
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
ColorPresentation2.create = create;
|
|
205
|
-
function is(value) {
|
|
206
|
-
var candidate = value;
|
|
207
|
-
return Is.string(candidate.label) && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
|
|
208
|
-
}
|
|
209
|
-
ColorPresentation2.is = is;
|
|
210
|
-
})(ColorPresentation || (ColorPresentation = {}));
|
|
211
|
-
var FoldingRangeKind;
|
|
212
|
-
(function(FoldingRangeKind2) {
|
|
213
|
-
FoldingRangeKind2["Comment"] = "comment";
|
|
214
|
-
FoldingRangeKind2["Imports"] = "imports";
|
|
215
|
-
FoldingRangeKind2["Region"] = "region";
|
|
216
|
-
})(FoldingRangeKind || (FoldingRangeKind = {}));
|
|
217
|
-
var FoldingRange;
|
|
218
|
-
(function(FoldingRange2) {
|
|
219
|
-
function create(startLine, endLine, startCharacter, endCharacter, kind) {
|
|
220
|
-
var result = {
|
|
221
|
-
startLine,
|
|
222
|
-
endLine
|
|
223
|
-
};
|
|
224
|
-
if (Is.defined(startCharacter)) {
|
|
225
|
-
result.startCharacter = startCharacter;
|
|
226
|
-
}
|
|
227
|
-
if (Is.defined(endCharacter)) {
|
|
228
|
-
result.endCharacter = endCharacter;
|
|
229
|
-
}
|
|
230
|
-
if (Is.defined(kind)) {
|
|
231
|
-
result.kind = kind;
|
|
232
|
-
}
|
|
233
|
-
return result;
|
|
234
|
-
}
|
|
235
|
-
FoldingRange2.create = create;
|
|
236
|
-
function is(value) {
|
|
237
|
-
var candidate = value;
|
|
238
|
-
return Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
|
|
239
|
-
}
|
|
240
|
-
FoldingRange2.is = is;
|
|
241
|
-
})(FoldingRange || (FoldingRange = {}));
|
|
242
|
-
var DiagnosticRelatedInformation;
|
|
243
|
-
(function(DiagnosticRelatedInformation2) {
|
|
244
|
-
function create(location, message) {
|
|
245
|
-
return {
|
|
246
|
-
location,
|
|
247
|
-
message
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
DiagnosticRelatedInformation2.create = create;
|
|
251
|
-
function is(value) {
|
|
252
|
-
var candidate = value;
|
|
253
|
-
return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
|
|
254
|
-
}
|
|
255
|
-
DiagnosticRelatedInformation2.is = is;
|
|
256
|
-
})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
|
|
257
|
-
var DiagnosticSeverity;
|
|
258
|
-
(function(DiagnosticSeverity2) {
|
|
259
|
-
DiagnosticSeverity2.Error = 1;
|
|
260
|
-
DiagnosticSeverity2.Warning = 2;
|
|
261
|
-
DiagnosticSeverity2.Information = 3;
|
|
262
|
-
DiagnosticSeverity2.Hint = 4;
|
|
263
|
-
})(DiagnosticSeverity || (DiagnosticSeverity = {}));
|
|
264
|
-
var DiagnosticTag;
|
|
265
|
-
(function(DiagnosticTag2) {
|
|
266
|
-
DiagnosticTag2.Unnecessary = 1;
|
|
267
|
-
DiagnosticTag2.Deprecated = 2;
|
|
268
|
-
})(DiagnosticTag || (DiagnosticTag = {}));
|
|
269
|
-
var CodeDescription;
|
|
270
|
-
(function(CodeDescription2) {
|
|
271
|
-
function is(value) {
|
|
272
|
-
var candidate = value;
|
|
273
|
-
return candidate !== void 0 && candidate !== null && Is.string(candidate.href);
|
|
274
|
-
}
|
|
275
|
-
CodeDescription2.is = is;
|
|
276
|
-
})(CodeDescription || (CodeDescription = {}));
|
|
277
|
-
var Diagnostic;
|
|
278
|
-
(function(Diagnostic2) {
|
|
279
|
-
function create(range, message, severity, code, source, relatedInformation) {
|
|
280
|
-
var result = { range, message };
|
|
281
|
-
if (Is.defined(severity)) {
|
|
282
|
-
result.severity = severity;
|
|
283
|
-
}
|
|
284
|
-
if (Is.defined(code)) {
|
|
285
|
-
result.code = code;
|
|
286
|
-
}
|
|
287
|
-
if (Is.defined(source)) {
|
|
288
|
-
result.source = source;
|
|
289
|
-
}
|
|
290
|
-
if (Is.defined(relatedInformation)) {
|
|
291
|
-
result.relatedInformation = relatedInformation;
|
|
292
|
-
}
|
|
293
|
-
return result;
|
|
294
|
-
}
|
|
295
|
-
Diagnostic2.create = create;
|
|
296
|
-
function is(value) {
|
|
297
|
-
var _a;
|
|
298
|
-
var candidate = value;
|
|
299
|
-
return Is.defined(candidate) && Range.is(candidate.range) && Is.string(candidate.message) && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) && (Is.undefined(candidate.codeDescription) || Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)) && (Is.string(candidate.source) || Is.undefined(candidate.source)) && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
|
|
300
|
-
}
|
|
301
|
-
Diagnostic2.is = is;
|
|
302
|
-
})(Diagnostic || (Diagnostic = {}));
|
|
303
|
-
var Command;
|
|
304
|
-
(function(Command2) {
|
|
305
|
-
function create(title, command) {
|
|
306
|
-
var args = [];
|
|
307
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
308
|
-
args[_i - 2] = arguments[_i];
|
|
309
|
-
}
|
|
310
|
-
var result = { title, command };
|
|
311
|
-
if (Is.defined(args) && args.length > 0) {
|
|
312
|
-
result.arguments = args;
|
|
313
|
-
}
|
|
314
|
-
return result;
|
|
315
|
-
}
|
|
316
|
-
Command2.create = create;
|
|
317
|
-
function is(value) {
|
|
318
|
-
var candidate = value;
|
|
319
|
-
return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
|
|
320
|
-
}
|
|
321
|
-
Command2.is = is;
|
|
322
|
-
})(Command || (Command = {}));
|
|
323
|
-
var TextEdit;
|
|
324
|
-
(function(TextEdit2) {
|
|
325
|
-
function replace(range, newText) {
|
|
326
|
-
return { range, newText };
|
|
327
|
-
}
|
|
328
|
-
TextEdit2.replace = replace;
|
|
329
|
-
function insert(position, newText) {
|
|
330
|
-
return { range: { start: position, end: position }, newText };
|
|
331
|
-
}
|
|
332
|
-
TextEdit2.insert = insert;
|
|
333
|
-
function del(range) {
|
|
334
|
-
return { range, newText: "" };
|
|
335
|
-
}
|
|
336
|
-
TextEdit2.del = del;
|
|
337
|
-
function is(value) {
|
|
338
|
-
var candidate = value;
|
|
339
|
-
return Is.objectLiteral(candidate) && Is.string(candidate.newText) && Range.is(candidate.range);
|
|
340
|
-
}
|
|
341
|
-
TextEdit2.is = is;
|
|
342
|
-
})(TextEdit || (TextEdit = {}));
|
|
343
|
-
var ChangeAnnotation;
|
|
344
|
-
(function(ChangeAnnotation2) {
|
|
345
|
-
function create(label, needsConfirmation, description) {
|
|
346
|
-
var result = { label };
|
|
347
|
-
if (needsConfirmation !== void 0) {
|
|
348
|
-
result.needsConfirmation = needsConfirmation;
|
|
349
|
-
}
|
|
350
|
-
if (description !== void 0) {
|
|
351
|
-
result.description = description;
|
|
352
|
-
}
|
|
353
|
-
return result;
|
|
354
|
-
}
|
|
355
|
-
ChangeAnnotation2.create = create;
|
|
356
|
-
function is(value) {
|
|
357
|
-
var candidate = value;
|
|
358
|
-
return candidate !== void 0 && Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === void 0) && (Is.string(candidate.description) || candidate.description === void 0);
|
|
359
|
-
}
|
|
360
|
-
ChangeAnnotation2.is = is;
|
|
361
|
-
})(ChangeAnnotation || (ChangeAnnotation = {}));
|
|
362
|
-
var ChangeAnnotationIdentifier;
|
|
363
|
-
(function(ChangeAnnotationIdentifier2) {
|
|
364
|
-
function is(value) {
|
|
365
|
-
var candidate = value;
|
|
366
|
-
return typeof candidate === "string";
|
|
367
|
-
}
|
|
368
|
-
ChangeAnnotationIdentifier2.is = is;
|
|
369
|
-
})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));
|
|
370
|
-
var AnnotatedTextEdit;
|
|
371
|
-
(function(AnnotatedTextEdit2) {
|
|
372
|
-
function replace(range, newText, annotation) {
|
|
373
|
-
return { range, newText, annotationId: annotation };
|
|
374
|
-
}
|
|
375
|
-
AnnotatedTextEdit2.replace = replace;
|
|
376
|
-
function insert(position, newText, annotation) {
|
|
377
|
-
return { range: { start: position, end: position }, newText, annotationId: annotation };
|
|
378
|
-
}
|
|
379
|
-
AnnotatedTextEdit2.insert = insert;
|
|
380
|
-
function del(range, annotation) {
|
|
381
|
-
return { range, newText: "", annotationId: annotation };
|
|
382
|
-
}
|
|
383
|
-
AnnotatedTextEdit2.del = del;
|
|
384
|
-
function is(value) {
|
|
385
|
-
var candidate = value;
|
|
386
|
-
return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
387
|
-
}
|
|
388
|
-
AnnotatedTextEdit2.is = is;
|
|
389
|
-
})(AnnotatedTextEdit || (AnnotatedTextEdit = {}));
|
|
390
|
-
var TextDocumentEdit;
|
|
391
|
-
(function(TextDocumentEdit2) {
|
|
392
|
-
function create(textDocument, edits) {
|
|
393
|
-
return { textDocument, edits };
|
|
394
|
-
}
|
|
395
|
-
TextDocumentEdit2.create = create;
|
|
396
|
-
function is(value) {
|
|
397
|
-
var candidate = value;
|
|
398
|
-
return Is.defined(candidate) && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) && Array.isArray(candidate.edits);
|
|
399
|
-
}
|
|
400
|
-
TextDocumentEdit2.is = is;
|
|
401
|
-
})(TextDocumentEdit || (TextDocumentEdit = {}));
|
|
402
|
-
var CreateFile;
|
|
403
|
-
(function(CreateFile2) {
|
|
404
|
-
function create(uri, options, annotation) {
|
|
405
|
-
var result = {
|
|
406
|
-
kind: "create",
|
|
407
|
-
uri
|
|
408
|
-
};
|
|
409
|
-
if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
|
|
410
|
-
result.options = options;
|
|
411
|
-
}
|
|
412
|
-
if (annotation !== void 0) {
|
|
413
|
-
result.annotationId = annotation;
|
|
414
|
-
}
|
|
415
|
-
return result;
|
|
416
|
-
}
|
|
417
|
-
CreateFile2.create = create;
|
|
418
|
-
function is(value) {
|
|
419
|
-
var candidate = value;
|
|
420
|
-
return candidate && candidate.kind === "create" && Is.string(candidate.uri) && (candidate.options === void 0 || (candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
421
|
-
}
|
|
422
|
-
CreateFile2.is = is;
|
|
423
|
-
})(CreateFile || (CreateFile = {}));
|
|
424
|
-
var RenameFile;
|
|
425
|
-
(function(RenameFile2) {
|
|
426
|
-
function create(oldUri, newUri, options, annotation) {
|
|
427
|
-
var result = {
|
|
428
|
-
kind: "rename",
|
|
429
|
-
oldUri,
|
|
430
|
-
newUri
|
|
431
|
-
};
|
|
432
|
-
if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
|
|
433
|
-
result.options = options;
|
|
434
|
-
}
|
|
435
|
-
if (annotation !== void 0) {
|
|
436
|
-
result.annotationId = annotation;
|
|
437
|
-
}
|
|
438
|
-
return result;
|
|
439
|
-
}
|
|
440
|
-
RenameFile2.create = create;
|
|
441
|
-
function is(value) {
|
|
442
|
-
var candidate = value;
|
|
443
|
-
return candidate && candidate.kind === "rename" && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === void 0 || (candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
444
|
-
}
|
|
445
|
-
RenameFile2.is = is;
|
|
446
|
-
})(RenameFile || (RenameFile = {}));
|
|
447
|
-
var DeleteFile;
|
|
448
|
-
(function(DeleteFile2) {
|
|
449
|
-
function create(uri, options, annotation) {
|
|
450
|
-
var result = {
|
|
451
|
-
kind: "delete",
|
|
452
|
-
uri
|
|
453
|
-
};
|
|
454
|
-
if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
|
|
455
|
-
result.options = options;
|
|
456
|
-
}
|
|
457
|
-
if (annotation !== void 0) {
|
|
458
|
-
result.annotationId = annotation;
|
|
459
|
-
}
|
|
460
|
-
return result;
|
|
461
|
-
}
|
|
462
|
-
DeleteFile2.create = create;
|
|
463
|
-
function is(value) {
|
|
464
|
-
var candidate = value;
|
|
465
|
-
return candidate && candidate.kind === "delete" && Is.string(candidate.uri) && (candidate.options === void 0 || (candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
466
|
-
}
|
|
467
|
-
DeleteFile2.is = is;
|
|
468
|
-
})(DeleteFile || (DeleteFile = {}));
|
|
469
|
-
var WorkspaceEdit;
|
|
470
|
-
(function(WorkspaceEdit2) {
|
|
471
|
-
function is(value) {
|
|
472
|
-
var candidate = value;
|
|
473
|
-
return candidate && (candidate.changes !== void 0 || candidate.documentChanges !== void 0) && (candidate.documentChanges === void 0 || candidate.documentChanges.every(function(change) {
|
|
474
|
-
if (Is.string(change.kind)) {
|
|
475
|
-
return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
|
|
476
|
-
} else {
|
|
477
|
-
return TextDocumentEdit.is(change);
|
|
478
|
-
}
|
|
479
|
-
}));
|
|
480
|
-
}
|
|
481
|
-
WorkspaceEdit2.is = is;
|
|
482
|
-
})(WorkspaceEdit || (WorkspaceEdit = {}));
|
|
483
|
-
var TextEditChangeImpl = function() {
|
|
484
|
-
function TextEditChangeImpl2(edits, changeAnnotations) {
|
|
485
|
-
this.edits = edits;
|
|
486
|
-
this.changeAnnotations = changeAnnotations;
|
|
487
|
-
}
|
|
488
|
-
TextEditChangeImpl2.prototype.insert = function(position, newText, annotation) {
|
|
489
|
-
var edit;
|
|
490
|
-
var id;
|
|
491
|
-
if (annotation === void 0) {
|
|
492
|
-
edit = TextEdit.insert(position, newText);
|
|
493
|
-
} else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
494
|
-
id = annotation;
|
|
495
|
-
edit = AnnotatedTextEdit.insert(position, newText, annotation);
|
|
496
|
-
} else {
|
|
497
|
-
this.assertChangeAnnotations(this.changeAnnotations);
|
|
498
|
-
id = this.changeAnnotations.manage(annotation);
|
|
499
|
-
edit = AnnotatedTextEdit.insert(position, newText, id);
|
|
500
|
-
}
|
|
501
|
-
this.edits.push(edit);
|
|
502
|
-
if (id !== void 0) {
|
|
503
|
-
return id;
|
|
504
|
-
}
|
|
505
|
-
};
|
|
506
|
-
TextEditChangeImpl2.prototype.replace = function(range, newText, annotation) {
|
|
507
|
-
var edit;
|
|
508
|
-
var id;
|
|
509
|
-
if (annotation === void 0) {
|
|
510
|
-
edit = TextEdit.replace(range, newText);
|
|
511
|
-
} else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
512
|
-
id = annotation;
|
|
513
|
-
edit = AnnotatedTextEdit.replace(range, newText, annotation);
|
|
514
|
-
} else {
|
|
515
|
-
this.assertChangeAnnotations(this.changeAnnotations);
|
|
516
|
-
id = this.changeAnnotations.manage(annotation);
|
|
517
|
-
edit = AnnotatedTextEdit.replace(range, newText, id);
|
|
518
|
-
}
|
|
519
|
-
this.edits.push(edit);
|
|
520
|
-
if (id !== void 0) {
|
|
521
|
-
return id;
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
|
-
TextEditChangeImpl2.prototype.delete = function(range, annotation) {
|
|
525
|
-
var edit;
|
|
526
|
-
var id;
|
|
527
|
-
if (annotation === void 0) {
|
|
528
|
-
edit = TextEdit.del(range);
|
|
529
|
-
} else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
530
|
-
id = annotation;
|
|
531
|
-
edit = AnnotatedTextEdit.del(range, annotation);
|
|
532
|
-
} else {
|
|
533
|
-
this.assertChangeAnnotations(this.changeAnnotations);
|
|
534
|
-
id = this.changeAnnotations.manage(annotation);
|
|
535
|
-
edit = AnnotatedTextEdit.del(range, id);
|
|
536
|
-
}
|
|
537
|
-
this.edits.push(edit);
|
|
538
|
-
if (id !== void 0) {
|
|
539
|
-
return id;
|
|
540
|
-
}
|
|
541
|
-
};
|
|
542
|
-
TextEditChangeImpl2.prototype.add = function(edit) {
|
|
543
|
-
this.edits.push(edit);
|
|
544
|
-
};
|
|
545
|
-
TextEditChangeImpl2.prototype.all = function() {
|
|
546
|
-
return this.edits;
|
|
547
|
-
};
|
|
548
|
-
TextEditChangeImpl2.prototype.clear = function() {
|
|
549
|
-
this.edits.splice(0, this.edits.length);
|
|
550
|
-
};
|
|
551
|
-
TextEditChangeImpl2.prototype.assertChangeAnnotations = function(value) {
|
|
552
|
-
if (value === void 0) {
|
|
553
|
-
throw new Error("Text edit change is not configured to manage change annotations.");
|
|
554
|
-
}
|
|
555
|
-
};
|
|
556
|
-
return TextEditChangeImpl2;
|
|
557
|
-
}();
|
|
558
|
-
var ChangeAnnotations = function() {
|
|
559
|
-
function ChangeAnnotations2(annotations) {
|
|
560
|
-
this._annotations = annotations === void 0 ? /* @__PURE__ */ Object.create(null) : annotations;
|
|
561
|
-
this._counter = 0;
|
|
562
|
-
this._size = 0;
|
|
563
|
-
}
|
|
564
|
-
ChangeAnnotations2.prototype.all = function() {
|
|
565
|
-
return this._annotations;
|
|
566
|
-
};
|
|
567
|
-
Object.defineProperty(ChangeAnnotations2.prototype, "size", {
|
|
568
|
-
get: function() {
|
|
569
|
-
return this._size;
|
|
570
|
-
},
|
|
571
|
-
enumerable: false,
|
|
572
|
-
configurable: true
|
|
573
|
-
});
|
|
574
|
-
ChangeAnnotations2.prototype.manage = function(idOrAnnotation, annotation) {
|
|
575
|
-
var id;
|
|
576
|
-
if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
|
|
577
|
-
id = idOrAnnotation;
|
|
578
|
-
} else {
|
|
579
|
-
id = this.nextId();
|
|
580
|
-
annotation = idOrAnnotation;
|
|
581
|
-
}
|
|
582
|
-
if (this._annotations[id] !== void 0) {
|
|
583
|
-
throw new Error("Id " + id + " is already in use.");
|
|
584
|
-
}
|
|
585
|
-
if (annotation === void 0) {
|
|
586
|
-
throw new Error("No annotation provided for id " + id);
|
|
587
|
-
}
|
|
588
|
-
this._annotations[id] = annotation;
|
|
589
|
-
this._size++;
|
|
590
|
-
return id;
|
|
591
|
-
};
|
|
592
|
-
ChangeAnnotations2.prototype.nextId = function() {
|
|
593
|
-
this._counter++;
|
|
594
|
-
return this._counter.toString();
|
|
595
|
-
};
|
|
596
|
-
return ChangeAnnotations2;
|
|
597
|
-
}();
|
|
598
|
-
var WorkspaceChange = function() {
|
|
599
|
-
function WorkspaceChange2(workspaceEdit) {
|
|
600
|
-
var _this = this;
|
|
601
|
-
this._textEditChanges = /* @__PURE__ */ Object.create(null);
|
|
602
|
-
if (workspaceEdit !== void 0) {
|
|
603
|
-
this._workspaceEdit = workspaceEdit;
|
|
604
|
-
if (workspaceEdit.documentChanges) {
|
|
605
|
-
this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
|
|
606
|
-
workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
607
|
-
workspaceEdit.documentChanges.forEach(function(change) {
|
|
608
|
-
if (TextDocumentEdit.is(change)) {
|
|
609
|
-
var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
|
|
610
|
-
_this._textEditChanges[change.textDocument.uri] = textEditChange;
|
|
611
|
-
}
|
|
612
|
-
});
|
|
613
|
-
} else if (workspaceEdit.changes) {
|
|
614
|
-
Object.keys(workspaceEdit.changes).forEach(function(key) {
|
|
615
|
-
var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
|
|
616
|
-
_this._textEditChanges[key] = textEditChange;
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
} else {
|
|
620
|
-
this._workspaceEdit = {};
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
Object.defineProperty(WorkspaceChange2.prototype, "edit", {
|
|
624
|
-
get: function() {
|
|
625
|
-
this.initDocumentChanges();
|
|
626
|
-
if (this._changeAnnotations !== void 0) {
|
|
627
|
-
if (this._changeAnnotations.size === 0) {
|
|
628
|
-
this._workspaceEdit.changeAnnotations = void 0;
|
|
629
|
-
} else {
|
|
630
|
-
this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
return this._workspaceEdit;
|
|
634
|
-
},
|
|
635
|
-
enumerable: false,
|
|
636
|
-
configurable: true
|
|
637
|
-
});
|
|
638
|
-
WorkspaceChange2.prototype.getTextEditChange = function(key) {
|
|
639
|
-
if (OptionalVersionedTextDocumentIdentifier.is(key)) {
|
|
640
|
-
this.initDocumentChanges();
|
|
641
|
-
if (this._workspaceEdit.documentChanges === void 0) {
|
|
642
|
-
throw new Error("Workspace edit is not configured for document changes.");
|
|
643
|
-
}
|
|
644
|
-
var textDocument = { uri: key.uri, version: key.version };
|
|
645
|
-
var result = this._textEditChanges[textDocument.uri];
|
|
646
|
-
if (!result) {
|
|
647
|
-
var edits = [];
|
|
648
|
-
var textDocumentEdit = {
|
|
649
|
-
textDocument,
|
|
650
|
-
edits
|
|
651
|
-
};
|
|
652
|
-
this._workspaceEdit.documentChanges.push(textDocumentEdit);
|
|
653
|
-
result = new TextEditChangeImpl(edits, this._changeAnnotations);
|
|
654
|
-
this._textEditChanges[textDocument.uri] = result;
|
|
655
|
-
}
|
|
656
|
-
return result;
|
|
657
|
-
} else {
|
|
658
|
-
this.initChanges();
|
|
659
|
-
if (this._workspaceEdit.changes === void 0) {
|
|
660
|
-
throw new Error("Workspace edit is not configured for normal text edit changes.");
|
|
661
|
-
}
|
|
662
|
-
var result = this._textEditChanges[key];
|
|
663
|
-
if (!result) {
|
|
664
|
-
var edits = [];
|
|
665
|
-
this._workspaceEdit.changes[key] = edits;
|
|
666
|
-
result = new TextEditChangeImpl(edits);
|
|
667
|
-
this._textEditChanges[key] = result;
|
|
668
|
-
}
|
|
669
|
-
return result;
|
|
670
|
-
}
|
|
671
|
-
};
|
|
672
|
-
WorkspaceChange2.prototype.initDocumentChanges = function() {
|
|
673
|
-
if (this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0) {
|
|
674
|
-
this._changeAnnotations = new ChangeAnnotations();
|
|
675
|
-
this._workspaceEdit.documentChanges = [];
|
|
676
|
-
this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
677
|
-
}
|
|
678
|
-
};
|
|
679
|
-
WorkspaceChange2.prototype.initChanges = function() {
|
|
680
|
-
if (this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0) {
|
|
681
|
-
this._workspaceEdit.changes = /* @__PURE__ */ Object.create(null);
|
|
682
|
-
}
|
|
683
|
-
};
|
|
684
|
-
WorkspaceChange2.prototype.createFile = function(uri, optionsOrAnnotation, options) {
|
|
685
|
-
this.initDocumentChanges();
|
|
686
|
-
if (this._workspaceEdit.documentChanges === void 0) {
|
|
687
|
-
throw new Error("Workspace edit is not configured for document changes.");
|
|
688
|
-
}
|
|
689
|
-
var annotation;
|
|
690
|
-
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
691
|
-
annotation = optionsOrAnnotation;
|
|
692
|
-
} else {
|
|
693
|
-
options = optionsOrAnnotation;
|
|
694
|
-
}
|
|
695
|
-
var operation;
|
|
696
|
-
var id;
|
|
697
|
-
if (annotation === void 0) {
|
|
698
|
-
operation = CreateFile.create(uri, options);
|
|
699
|
-
} else {
|
|
700
|
-
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
701
|
-
operation = CreateFile.create(uri, options, id);
|
|
702
|
-
}
|
|
703
|
-
this._workspaceEdit.documentChanges.push(operation);
|
|
704
|
-
if (id !== void 0) {
|
|
705
|
-
return id;
|
|
706
|
-
}
|
|
707
|
-
};
|
|
708
|
-
WorkspaceChange2.prototype.renameFile = function(oldUri, newUri, optionsOrAnnotation, options) {
|
|
709
|
-
this.initDocumentChanges();
|
|
710
|
-
if (this._workspaceEdit.documentChanges === void 0) {
|
|
711
|
-
throw new Error("Workspace edit is not configured for document changes.");
|
|
712
|
-
}
|
|
713
|
-
var annotation;
|
|
714
|
-
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
715
|
-
annotation = optionsOrAnnotation;
|
|
716
|
-
} else {
|
|
717
|
-
options = optionsOrAnnotation;
|
|
718
|
-
}
|
|
719
|
-
var operation;
|
|
720
|
-
var id;
|
|
721
|
-
if (annotation === void 0) {
|
|
722
|
-
operation = RenameFile.create(oldUri, newUri, options);
|
|
723
|
-
} else {
|
|
724
|
-
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
725
|
-
operation = RenameFile.create(oldUri, newUri, options, id);
|
|
726
|
-
}
|
|
727
|
-
this._workspaceEdit.documentChanges.push(operation);
|
|
728
|
-
if (id !== void 0) {
|
|
729
|
-
return id;
|
|
730
|
-
}
|
|
731
|
-
};
|
|
732
|
-
WorkspaceChange2.prototype.deleteFile = function(uri, optionsOrAnnotation, options) {
|
|
733
|
-
this.initDocumentChanges();
|
|
734
|
-
if (this._workspaceEdit.documentChanges === void 0) {
|
|
735
|
-
throw new Error("Workspace edit is not configured for document changes.");
|
|
736
|
-
}
|
|
737
|
-
var annotation;
|
|
738
|
-
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
739
|
-
annotation = optionsOrAnnotation;
|
|
740
|
-
} else {
|
|
741
|
-
options = optionsOrAnnotation;
|
|
742
|
-
}
|
|
743
|
-
var operation;
|
|
744
|
-
var id;
|
|
745
|
-
if (annotation === void 0) {
|
|
746
|
-
operation = DeleteFile.create(uri, options);
|
|
747
|
-
} else {
|
|
748
|
-
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
749
|
-
operation = DeleteFile.create(uri, options, id);
|
|
750
|
-
}
|
|
751
|
-
this._workspaceEdit.documentChanges.push(operation);
|
|
752
|
-
if (id !== void 0) {
|
|
753
|
-
return id;
|
|
754
|
-
}
|
|
755
|
-
};
|
|
756
|
-
return WorkspaceChange2;
|
|
757
|
-
}();
|
|
758
|
-
var TextDocumentIdentifier;
|
|
759
|
-
(function(TextDocumentIdentifier2) {
|
|
760
|
-
function create(uri) {
|
|
761
|
-
return { uri };
|
|
762
|
-
}
|
|
763
|
-
TextDocumentIdentifier2.create = create;
|
|
764
|
-
function is(value) {
|
|
765
|
-
var candidate = value;
|
|
766
|
-
return Is.defined(candidate) && Is.string(candidate.uri);
|
|
767
|
-
}
|
|
768
|
-
TextDocumentIdentifier2.is = is;
|
|
769
|
-
})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
|
|
770
|
-
var VersionedTextDocumentIdentifier;
|
|
771
|
-
(function(VersionedTextDocumentIdentifier2) {
|
|
772
|
-
function create(uri, version) {
|
|
773
|
-
return { uri, version };
|
|
774
|
-
}
|
|
775
|
-
VersionedTextDocumentIdentifier2.create = create;
|
|
776
|
-
function is(value) {
|
|
777
|
-
var candidate = value;
|
|
778
|
-
return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
|
|
779
|
-
}
|
|
780
|
-
VersionedTextDocumentIdentifier2.is = is;
|
|
781
|
-
})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
|
|
782
|
-
var OptionalVersionedTextDocumentIdentifier;
|
|
783
|
-
(function(OptionalVersionedTextDocumentIdentifier2) {
|
|
784
|
-
function create(uri, version) {
|
|
785
|
-
return { uri, version };
|
|
786
|
-
}
|
|
787
|
-
OptionalVersionedTextDocumentIdentifier2.create = create;
|
|
788
|
-
function is(value) {
|
|
789
|
-
var candidate = value;
|
|
790
|
-
return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
|
|
791
|
-
}
|
|
792
|
-
OptionalVersionedTextDocumentIdentifier2.is = is;
|
|
793
|
-
})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));
|
|
794
|
-
var TextDocumentItem;
|
|
795
|
-
(function(TextDocumentItem2) {
|
|
796
|
-
function create(uri, languageId, version, text) {
|
|
797
|
-
return { uri, languageId, version, text };
|
|
798
|
-
}
|
|
799
|
-
TextDocumentItem2.create = create;
|
|
800
|
-
function is(value) {
|
|
801
|
-
var candidate = value;
|
|
802
|
-
return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
|
|
803
|
-
}
|
|
804
|
-
TextDocumentItem2.is = is;
|
|
805
|
-
})(TextDocumentItem || (TextDocumentItem = {}));
|
|
806
|
-
var MarkupKind;
|
|
807
|
-
(function(MarkupKind2) {
|
|
808
|
-
MarkupKind2.PlainText = "plaintext";
|
|
809
|
-
MarkupKind2.Markdown = "markdown";
|
|
810
|
-
})(MarkupKind || (MarkupKind = {}));
|
|
811
|
-
(function(MarkupKind2) {
|
|
812
|
-
function is(value) {
|
|
813
|
-
var candidate = value;
|
|
814
|
-
return candidate === MarkupKind2.PlainText || candidate === MarkupKind2.Markdown;
|
|
815
|
-
}
|
|
816
|
-
MarkupKind2.is = is;
|
|
817
|
-
})(MarkupKind || (MarkupKind = {}));
|
|
818
|
-
var MarkupContent;
|
|
819
|
-
(function(MarkupContent2) {
|
|
820
|
-
function is(value) {
|
|
821
|
-
var candidate = value;
|
|
822
|
-
return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
|
|
823
|
-
}
|
|
824
|
-
MarkupContent2.is = is;
|
|
825
|
-
})(MarkupContent || (MarkupContent = {}));
|
|
826
|
-
var CompletionItemKind;
|
|
827
|
-
(function(CompletionItemKind2) {
|
|
828
|
-
CompletionItemKind2.Text = 1;
|
|
829
|
-
CompletionItemKind2.Method = 2;
|
|
830
|
-
CompletionItemKind2.Function = 3;
|
|
831
|
-
CompletionItemKind2.Constructor = 4;
|
|
832
|
-
CompletionItemKind2.Field = 5;
|
|
833
|
-
CompletionItemKind2.Variable = 6;
|
|
834
|
-
CompletionItemKind2.Class = 7;
|
|
835
|
-
CompletionItemKind2.Interface = 8;
|
|
836
|
-
CompletionItemKind2.Module = 9;
|
|
837
|
-
CompletionItemKind2.Property = 10;
|
|
838
|
-
CompletionItemKind2.Unit = 11;
|
|
839
|
-
CompletionItemKind2.Value = 12;
|
|
840
|
-
CompletionItemKind2.Enum = 13;
|
|
841
|
-
CompletionItemKind2.Keyword = 14;
|
|
842
|
-
CompletionItemKind2.Snippet = 15;
|
|
843
|
-
CompletionItemKind2.Color = 16;
|
|
844
|
-
CompletionItemKind2.File = 17;
|
|
845
|
-
CompletionItemKind2.Reference = 18;
|
|
846
|
-
CompletionItemKind2.Folder = 19;
|
|
847
|
-
CompletionItemKind2.EnumMember = 20;
|
|
848
|
-
CompletionItemKind2.Constant = 21;
|
|
849
|
-
CompletionItemKind2.Struct = 22;
|
|
850
|
-
CompletionItemKind2.Event = 23;
|
|
851
|
-
CompletionItemKind2.Operator = 24;
|
|
852
|
-
CompletionItemKind2.TypeParameter = 25;
|
|
853
|
-
})(CompletionItemKind || (CompletionItemKind = {}));
|
|
854
|
-
var InsertTextFormat;
|
|
855
|
-
(function(InsertTextFormat2) {
|
|
856
|
-
InsertTextFormat2.PlainText = 1;
|
|
857
|
-
InsertTextFormat2.Snippet = 2;
|
|
858
|
-
})(InsertTextFormat || (InsertTextFormat = {}));
|
|
859
|
-
var CompletionItemTag;
|
|
860
|
-
(function(CompletionItemTag2) {
|
|
861
|
-
CompletionItemTag2.Deprecated = 1;
|
|
862
|
-
})(CompletionItemTag || (CompletionItemTag = {}));
|
|
863
|
-
var InsertReplaceEdit;
|
|
864
|
-
(function(InsertReplaceEdit2) {
|
|
865
|
-
function create(newText, insert, replace) {
|
|
866
|
-
return { newText, insert, replace };
|
|
867
|
-
}
|
|
868
|
-
InsertReplaceEdit2.create = create;
|
|
869
|
-
function is(value) {
|
|
870
|
-
var candidate = value;
|
|
871
|
-
return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
|
|
872
|
-
}
|
|
873
|
-
InsertReplaceEdit2.is = is;
|
|
874
|
-
})(InsertReplaceEdit || (InsertReplaceEdit = {}));
|
|
875
|
-
var InsertTextMode;
|
|
876
|
-
(function(InsertTextMode2) {
|
|
877
|
-
InsertTextMode2.asIs = 1;
|
|
878
|
-
InsertTextMode2.adjustIndentation = 2;
|
|
879
|
-
})(InsertTextMode || (InsertTextMode = {}));
|
|
880
|
-
var CompletionItem;
|
|
881
|
-
(function(CompletionItem2) {
|
|
882
|
-
function create(label) {
|
|
883
|
-
return { label };
|
|
884
|
-
}
|
|
885
|
-
CompletionItem2.create = create;
|
|
886
|
-
})(CompletionItem || (CompletionItem = {}));
|
|
887
|
-
var CompletionList;
|
|
888
|
-
(function(CompletionList2) {
|
|
889
|
-
function create(items, isIncomplete) {
|
|
890
|
-
return { items: items ? items : [], isIncomplete: !!isIncomplete };
|
|
891
|
-
}
|
|
892
|
-
CompletionList2.create = create;
|
|
893
|
-
})(CompletionList || (CompletionList = {}));
|
|
894
|
-
var MarkedString;
|
|
895
|
-
(function(MarkedString2) {
|
|
896
|
-
function fromPlainText(plainText) {
|
|
897
|
-
return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&");
|
|
898
|
-
}
|
|
899
|
-
MarkedString2.fromPlainText = fromPlainText;
|
|
900
|
-
function is(value) {
|
|
901
|
-
var candidate = value;
|
|
902
|
-
return Is.string(candidate) || Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value);
|
|
903
|
-
}
|
|
904
|
-
MarkedString2.is = is;
|
|
905
|
-
})(MarkedString || (MarkedString = {}));
|
|
906
|
-
var Hover;
|
|
907
|
-
(function(Hover2) {
|
|
908
|
-
function is(value) {
|
|
909
|
-
var candidate = value;
|
|
910
|
-
return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || MarkedString.is(candidate.contents) || Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
|
|
911
|
-
}
|
|
912
|
-
Hover2.is = is;
|
|
913
|
-
})(Hover || (Hover = {}));
|
|
914
|
-
var ParameterInformation;
|
|
915
|
-
(function(ParameterInformation2) {
|
|
916
|
-
function create(label, documentation) {
|
|
917
|
-
return documentation ? { label, documentation } : { label };
|
|
918
|
-
}
|
|
919
|
-
ParameterInformation2.create = create;
|
|
920
|
-
})(ParameterInformation || (ParameterInformation = {}));
|
|
921
|
-
var SignatureInformation;
|
|
922
|
-
(function(SignatureInformation2) {
|
|
923
|
-
function create(label, documentation) {
|
|
924
|
-
var parameters = [];
|
|
925
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
926
|
-
parameters[_i - 2] = arguments[_i];
|
|
927
|
-
}
|
|
928
|
-
var result = { label };
|
|
929
|
-
if (Is.defined(documentation)) {
|
|
930
|
-
result.documentation = documentation;
|
|
931
|
-
}
|
|
932
|
-
if (Is.defined(parameters)) {
|
|
933
|
-
result.parameters = parameters;
|
|
934
|
-
} else {
|
|
935
|
-
result.parameters = [];
|
|
936
|
-
}
|
|
937
|
-
return result;
|
|
938
|
-
}
|
|
939
|
-
SignatureInformation2.create = create;
|
|
940
|
-
})(SignatureInformation || (SignatureInformation = {}));
|
|
941
|
-
var DocumentHighlightKind;
|
|
942
|
-
(function(DocumentHighlightKind2) {
|
|
943
|
-
DocumentHighlightKind2.Text = 1;
|
|
944
|
-
DocumentHighlightKind2.Read = 2;
|
|
945
|
-
DocumentHighlightKind2.Write = 3;
|
|
946
|
-
})(DocumentHighlightKind || (DocumentHighlightKind = {}));
|
|
947
|
-
var DocumentHighlight;
|
|
948
|
-
(function(DocumentHighlight2) {
|
|
949
|
-
function create(range, kind) {
|
|
950
|
-
var result = { range };
|
|
951
|
-
if (Is.number(kind)) {
|
|
952
|
-
result.kind = kind;
|
|
953
|
-
}
|
|
954
|
-
return result;
|
|
955
|
-
}
|
|
956
|
-
DocumentHighlight2.create = create;
|
|
957
|
-
})(DocumentHighlight || (DocumentHighlight = {}));
|
|
958
|
-
var SymbolKind;
|
|
959
|
-
(function(SymbolKind2) {
|
|
960
|
-
SymbolKind2.File = 1;
|
|
961
|
-
SymbolKind2.Module = 2;
|
|
962
|
-
SymbolKind2.Namespace = 3;
|
|
963
|
-
SymbolKind2.Package = 4;
|
|
964
|
-
SymbolKind2.Class = 5;
|
|
965
|
-
SymbolKind2.Method = 6;
|
|
966
|
-
SymbolKind2.Property = 7;
|
|
967
|
-
SymbolKind2.Field = 8;
|
|
968
|
-
SymbolKind2.Constructor = 9;
|
|
969
|
-
SymbolKind2.Enum = 10;
|
|
970
|
-
SymbolKind2.Interface = 11;
|
|
971
|
-
SymbolKind2.Function = 12;
|
|
972
|
-
SymbolKind2.Variable = 13;
|
|
973
|
-
SymbolKind2.Constant = 14;
|
|
974
|
-
SymbolKind2.String = 15;
|
|
975
|
-
SymbolKind2.Number = 16;
|
|
976
|
-
SymbolKind2.Boolean = 17;
|
|
977
|
-
SymbolKind2.Array = 18;
|
|
978
|
-
SymbolKind2.Object = 19;
|
|
979
|
-
SymbolKind2.Key = 20;
|
|
980
|
-
SymbolKind2.Null = 21;
|
|
981
|
-
SymbolKind2.EnumMember = 22;
|
|
982
|
-
SymbolKind2.Struct = 23;
|
|
983
|
-
SymbolKind2.Event = 24;
|
|
984
|
-
SymbolKind2.Operator = 25;
|
|
985
|
-
SymbolKind2.TypeParameter = 26;
|
|
986
|
-
})(SymbolKind || (SymbolKind = {}));
|
|
987
|
-
var SymbolTag;
|
|
988
|
-
(function(SymbolTag2) {
|
|
989
|
-
SymbolTag2.Deprecated = 1;
|
|
990
|
-
})(SymbolTag || (SymbolTag = {}));
|
|
991
|
-
var SymbolInformation;
|
|
992
|
-
(function(SymbolInformation2) {
|
|
993
|
-
function create(name, kind, range, uri, containerName) {
|
|
994
|
-
var result = {
|
|
995
|
-
name,
|
|
996
|
-
kind,
|
|
997
|
-
location: { uri, range }
|
|
998
|
-
};
|
|
999
|
-
if (containerName) {
|
|
1000
|
-
result.containerName = containerName;
|
|
1001
|
-
}
|
|
1002
|
-
return result;
|
|
1003
|
-
}
|
|
1004
|
-
SymbolInformation2.create = create;
|
|
1005
|
-
})(SymbolInformation || (SymbolInformation = {}));
|
|
1006
|
-
var DocumentSymbol;
|
|
1007
|
-
(function(DocumentSymbol2) {
|
|
1008
|
-
function create(name, detail, kind, range, selectionRange, children) {
|
|
1009
|
-
var result = {
|
|
1010
|
-
name,
|
|
1011
|
-
detail,
|
|
1012
|
-
kind,
|
|
1013
|
-
range,
|
|
1014
|
-
selectionRange
|
|
1015
|
-
};
|
|
1016
|
-
if (children !== void 0) {
|
|
1017
|
-
result.children = children;
|
|
1018
|
-
}
|
|
1019
|
-
return result;
|
|
1020
|
-
}
|
|
1021
|
-
DocumentSymbol2.create = create;
|
|
1022
|
-
function is(value) {
|
|
1023
|
-
var candidate = value;
|
|
1024
|
-
return candidate && Is.string(candidate.name) && Is.number(candidate.kind) && Range.is(candidate.range) && Range.is(candidate.selectionRange) && (candidate.detail === void 0 || Is.string(candidate.detail)) && (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) && (candidate.children === void 0 || Array.isArray(candidate.children)) && (candidate.tags === void 0 || Array.isArray(candidate.tags));
|
|
1025
|
-
}
|
|
1026
|
-
DocumentSymbol2.is = is;
|
|
1027
|
-
})(DocumentSymbol || (DocumentSymbol = {}));
|
|
1028
|
-
var CodeActionKind;
|
|
1029
|
-
(function(CodeActionKind2) {
|
|
1030
|
-
CodeActionKind2.Empty = "";
|
|
1031
|
-
CodeActionKind2.QuickFix = "quickfix";
|
|
1032
|
-
CodeActionKind2.Refactor = "refactor";
|
|
1033
|
-
CodeActionKind2.RefactorExtract = "refactor.extract";
|
|
1034
|
-
CodeActionKind2.RefactorInline = "refactor.inline";
|
|
1035
|
-
CodeActionKind2.RefactorRewrite = "refactor.rewrite";
|
|
1036
|
-
CodeActionKind2.Source = "source";
|
|
1037
|
-
CodeActionKind2.SourceOrganizeImports = "source.organizeImports";
|
|
1038
|
-
CodeActionKind2.SourceFixAll = "source.fixAll";
|
|
1039
|
-
})(CodeActionKind || (CodeActionKind = {}));
|
|
1040
|
-
var CodeActionContext;
|
|
1041
|
-
(function(CodeActionContext2) {
|
|
1042
|
-
function create(diagnostics, only) {
|
|
1043
|
-
var result = { diagnostics };
|
|
1044
|
-
if (only !== void 0 && only !== null) {
|
|
1045
|
-
result.only = only;
|
|
1046
|
-
}
|
|
1047
|
-
return result;
|
|
1048
|
-
}
|
|
1049
|
-
CodeActionContext2.create = create;
|
|
1050
|
-
function is(value) {
|
|
1051
|
-
var candidate = value;
|
|
1052
|
-
return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
|
|
1053
|
-
}
|
|
1054
|
-
CodeActionContext2.is = is;
|
|
1055
|
-
})(CodeActionContext || (CodeActionContext = {}));
|
|
1056
|
-
var CodeAction;
|
|
1057
|
-
(function(CodeAction2) {
|
|
1058
|
-
function create(title, kindOrCommandOrEdit, kind) {
|
|
1059
|
-
var result = { title };
|
|
1060
|
-
var checkKind = true;
|
|
1061
|
-
if (typeof kindOrCommandOrEdit === "string") {
|
|
1062
|
-
checkKind = false;
|
|
1063
|
-
result.kind = kindOrCommandOrEdit;
|
|
1064
|
-
} else if (Command.is(kindOrCommandOrEdit)) {
|
|
1065
|
-
result.command = kindOrCommandOrEdit;
|
|
1066
|
-
} else {
|
|
1067
|
-
result.edit = kindOrCommandOrEdit;
|
|
1068
|
-
}
|
|
1069
|
-
if (checkKind && kind !== void 0) {
|
|
1070
|
-
result.kind = kind;
|
|
1071
|
-
}
|
|
1072
|
-
return result;
|
|
1073
|
-
}
|
|
1074
|
-
CodeAction2.create = create;
|
|
1075
|
-
function is(value) {
|
|
1076
|
-
var candidate = value;
|
|
1077
|
-
return candidate && Is.string(candidate.title) && (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && (candidate.kind === void 0 || Is.string(candidate.kind)) && (candidate.edit !== void 0 || candidate.command !== void 0) && (candidate.command === void 0 || Command.is(candidate.command)) && (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) && (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
|
|
1078
|
-
}
|
|
1079
|
-
CodeAction2.is = is;
|
|
1080
|
-
})(CodeAction || (CodeAction = {}));
|
|
1081
|
-
var CodeLens;
|
|
1082
|
-
(function(CodeLens2) {
|
|
1083
|
-
function create(range, data) {
|
|
1084
|
-
var result = { range };
|
|
1085
|
-
if (Is.defined(data)) {
|
|
1086
|
-
result.data = data;
|
|
1087
|
-
}
|
|
1088
|
-
return result;
|
|
1089
|
-
}
|
|
1090
|
-
CodeLens2.create = create;
|
|
1091
|
-
function is(value) {
|
|
1092
|
-
var candidate = value;
|
|
1093
|
-
return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
|
|
1094
|
-
}
|
|
1095
|
-
CodeLens2.is = is;
|
|
1096
|
-
})(CodeLens || (CodeLens = {}));
|
|
1097
|
-
var FormattingOptions;
|
|
1098
|
-
(function(FormattingOptions2) {
|
|
1099
|
-
function create(tabSize, insertSpaces) {
|
|
1100
|
-
return { tabSize, insertSpaces };
|
|
1101
|
-
}
|
|
1102
|
-
FormattingOptions2.create = create;
|
|
1103
|
-
function is(value) {
|
|
1104
|
-
var candidate = value;
|
|
1105
|
-
return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
|
|
1106
|
-
}
|
|
1107
|
-
FormattingOptions2.is = is;
|
|
1108
|
-
})(FormattingOptions || (FormattingOptions = {}));
|
|
1109
|
-
var DocumentLink;
|
|
1110
|
-
(function(DocumentLink2) {
|
|
1111
|
-
function create(range, target, data) {
|
|
1112
|
-
return { range, target, data };
|
|
1113
|
-
}
|
|
1114
|
-
DocumentLink2.create = create;
|
|
1115
|
-
function is(value) {
|
|
1116
|
-
var candidate = value;
|
|
1117
|
-
return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
|
|
1118
|
-
}
|
|
1119
|
-
DocumentLink2.is = is;
|
|
1120
|
-
})(DocumentLink || (DocumentLink = {}));
|
|
1121
|
-
var SelectionRange;
|
|
1122
|
-
(function(SelectionRange2) {
|
|
1123
|
-
function create(range, parent) {
|
|
1124
|
-
return { range, parent };
|
|
1125
|
-
}
|
|
1126
|
-
SelectionRange2.create = create;
|
|
1127
|
-
function is(value) {
|
|
1128
|
-
var candidate = value;
|
|
1129
|
-
return candidate !== void 0 && Range.is(candidate.range) && (candidate.parent === void 0 || SelectionRange2.is(candidate.parent));
|
|
1130
|
-
}
|
|
1131
|
-
SelectionRange2.is = is;
|
|
1132
|
-
})(SelectionRange || (SelectionRange = {}));
|
|
1133
|
-
var TextDocument;
|
|
1134
|
-
(function(TextDocument2) {
|
|
1135
|
-
function create(uri, languageId, version, content) {
|
|
1136
|
-
return new FullTextDocument(uri, languageId, version, content);
|
|
1137
|
-
}
|
|
1138
|
-
TextDocument2.create = create;
|
|
1139
|
-
function is(value) {
|
|
1140
|
-
var candidate = value;
|
|
1141
|
-
return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
|
|
1142
|
-
}
|
|
1143
|
-
TextDocument2.is = is;
|
|
1144
|
-
function applyEdits(document, edits) {
|
|
1145
|
-
var text = document.getText();
|
|
1146
|
-
var sortedEdits = mergeSort(edits, function(a, b) {
|
|
1147
|
-
var diff = a.range.start.line - b.range.start.line;
|
|
1148
|
-
if (diff === 0) {
|
|
1149
|
-
return a.range.start.character - b.range.start.character;
|
|
1150
|
-
}
|
|
1151
|
-
return diff;
|
|
1152
|
-
});
|
|
1153
|
-
var lastModifiedOffset = text.length;
|
|
1154
|
-
for (var i = sortedEdits.length - 1; i >= 0; i--) {
|
|
1155
|
-
var e = sortedEdits[i];
|
|
1156
|
-
var startOffset = document.offsetAt(e.range.start);
|
|
1157
|
-
var endOffset = document.offsetAt(e.range.end);
|
|
1158
|
-
if (endOffset <= lastModifiedOffset) {
|
|
1159
|
-
text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
|
|
1160
|
-
} else {
|
|
1161
|
-
throw new Error("Overlapping edit");
|
|
1162
|
-
}
|
|
1163
|
-
lastModifiedOffset = startOffset;
|
|
1164
|
-
}
|
|
1165
|
-
return text;
|
|
1166
|
-
}
|
|
1167
|
-
TextDocument2.applyEdits = applyEdits;
|
|
1168
|
-
function mergeSort(data, compare) {
|
|
1169
|
-
if (data.length <= 1) {
|
|
1170
|
-
return data;
|
|
1171
|
-
}
|
|
1172
|
-
var p = data.length / 2 | 0;
|
|
1173
|
-
var left = data.slice(0, p);
|
|
1174
|
-
var right = data.slice(p);
|
|
1175
|
-
mergeSort(left, compare);
|
|
1176
|
-
mergeSort(right, compare);
|
|
1177
|
-
var leftIdx = 0;
|
|
1178
|
-
var rightIdx = 0;
|
|
1179
|
-
var i = 0;
|
|
1180
|
-
while (leftIdx < left.length && rightIdx < right.length) {
|
|
1181
|
-
var ret = compare(left[leftIdx], right[rightIdx]);
|
|
1182
|
-
if (ret <= 0) {
|
|
1183
|
-
data[i++] = left[leftIdx++];
|
|
1184
|
-
} else {
|
|
1185
|
-
data[i++] = right[rightIdx++];
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
|
-
while (leftIdx < left.length) {
|
|
1189
|
-
data[i++] = left[leftIdx++];
|
|
1190
|
-
}
|
|
1191
|
-
while (rightIdx < right.length) {
|
|
1192
|
-
data[i++] = right[rightIdx++];
|
|
1193
|
-
}
|
|
1194
|
-
return data;
|
|
1195
|
-
}
|
|
1196
|
-
})(TextDocument || (TextDocument = {}));
|
|
1197
|
-
var FullTextDocument = function() {
|
|
1198
|
-
function FullTextDocument2(uri, languageId, version, content) {
|
|
1199
|
-
this._uri = uri;
|
|
1200
|
-
this._languageId = languageId;
|
|
1201
|
-
this._version = version;
|
|
1202
|
-
this._content = content;
|
|
1203
|
-
this._lineOffsets = void 0;
|
|
1204
|
-
}
|
|
1205
|
-
Object.defineProperty(FullTextDocument2.prototype, "uri", {
|
|
1206
|
-
get: function() {
|
|
1207
|
-
return this._uri;
|
|
1208
|
-
},
|
|
1209
|
-
enumerable: false,
|
|
1210
|
-
configurable: true
|
|
1211
|
-
});
|
|
1212
|
-
Object.defineProperty(FullTextDocument2.prototype, "languageId", {
|
|
1213
|
-
get: function() {
|
|
1214
|
-
return this._languageId;
|
|
1215
|
-
},
|
|
1216
|
-
enumerable: false,
|
|
1217
|
-
configurable: true
|
|
1218
|
-
});
|
|
1219
|
-
Object.defineProperty(FullTextDocument2.prototype, "version", {
|
|
1220
|
-
get: function() {
|
|
1221
|
-
return this._version;
|
|
1222
|
-
},
|
|
1223
|
-
enumerable: false,
|
|
1224
|
-
configurable: true
|
|
1225
|
-
});
|
|
1226
|
-
FullTextDocument2.prototype.getText = function(range) {
|
|
1227
|
-
if (range) {
|
|
1228
|
-
var start = this.offsetAt(range.start);
|
|
1229
|
-
var end = this.offsetAt(range.end);
|
|
1230
|
-
return this._content.substring(start, end);
|
|
1231
|
-
}
|
|
1232
|
-
return this._content;
|
|
1233
|
-
};
|
|
1234
|
-
FullTextDocument2.prototype.update = function(event, version) {
|
|
1235
|
-
this._content = event.text;
|
|
1236
|
-
this._version = version;
|
|
1237
|
-
this._lineOffsets = void 0;
|
|
1238
|
-
};
|
|
1239
|
-
FullTextDocument2.prototype.getLineOffsets = function() {
|
|
1240
|
-
if (this._lineOffsets === void 0) {
|
|
1241
|
-
var lineOffsets = [];
|
|
1242
|
-
var text = this._content;
|
|
1243
|
-
var isLineStart = true;
|
|
1244
|
-
for (var i = 0; i < text.length; i++) {
|
|
1245
|
-
if (isLineStart) {
|
|
1246
|
-
lineOffsets.push(i);
|
|
1247
|
-
isLineStart = false;
|
|
1248
|
-
}
|
|
1249
|
-
var ch = text.charAt(i);
|
|
1250
|
-
isLineStart = ch === "\r" || ch === "\n";
|
|
1251
|
-
if (ch === "\r" && i + 1 < text.length && text.charAt(i + 1) === "\n") {
|
|
1252
|
-
i++;
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
if (isLineStart && text.length > 0) {
|
|
1256
|
-
lineOffsets.push(text.length);
|
|
1257
|
-
}
|
|
1258
|
-
this._lineOffsets = lineOffsets;
|
|
1259
|
-
}
|
|
1260
|
-
return this._lineOffsets;
|
|
1261
|
-
};
|
|
1262
|
-
FullTextDocument2.prototype.positionAt = function(offset) {
|
|
1263
|
-
offset = Math.max(Math.min(offset, this._content.length), 0);
|
|
1264
|
-
var lineOffsets = this.getLineOffsets();
|
|
1265
|
-
var low = 0, high = lineOffsets.length;
|
|
1266
|
-
if (high === 0) {
|
|
1267
|
-
return Position.create(0, offset);
|
|
1268
|
-
}
|
|
1269
|
-
while (low < high) {
|
|
1270
|
-
var mid = Math.floor((low + high) / 2);
|
|
1271
|
-
if (lineOffsets[mid] > offset) {
|
|
1272
|
-
high = mid;
|
|
1273
|
-
} else {
|
|
1274
|
-
low = mid + 1;
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
var line = low - 1;
|
|
1278
|
-
return Position.create(line, offset - lineOffsets[line]);
|
|
1279
|
-
};
|
|
1280
|
-
FullTextDocument2.prototype.offsetAt = function(position) {
|
|
1281
|
-
var lineOffsets = this.getLineOffsets();
|
|
1282
|
-
if (position.line >= lineOffsets.length) {
|
|
1283
|
-
return this._content.length;
|
|
1284
|
-
} else if (position.line < 0) {
|
|
1285
|
-
return 0;
|
|
1286
|
-
}
|
|
1287
|
-
var lineOffset = lineOffsets[position.line];
|
|
1288
|
-
var nextLineOffset = position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : this._content.length;
|
|
1289
|
-
return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
|
|
1290
|
-
};
|
|
1291
|
-
Object.defineProperty(FullTextDocument2.prototype, "lineCount", {
|
|
1292
|
-
get: function() {
|
|
1293
|
-
return this.getLineOffsets().length;
|
|
1294
|
-
},
|
|
1295
|
-
enumerable: false,
|
|
1296
|
-
configurable: true
|
|
1297
|
-
});
|
|
1298
|
-
return FullTextDocument2;
|
|
1299
|
-
}();
|
|
1300
|
-
var Is;
|
|
1301
|
-
(function(Is2) {
|
|
1302
|
-
var toString = Object.prototype.toString;
|
|
1303
|
-
function defined(value) {
|
|
1304
|
-
return typeof value !== "undefined";
|
|
1305
|
-
}
|
|
1306
|
-
Is2.defined = defined;
|
|
1307
|
-
function undefined2(value) {
|
|
1308
|
-
return typeof value === "undefined";
|
|
1309
|
-
}
|
|
1310
|
-
Is2.undefined = undefined2;
|
|
1311
|
-
function boolean(value) {
|
|
1312
|
-
return value === true || value === false;
|
|
1313
|
-
}
|
|
1314
|
-
Is2.boolean = boolean;
|
|
1315
|
-
function string(value) {
|
|
1316
|
-
return toString.call(value) === "[object String]";
|
|
1317
|
-
}
|
|
1318
|
-
Is2.string = string;
|
|
1319
|
-
function number(value) {
|
|
1320
|
-
return toString.call(value) === "[object Number]";
|
|
1321
|
-
}
|
|
1322
|
-
Is2.number = number;
|
|
1323
|
-
function numberRange(value, min, max) {
|
|
1324
|
-
return toString.call(value) === "[object Number]" && min <= value && value <= max;
|
|
1325
|
-
}
|
|
1326
|
-
Is2.numberRange = numberRange;
|
|
1327
|
-
function integer2(value) {
|
|
1328
|
-
return toString.call(value) === "[object Number]" && -2147483648 <= value && value <= 2147483647;
|
|
1329
|
-
}
|
|
1330
|
-
Is2.integer = integer2;
|
|
1331
|
-
function uinteger2(value) {
|
|
1332
|
-
return toString.call(value) === "[object Number]" && 0 <= value && value <= 2147483647;
|
|
1333
|
-
}
|
|
1334
|
-
Is2.uinteger = uinteger2;
|
|
1335
|
-
function func(value) {
|
|
1336
|
-
return toString.call(value) === "[object Function]";
|
|
1337
|
-
}
|
|
1338
|
-
Is2.func = func;
|
|
1339
|
-
function objectLiteral(value) {
|
|
1340
|
-
return value !== null && typeof value === "object";
|
|
1341
|
-
}
|
|
1342
|
-
Is2.objectLiteral = objectLiteral;
|
|
1343
|
-
function typedArray(value, check) {
|
|
1344
|
-
return Array.isArray(value) && value.every(check);
|
|
1345
|
-
}
|
|
1346
|
-
Is2.typedArray = typedArray;
|
|
1347
|
-
})(Is || (Is = {}));
|
|
1348
|
-
|
|
1349
|
-
// src/language/common/lspLanguageFeatures.ts
|
|
1350
|
-
var DiagnosticsAdapter = class {
|
|
1351
|
-
constructor(_languageId, _worker, configChangeEvent) {
|
|
1352
|
-
this._languageId = _languageId;
|
|
1353
|
-
this._worker = _worker;
|
|
1354
|
-
const onModelAdd = (model) => {
|
|
1355
|
-
let modeId = model.getLanguageId();
|
|
1356
|
-
if (modeId !== this._languageId) {
|
|
1357
|
-
return;
|
|
1358
|
-
}
|
|
1359
|
-
let handle;
|
|
1360
|
-
this._listener[model.uri.toString()] = model.onDidChangeContent(() => {
|
|
1361
|
-
window.clearTimeout(handle);
|
|
1362
|
-
handle = window.setTimeout(() => this._doValidate(model.uri, modeId), 500);
|
|
1363
|
-
});
|
|
1364
|
-
this._doValidate(model.uri, modeId);
|
|
1365
|
-
};
|
|
1366
|
-
const onModelRemoved = (model) => {
|
|
1367
|
-
monaco_editor_core_exports.editor.setModelMarkers(model, this._languageId, []);
|
|
1368
|
-
let uriStr = model.uri.toString();
|
|
1369
|
-
let listener = this._listener[uriStr];
|
|
1370
|
-
if (listener) {
|
|
1371
|
-
listener.dispose();
|
|
1372
|
-
delete this._listener[uriStr];
|
|
1373
|
-
}
|
|
1374
|
-
};
|
|
1375
|
-
this._disposables.push(monaco_editor_core_exports.editor.onDidCreateModel(onModelAdd));
|
|
1376
|
-
this._disposables.push(monaco_editor_core_exports.editor.onWillDisposeModel(onModelRemoved));
|
|
1377
|
-
this._disposables.push(monaco_editor_core_exports.editor.onDidChangeModelLanguage((event) => {
|
|
1378
|
-
onModelRemoved(event.model);
|
|
1379
|
-
onModelAdd(event.model);
|
|
1380
|
-
}));
|
|
1381
|
-
this._disposables.push(configChangeEvent((_) => {
|
|
1382
|
-
monaco_editor_core_exports.editor.getModels().forEach((model) => {
|
|
1383
|
-
if (model.getLanguageId() === this._languageId) {
|
|
1384
|
-
onModelRemoved(model);
|
|
1385
|
-
onModelAdd(model);
|
|
1386
|
-
}
|
|
1387
|
-
});
|
|
1388
|
-
}));
|
|
1389
|
-
this._disposables.push({
|
|
1390
|
-
dispose: () => {
|
|
1391
|
-
monaco_editor_core_exports.editor.getModels().forEach(onModelRemoved);
|
|
1392
|
-
for (let key in this._listener) {
|
|
1393
|
-
this._listener[key].dispose();
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
});
|
|
1397
|
-
monaco_editor_core_exports.editor.getModels().forEach(onModelAdd);
|
|
1398
|
-
}
|
|
1399
|
-
_disposables = [];
|
|
1400
|
-
_listener = /* @__PURE__ */ Object.create(null);
|
|
1401
|
-
dispose() {
|
|
1402
|
-
this._disposables.forEach((d) => d && d.dispose());
|
|
1403
|
-
this._disposables.length = 0;
|
|
1404
|
-
}
|
|
1405
|
-
_doValidate(resource, languageId) {
|
|
1406
|
-
this._worker(resource).then((worker) => {
|
|
1407
|
-
return worker.doValidation(resource.toString());
|
|
1408
|
-
}).then((diagnostics) => {
|
|
1409
|
-
const markers = diagnostics.map((d) => toDiagnostics(resource, d));
|
|
1410
|
-
let model = monaco_editor_core_exports.editor.getModel(resource);
|
|
1411
|
-
if (model && model.getLanguageId() === languageId) {
|
|
1412
|
-
monaco_editor_core_exports.editor.setModelMarkers(model, languageId, markers);
|
|
1413
|
-
}
|
|
1414
|
-
}).then(void 0, (err) => {
|
|
1415
|
-
console.error(err);
|
|
1416
|
-
});
|
|
1417
|
-
}
|
|
1418
|
-
};
|
|
1419
|
-
function toSeverity(lsSeverity) {
|
|
1420
|
-
switch (lsSeverity) {
|
|
1421
|
-
case DiagnosticSeverity.Error:
|
|
1422
|
-
return monaco_editor_core_exports.MarkerSeverity.Error;
|
|
1423
|
-
case DiagnosticSeverity.Warning:
|
|
1424
|
-
return monaco_editor_core_exports.MarkerSeverity.Warning;
|
|
1425
|
-
case DiagnosticSeverity.Information:
|
|
1426
|
-
return monaco_editor_core_exports.MarkerSeverity.Info;
|
|
1427
|
-
case DiagnosticSeverity.Hint:
|
|
1428
|
-
return monaco_editor_core_exports.MarkerSeverity.Hint;
|
|
1429
|
-
default:
|
|
1430
|
-
return monaco_editor_core_exports.MarkerSeverity.Info;
|
|
1431
|
-
}
|
|
1432
|
-
}
|
|
1433
|
-
function toDiagnostics(resource, diag) {
|
|
1434
|
-
let code = typeof diag.code === "number" ? String(diag.code) : diag.code;
|
|
1435
|
-
return {
|
|
1436
|
-
severity: toSeverity(diag.severity),
|
|
1437
|
-
startLineNumber: diag.range.start.line + 1,
|
|
1438
|
-
startColumn: diag.range.start.character + 1,
|
|
1439
|
-
endLineNumber: diag.range.end.line + 1,
|
|
1440
|
-
endColumn: diag.range.end.character + 1,
|
|
1441
|
-
message: diag.message,
|
|
1442
|
-
code,
|
|
1443
|
-
source: diag.source
|
|
1444
|
-
};
|
|
1445
|
-
}
|
|
1446
|
-
var CompletionAdapter = class {
|
|
1447
|
-
constructor(_worker, _triggerCharacters) {
|
|
1448
|
-
this._worker = _worker;
|
|
1449
|
-
this._triggerCharacters = _triggerCharacters;
|
|
1450
|
-
}
|
|
1451
|
-
get triggerCharacters() {
|
|
1452
|
-
return this._triggerCharacters;
|
|
1453
|
-
}
|
|
1454
|
-
provideCompletionItems(model, position, context, token) {
|
|
1455
|
-
const resource = model.uri;
|
|
1456
|
-
return this._worker(resource).then((worker) => {
|
|
1457
|
-
return worker.doComplete(resource.toString(), fromPosition(position));
|
|
1458
|
-
}).then((info) => {
|
|
1459
|
-
if (!info) {
|
|
1460
|
-
return;
|
|
1461
|
-
}
|
|
1462
|
-
const wordInfo = model.getWordUntilPosition(position);
|
|
1463
|
-
const wordRange = new monaco_editor_core_exports.Range(position.lineNumber, wordInfo.startColumn, position.lineNumber, wordInfo.endColumn);
|
|
1464
|
-
const items = info.items.map((entry) => {
|
|
1465
|
-
const item = {
|
|
1466
|
-
label: entry.label,
|
|
1467
|
-
insertText: entry.insertText || entry.label,
|
|
1468
|
-
sortText: entry.sortText,
|
|
1469
|
-
filterText: entry.filterText,
|
|
1470
|
-
documentation: entry.documentation,
|
|
1471
|
-
detail: entry.detail,
|
|
1472
|
-
command: toCommand(entry.command),
|
|
1473
|
-
range: wordRange,
|
|
1474
|
-
kind: toCompletionItemKind(entry.kind)
|
|
1475
|
-
};
|
|
1476
|
-
if (entry.textEdit) {
|
|
1477
|
-
if (isInsertReplaceEdit(entry.textEdit)) {
|
|
1478
|
-
item.range = {
|
|
1479
|
-
insert: toRange(entry.textEdit.insert),
|
|
1480
|
-
replace: toRange(entry.textEdit.replace)
|
|
1481
|
-
};
|
|
1482
|
-
} else {
|
|
1483
|
-
item.range = toRange(entry.textEdit.range);
|
|
1484
|
-
}
|
|
1485
|
-
item.insertText = entry.textEdit.newText;
|
|
1486
|
-
}
|
|
1487
|
-
if (entry.additionalTextEdits) {
|
|
1488
|
-
item.additionalTextEdits = entry.additionalTextEdits.map(toTextEdit);
|
|
1489
|
-
}
|
|
1490
|
-
if (entry.insertTextFormat === InsertTextFormat.Snippet) {
|
|
1491
|
-
item.insertTextRules = monaco_editor_core_exports.languages.CompletionItemInsertTextRule.InsertAsSnippet;
|
|
1492
|
-
}
|
|
1493
|
-
return item;
|
|
1494
|
-
});
|
|
1495
|
-
return {
|
|
1496
|
-
isIncomplete: info.isIncomplete,
|
|
1497
|
-
suggestions: items
|
|
1498
|
-
};
|
|
1499
|
-
});
|
|
1500
|
-
}
|
|
1501
|
-
};
|
|
1502
|
-
function fromPosition(position) {
|
|
1503
|
-
if (!position) {
|
|
1504
|
-
return void 0;
|
|
1505
|
-
}
|
|
1506
|
-
return { character: position.column - 1, line: position.lineNumber - 1 };
|
|
1507
|
-
}
|
|
1508
|
-
function fromRange(range) {
|
|
1509
|
-
if (!range) {
|
|
1510
|
-
return void 0;
|
|
1511
|
-
}
|
|
1512
|
-
return {
|
|
1513
|
-
start: {
|
|
1514
|
-
line: range.startLineNumber - 1,
|
|
1515
|
-
character: range.startColumn - 1
|
|
1516
|
-
},
|
|
1517
|
-
end: { line: range.endLineNumber - 1, character: range.endColumn - 1 }
|
|
1518
|
-
};
|
|
1519
|
-
}
|
|
1520
|
-
function toRange(range) {
|
|
1521
|
-
if (!range) {
|
|
1522
|
-
return void 0;
|
|
1523
|
-
}
|
|
1524
|
-
return new monaco_editor_core_exports.Range(range.start.line + 1, range.start.character + 1, range.end.line + 1, range.end.character + 1);
|
|
1525
|
-
}
|
|
1526
|
-
function isInsertReplaceEdit(edit) {
|
|
1527
|
-
return typeof edit.insert !== "undefined" && typeof edit.replace !== "undefined";
|
|
1528
|
-
}
|
|
1529
|
-
function toCompletionItemKind(kind) {
|
|
1530
|
-
const mItemKind = monaco_editor_core_exports.languages.CompletionItemKind;
|
|
1531
|
-
switch (kind) {
|
|
1532
|
-
case CompletionItemKind.Text:
|
|
1533
|
-
return mItemKind.Text;
|
|
1534
|
-
case CompletionItemKind.Method:
|
|
1535
|
-
return mItemKind.Method;
|
|
1536
|
-
case CompletionItemKind.Function:
|
|
1537
|
-
return mItemKind.Function;
|
|
1538
|
-
case CompletionItemKind.Constructor:
|
|
1539
|
-
return mItemKind.Constructor;
|
|
1540
|
-
case CompletionItemKind.Field:
|
|
1541
|
-
return mItemKind.Field;
|
|
1542
|
-
case CompletionItemKind.Variable:
|
|
1543
|
-
return mItemKind.Variable;
|
|
1544
|
-
case CompletionItemKind.Class:
|
|
1545
|
-
return mItemKind.Class;
|
|
1546
|
-
case CompletionItemKind.Interface:
|
|
1547
|
-
return mItemKind.Interface;
|
|
1548
|
-
case CompletionItemKind.Module:
|
|
1549
|
-
return mItemKind.Module;
|
|
1550
|
-
case CompletionItemKind.Property:
|
|
1551
|
-
return mItemKind.Property;
|
|
1552
|
-
case CompletionItemKind.Unit:
|
|
1553
|
-
return mItemKind.Unit;
|
|
1554
|
-
case CompletionItemKind.Value:
|
|
1555
|
-
return mItemKind.Value;
|
|
1556
|
-
case CompletionItemKind.Enum:
|
|
1557
|
-
return mItemKind.Enum;
|
|
1558
|
-
case CompletionItemKind.Keyword:
|
|
1559
|
-
return mItemKind.Keyword;
|
|
1560
|
-
case CompletionItemKind.Snippet:
|
|
1561
|
-
return mItemKind.Snippet;
|
|
1562
|
-
case CompletionItemKind.Color:
|
|
1563
|
-
return mItemKind.Color;
|
|
1564
|
-
case CompletionItemKind.File:
|
|
1565
|
-
return mItemKind.File;
|
|
1566
|
-
case CompletionItemKind.Reference:
|
|
1567
|
-
return mItemKind.Reference;
|
|
1568
|
-
}
|
|
1569
|
-
return mItemKind.Property;
|
|
1570
|
-
}
|
|
1571
|
-
function toTextEdit(textEdit) {
|
|
1572
|
-
if (!textEdit) {
|
|
1573
|
-
return void 0;
|
|
1574
|
-
}
|
|
1575
|
-
return {
|
|
1576
|
-
range: toRange(textEdit.range),
|
|
1577
|
-
text: textEdit.newText
|
|
1578
|
-
};
|
|
1579
|
-
}
|
|
1580
|
-
function toCommand(c) {
|
|
1581
|
-
return c && c.command === "editor.action.triggerSuggest" ? { id: c.command, title: c.title, arguments: c.arguments } : void 0;
|
|
1582
|
-
}
|
|
1583
|
-
var HoverAdapter = class {
|
|
1584
|
-
constructor(_worker) {
|
|
1585
|
-
this._worker = _worker;
|
|
1586
|
-
}
|
|
1587
|
-
provideHover(model, position, token) {
|
|
1588
|
-
let resource = model.uri;
|
|
1589
|
-
return this._worker(resource).then((worker) => {
|
|
1590
|
-
return worker.doHover(resource.toString(), fromPosition(position));
|
|
1591
|
-
}).then((info) => {
|
|
1592
|
-
if (!info) {
|
|
1593
|
-
return;
|
|
1594
|
-
}
|
|
1595
|
-
return {
|
|
1596
|
-
range: toRange(info.range),
|
|
1597
|
-
contents: toMarkedStringArray(info.contents)
|
|
1598
|
-
};
|
|
1599
|
-
});
|
|
1600
|
-
}
|
|
1601
|
-
};
|
|
1602
|
-
function isMarkupContent(thing) {
|
|
1603
|
-
return thing && typeof thing === "object" && typeof thing.kind === "string";
|
|
1604
|
-
}
|
|
1605
|
-
function toMarkdownString(entry) {
|
|
1606
|
-
if (typeof entry === "string") {
|
|
1607
|
-
return {
|
|
1608
|
-
value: entry
|
|
1609
|
-
};
|
|
1610
|
-
}
|
|
1611
|
-
if (isMarkupContent(entry)) {
|
|
1612
|
-
if (entry.kind === "plaintext") {
|
|
1613
|
-
return {
|
|
1614
|
-
value: entry.value.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&")
|
|
1615
|
-
};
|
|
1616
|
-
}
|
|
1617
|
-
return {
|
|
1618
|
-
value: entry.value
|
|
1619
|
-
};
|
|
1620
|
-
}
|
|
1621
|
-
return { value: "```" + entry.language + "\n" + entry.value + "\n```\n" };
|
|
1622
|
-
}
|
|
1623
|
-
function toMarkedStringArray(contents) {
|
|
1624
|
-
if (!contents) {
|
|
1625
|
-
return void 0;
|
|
1626
|
-
}
|
|
1627
|
-
if (Array.isArray(contents)) {
|
|
1628
|
-
return contents.map(toMarkdownString);
|
|
1629
|
-
}
|
|
1630
|
-
return [toMarkdownString(contents)];
|
|
1631
|
-
}
|
|
1632
|
-
var DocumentHighlightAdapter = class {
|
|
1633
|
-
constructor(_worker) {
|
|
1634
|
-
this._worker = _worker;
|
|
1635
|
-
}
|
|
1636
|
-
provideDocumentHighlights(model, position, token) {
|
|
1637
|
-
const resource = model.uri;
|
|
1638
|
-
return this._worker(resource).then((worker) => worker.findDocumentHighlights(resource.toString(), fromPosition(position))).then((entries) => {
|
|
1639
|
-
if (!entries) {
|
|
1640
|
-
return;
|
|
1641
|
-
}
|
|
1642
|
-
return entries.map((entry) => {
|
|
1643
|
-
return {
|
|
1644
|
-
range: toRange(entry.range),
|
|
1645
|
-
kind: toDocumentHighlightKind(entry.kind)
|
|
1646
|
-
};
|
|
1647
|
-
});
|
|
1648
|
-
});
|
|
1649
|
-
}
|
|
1650
|
-
};
|
|
1651
|
-
function toDocumentHighlightKind(kind) {
|
|
1652
|
-
switch (kind) {
|
|
1653
|
-
case DocumentHighlightKind.Read:
|
|
1654
|
-
return monaco_editor_core_exports.languages.DocumentHighlightKind.Read;
|
|
1655
|
-
case DocumentHighlightKind.Write:
|
|
1656
|
-
return monaco_editor_core_exports.languages.DocumentHighlightKind.Write;
|
|
1657
|
-
case DocumentHighlightKind.Text:
|
|
1658
|
-
return monaco_editor_core_exports.languages.DocumentHighlightKind.Text;
|
|
1659
|
-
}
|
|
1660
|
-
return monaco_editor_core_exports.languages.DocumentHighlightKind.Text;
|
|
1661
|
-
}
|
|
1662
|
-
var DefinitionAdapter = class {
|
|
1663
|
-
constructor(_worker) {
|
|
1664
|
-
this._worker = _worker;
|
|
1665
|
-
}
|
|
1666
|
-
provideDefinition(model, position, token) {
|
|
1667
|
-
const resource = model.uri;
|
|
1668
|
-
return this._worker(resource).then((worker) => {
|
|
1669
|
-
return worker.findDefinition(resource.toString(), fromPosition(position));
|
|
1670
|
-
}).then((definition) => {
|
|
1671
|
-
if (!definition) {
|
|
1672
|
-
return;
|
|
1673
|
-
}
|
|
1674
|
-
return [toLocation(definition)];
|
|
1675
|
-
});
|
|
1676
|
-
}
|
|
1677
|
-
};
|
|
1678
|
-
function toLocation(location) {
|
|
1679
|
-
return {
|
|
1680
|
-
uri: monaco_editor_core_exports.Uri.parse(location.uri),
|
|
1681
|
-
range: toRange(location.range)
|
|
1682
|
-
};
|
|
1683
|
-
}
|
|
1684
|
-
var ReferenceAdapter = class {
|
|
1685
|
-
constructor(_worker) {
|
|
1686
|
-
this._worker = _worker;
|
|
1687
|
-
}
|
|
1688
|
-
provideReferences(model, position, context, token) {
|
|
1689
|
-
const resource = model.uri;
|
|
1690
|
-
return this._worker(resource).then((worker) => {
|
|
1691
|
-
return worker.findReferences(resource.toString(), fromPosition(position));
|
|
1692
|
-
}).then((entries) => {
|
|
1693
|
-
if (!entries) {
|
|
1694
|
-
return;
|
|
1695
|
-
}
|
|
1696
|
-
return entries.map(toLocation);
|
|
1697
|
-
});
|
|
1698
|
-
}
|
|
1699
|
-
};
|
|
1700
|
-
var RenameAdapter = class {
|
|
1701
|
-
constructor(_worker) {
|
|
1702
|
-
this._worker = _worker;
|
|
1703
|
-
}
|
|
1704
|
-
provideRenameEdits(model, position, newName, token) {
|
|
1705
|
-
const resource = model.uri;
|
|
1706
|
-
return this._worker(resource).then((worker) => {
|
|
1707
|
-
return worker.doRename(resource.toString(), fromPosition(position), newName);
|
|
1708
|
-
}).then((edit) => {
|
|
1709
|
-
return toWorkspaceEdit(edit);
|
|
1710
|
-
});
|
|
1711
|
-
}
|
|
1712
|
-
};
|
|
1713
|
-
function toWorkspaceEdit(edit) {
|
|
1714
|
-
if (!edit || !edit.changes) {
|
|
1715
|
-
return void 0;
|
|
1716
|
-
}
|
|
1717
|
-
let resourceEdits = [];
|
|
1718
|
-
for (let uri in edit.changes) {
|
|
1719
|
-
const _uri = monaco_editor_core_exports.Uri.parse(uri);
|
|
1720
|
-
for (let e of edit.changes[uri]) {
|
|
1721
|
-
resourceEdits.push({
|
|
1722
|
-
resource: _uri,
|
|
1723
|
-
versionId: void 0,
|
|
1724
|
-
textEdit: {
|
|
1725
|
-
range: toRange(e.range),
|
|
1726
|
-
text: e.newText
|
|
1727
|
-
}
|
|
1728
|
-
});
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
return {
|
|
1732
|
-
edits: resourceEdits
|
|
1733
|
-
};
|
|
1734
|
-
}
|
|
1735
|
-
var DocumentSymbolAdapter = class {
|
|
1736
|
-
constructor(_worker) {
|
|
1737
|
-
this._worker = _worker;
|
|
1738
|
-
}
|
|
1739
|
-
provideDocumentSymbols(model, token) {
|
|
1740
|
-
const resource = model.uri;
|
|
1741
|
-
return this._worker(resource).then((worker) => worker.findDocumentSymbols(resource.toString())).then((items) => {
|
|
1742
|
-
if (!items) {
|
|
1743
|
-
return;
|
|
1744
|
-
}
|
|
1745
|
-
return items.map((item) => ({
|
|
1746
|
-
name: item.name,
|
|
1747
|
-
detail: "",
|
|
1748
|
-
containerName: item.containerName,
|
|
1749
|
-
kind: toSymbolKind(item.kind),
|
|
1750
|
-
range: toRange(item.location.range),
|
|
1751
|
-
selectionRange: toRange(item.location.range),
|
|
1752
|
-
tags: []
|
|
1753
|
-
}));
|
|
1754
|
-
});
|
|
1755
|
-
}
|
|
1756
|
-
};
|
|
1757
|
-
function toSymbolKind(kind) {
|
|
1758
|
-
let mKind = monaco_editor_core_exports.languages.SymbolKind;
|
|
1759
|
-
switch (kind) {
|
|
1760
|
-
case SymbolKind.File:
|
|
1761
|
-
return mKind.Array;
|
|
1762
|
-
case SymbolKind.Module:
|
|
1763
|
-
return mKind.Module;
|
|
1764
|
-
case SymbolKind.Namespace:
|
|
1765
|
-
return mKind.Namespace;
|
|
1766
|
-
case SymbolKind.Package:
|
|
1767
|
-
return mKind.Package;
|
|
1768
|
-
case SymbolKind.Class:
|
|
1769
|
-
return mKind.Class;
|
|
1770
|
-
case SymbolKind.Method:
|
|
1771
|
-
return mKind.Method;
|
|
1772
|
-
case SymbolKind.Property:
|
|
1773
|
-
return mKind.Property;
|
|
1774
|
-
case SymbolKind.Field:
|
|
1775
|
-
return mKind.Field;
|
|
1776
|
-
case SymbolKind.Constructor:
|
|
1777
|
-
return mKind.Constructor;
|
|
1778
|
-
case SymbolKind.Enum:
|
|
1779
|
-
return mKind.Enum;
|
|
1780
|
-
case SymbolKind.Interface:
|
|
1781
|
-
return mKind.Interface;
|
|
1782
|
-
case SymbolKind.Function:
|
|
1783
|
-
return mKind.Function;
|
|
1784
|
-
case SymbolKind.Variable:
|
|
1785
|
-
return mKind.Variable;
|
|
1786
|
-
case SymbolKind.Constant:
|
|
1787
|
-
return mKind.Constant;
|
|
1788
|
-
case SymbolKind.String:
|
|
1789
|
-
return mKind.String;
|
|
1790
|
-
case SymbolKind.Number:
|
|
1791
|
-
return mKind.Number;
|
|
1792
|
-
case SymbolKind.Boolean:
|
|
1793
|
-
return mKind.Boolean;
|
|
1794
|
-
case SymbolKind.Array:
|
|
1795
|
-
return mKind.Array;
|
|
1796
|
-
}
|
|
1797
|
-
return mKind.Function;
|
|
1798
|
-
}
|
|
1799
|
-
var DocumentLinkAdapter = class {
|
|
1800
|
-
constructor(_worker) {
|
|
1801
|
-
this._worker = _worker;
|
|
1802
|
-
}
|
|
1803
|
-
provideLinks(model, token) {
|
|
1804
|
-
const resource = model.uri;
|
|
1805
|
-
return this._worker(resource).then((worker) => worker.findDocumentLinks(resource.toString())).then((items) => {
|
|
1806
|
-
if (!items) {
|
|
1807
|
-
return;
|
|
1808
|
-
}
|
|
1809
|
-
return {
|
|
1810
|
-
links: items.map((item) => ({
|
|
1811
|
-
range: toRange(item.range),
|
|
1812
|
-
url: item.target
|
|
1813
|
-
}))
|
|
1814
|
-
};
|
|
1815
|
-
});
|
|
1816
|
-
}
|
|
1817
|
-
};
|
|
1818
|
-
var DocumentFormattingEditProvider = class {
|
|
1819
|
-
constructor(_worker) {
|
|
1820
|
-
this._worker = _worker;
|
|
1821
|
-
}
|
|
1822
|
-
provideDocumentFormattingEdits(model, options, token) {
|
|
1823
|
-
const resource = model.uri;
|
|
1824
|
-
return this._worker(resource).then((worker) => {
|
|
1825
|
-
return worker.format(resource.toString(), null, fromFormattingOptions(options)).then((edits) => {
|
|
1826
|
-
if (!edits || edits.length === 0) {
|
|
1827
|
-
return;
|
|
1828
|
-
}
|
|
1829
|
-
return edits.map(toTextEdit);
|
|
1830
|
-
});
|
|
1831
|
-
});
|
|
1832
|
-
}
|
|
1833
|
-
};
|
|
1834
|
-
var DocumentRangeFormattingEditProvider = class {
|
|
1835
|
-
constructor(_worker) {
|
|
1836
|
-
this._worker = _worker;
|
|
1837
|
-
}
|
|
1838
|
-
canFormatMultipleRanges = false;
|
|
1839
|
-
provideDocumentRangeFormattingEdits(model, range, options, token) {
|
|
1840
|
-
const resource = model.uri;
|
|
1841
|
-
return this._worker(resource).then((worker) => {
|
|
1842
|
-
return worker.format(resource.toString(), fromRange(range), fromFormattingOptions(options)).then((edits) => {
|
|
1843
|
-
if (!edits || edits.length === 0) {
|
|
1844
|
-
return;
|
|
1845
|
-
}
|
|
1846
|
-
return edits.map(toTextEdit);
|
|
1847
|
-
});
|
|
1848
|
-
});
|
|
1849
|
-
}
|
|
1850
|
-
};
|
|
1851
|
-
function fromFormattingOptions(options) {
|
|
1852
|
-
return {
|
|
1853
|
-
tabSize: options.tabSize,
|
|
1854
|
-
insertSpaces: options.insertSpaces
|
|
1855
|
-
};
|
|
1856
|
-
}
|
|
1857
|
-
var DocumentColorAdapter = class {
|
|
1858
|
-
constructor(_worker) {
|
|
1859
|
-
this._worker = _worker;
|
|
1860
|
-
}
|
|
1861
|
-
provideDocumentColors(model, token) {
|
|
1862
|
-
const resource = model.uri;
|
|
1863
|
-
return this._worker(resource).then((worker) => worker.findDocumentColors(resource.toString())).then((infos) => {
|
|
1864
|
-
if (!infos) {
|
|
1865
|
-
return;
|
|
1866
|
-
}
|
|
1867
|
-
return infos.map((item) => ({
|
|
1868
|
-
color: item.color,
|
|
1869
|
-
range: toRange(item.range)
|
|
1870
|
-
}));
|
|
1871
|
-
});
|
|
1872
|
-
}
|
|
1873
|
-
provideColorPresentations(model, info, token) {
|
|
1874
|
-
const resource = model.uri;
|
|
1875
|
-
return this._worker(resource).then((worker) => worker.getColorPresentations(resource.toString(), info.color, fromRange(info.range))).then((presentations) => {
|
|
1876
|
-
if (!presentations) {
|
|
1877
|
-
return;
|
|
1878
|
-
}
|
|
1879
|
-
return presentations.map((presentation) => {
|
|
1880
|
-
let item = {
|
|
1881
|
-
label: presentation.label
|
|
1882
|
-
};
|
|
1883
|
-
if (presentation.textEdit) {
|
|
1884
|
-
item.textEdit = toTextEdit(presentation.textEdit);
|
|
1885
|
-
}
|
|
1886
|
-
if (presentation.additionalTextEdits) {
|
|
1887
|
-
item.additionalTextEdits = presentation.additionalTextEdits.map(toTextEdit);
|
|
1888
|
-
}
|
|
1889
|
-
return item;
|
|
1890
|
-
});
|
|
1891
|
-
});
|
|
1892
|
-
}
|
|
1893
|
-
};
|
|
1894
|
-
var FoldingRangeAdapter = class {
|
|
1895
|
-
constructor(_worker) {
|
|
1896
|
-
this._worker = _worker;
|
|
1897
|
-
}
|
|
1898
|
-
provideFoldingRanges(model, context, token) {
|
|
1899
|
-
const resource = model.uri;
|
|
1900
|
-
return this._worker(resource).then((worker) => worker.getFoldingRanges(resource.toString(), context)).then((ranges) => {
|
|
1901
|
-
if (!ranges) {
|
|
1902
|
-
return;
|
|
1903
|
-
}
|
|
1904
|
-
return ranges.map((range) => {
|
|
1905
|
-
const result = {
|
|
1906
|
-
start: range.startLine + 1,
|
|
1907
|
-
end: range.endLine + 1
|
|
1908
|
-
};
|
|
1909
|
-
if (typeof range.kind !== "undefined") {
|
|
1910
|
-
result.kind = toFoldingRangeKind(range.kind);
|
|
1911
|
-
}
|
|
1912
|
-
return result;
|
|
1913
|
-
});
|
|
1914
|
-
});
|
|
1915
|
-
}
|
|
1916
|
-
};
|
|
1917
|
-
function toFoldingRangeKind(kind) {
|
|
1918
|
-
switch (kind) {
|
|
1919
|
-
case FoldingRangeKind.Comment:
|
|
1920
|
-
return monaco_editor_core_exports.languages.FoldingRangeKind.Comment;
|
|
1921
|
-
case FoldingRangeKind.Imports:
|
|
1922
|
-
return monaco_editor_core_exports.languages.FoldingRangeKind.Imports;
|
|
1923
|
-
case FoldingRangeKind.Region:
|
|
1924
|
-
return monaco_editor_core_exports.languages.FoldingRangeKind.Region;
|
|
1925
|
-
}
|
|
1926
|
-
return void 0;
|
|
1927
|
-
}
|
|
1928
|
-
var SelectionRangeAdapter = class {
|
|
1929
|
-
constructor(_worker) {
|
|
1930
|
-
this._worker = _worker;
|
|
1931
|
-
}
|
|
1932
|
-
provideSelectionRanges(model, positions, token) {
|
|
1933
|
-
const resource = model.uri;
|
|
1934
|
-
return this._worker(resource).then((worker) => worker.getSelectionRanges(resource.toString(), positions.map(fromPosition))).then((selectionRanges) => {
|
|
1935
|
-
if (!selectionRanges) {
|
|
1936
|
-
return;
|
|
1937
|
-
}
|
|
1938
|
-
return selectionRanges.map((selectionRange) => {
|
|
1939
|
-
const result = [];
|
|
1940
|
-
while (selectionRange) {
|
|
1941
|
-
result.push({ range: toRange(selectionRange.range) });
|
|
1942
|
-
selectionRange = selectionRange.parent;
|
|
1943
|
-
}
|
|
1944
|
-
return result;
|
|
1945
|
-
});
|
|
1946
|
-
});
|
|
1947
|
-
}
|
|
1948
|
-
};
|
|
1949
|
-
|
|
1950
|
-
// src/language/css/cssMode.ts
|
|
1951
|
-
function setupMode(defaults) {
|
|
1952
|
-
const disposables = [];
|
|
1953
|
-
const providers = [];
|
|
1954
|
-
const client = new WorkerManager(defaults);
|
|
1955
|
-
disposables.push(client);
|
|
1956
|
-
const worker = (...uris) => {
|
|
1957
|
-
return client.getLanguageServiceWorker(...uris);
|
|
1958
|
-
};
|
|
1959
|
-
function registerProviders() {
|
|
1960
|
-
const { languageId, modeConfiguration } = defaults;
|
|
1961
|
-
disposeAll(providers);
|
|
1962
|
-
if (modeConfiguration.completionItems) {
|
|
1963
|
-
providers.push(monaco_editor_core_exports.languages.registerCompletionItemProvider(languageId, new CompletionAdapter(worker, ["/", "-", ":"])));
|
|
1964
|
-
}
|
|
1965
|
-
if (modeConfiguration.hovers) {
|
|
1966
|
-
providers.push(monaco_editor_core_exports.languages.registerHoverProvider(languageId, new HoverAdapter(worker)));
|
|
1967
|
-
}
|
|
1968
|
-
if (modeConfiguration.documentHighlights) {
|
|
1969
|
-
providers.push(monaco_editor_core_exports.languages.registerDocumentHighlightProvider(languageId, new DocumentHighlightAdapter(worker)));
|
|
1970
|
-
}
|
|
1971
|
-
if (modeConfiguration.definitions) {
|
|
1972
|
-
providers.push(monaco_editor_core_exports.languages.registerDefinitionProvider(languageId, new DefinitionAdapter(worker)));
|
|
1973
|
-
}
|
|
1974
|
-
if (modeConfiguration.references) {
|
|
1975
|
-
providers.push(monaco_editor_core_exports.languages.registerReferenceProvider(languageId, new ReferenceAdapter(worker)));
|
|
1976
|
-
}
|
|
1977
|
-
if (modeConfiguration.documentSymbols) {
|
|
1978
|
-
providers.push(monaco_editor_core_exports.languages.registerDocumentSymbolProvider(languageId, new DocumentSymbolAdapter(worker)));
|
|
1979
|
-
}
|
|
1980
|
-
if (modeConfiguration.rename) {
|
|
1981
|
-
providers.push(monaco_editor_core_exports.languages.registerRenameProvider(languageId, new RenameAdapter(worker)));
|
|
1982
|
-
}
|
|
1983
|
-
if (modeConfiguration.colors) {
|
|
1984
|
-
providers.push(monaco_editor_core_exports.languages.registerColorProvider(languageId, new DocumentColorAdapter(worker)));
|
|
1985
|
-
}
|
|
1986
|
-
if (modeConfiguration.foldingRanges) {
|
|
1987
|
-
providers.push(monaco_editor_core_exports.languages.registerFoldingRangeProvider(languageId, new FoldingRangeAdapter(worker)));
|
|
1988
|
-
}
|
|
1989
|
-
if (modeConfiguration.diagnostics) {
|
|
1990
|
-
providers.push(new DiagnosticsAdapter(languageId, worker, defaults.onDidChange));
|
|
1991
|
-
}
|
|
1992
|
-
if (modeConfiguration.selectionRanges) {
|
|
1993
|
-
providers.push(monaco_editor_core_exports.languages.registerSelectionRangeProvider(languageId, new SelectionRangeAdapter(worker)));
|
|
1994
|
-
}
|
|
1995
|
-
if (modeConfiguration.documentFormattingEdits) {
|
|
1996
|
-
providers.push(monaco_editor_core_exports.languages.registerDocumentFormattingEditProvider(languageId, new DocumentFormattingEditProvider(worker)));
|
|
1997
|
-
}
|
|
1998
|
-
if (modeConfiguration.documentRangeFormattingEdits) {
|
|
1999
|
-
providers.push(monaco_editor_core_exports.languages.registerDocumentRangeFormattingEditProvider(languageId, new DocumentRangeFormattingEditProvider(worker)));
|
|
2000
|
-
}
|
|
2001
|
-
}
|
|
2002
|
-
registerProviders();
|
|
2003
|
-
disposables.push(asDisposable(providers));
|
|
2004
|
-
return asDisposable(disposables);
|
|
2005
|
-
}
|
|
2006
|
-
function asDisposable(disposables) {
|
|
2007
|
-
return { dispose: () => disposeAll(disposables) };
|
|
2008
|
-
}
|
|
2009
|
-
function disposeAll(disposables) {
|
|
2010
|
-
while (disposables.length) {
|
|
2011
|
-
disposables.pop().dispose();
|
|
2012
|
-
}
|
|
2013
|
-
}
|
|
2014
|
-
export {
|
|
2015
|
-
CompletionAdapter,
|
|
2016
|
-
DefinitionAdapter,
|
|
2017
|
-
DiagnosticsAdapter,
|
|
2018
|
-
DocumentColorAdapter,
|
|
2019
|
-
DocumentFormattingEditProvider,
|
|
2020
|
-
DocumentHighlightAdapter,
|
|
2021
|
-
DocumentLinkAdapter,
|
|
2022
|
-
DocumentRangeFormattingEditProvider,
|
|
2023
|
-
DocumentSymbolAdapter,
|
|
2024
|
-
FoldingRangeAdapter,
|
|
2025
|
-
HoverAdapter,
|
|
2026
|
-
ReferenceAdapter,
|
|
2027
|
-
RenameAdapter,
|
|
2028
|
-
SelectionRangeAdapter,
|
|
2029
|
-
WorkerManager,
|
|
2030
|
-
fromPosition,
|
|
2031
|
-
fromRange,
|
|
2032
|
-
setupMode,
|
|
2033
|
-
toRange,
|
|
2034
|
-
toTextEdit
|
|
2035
|
-
};
|