monaco-editor-core 0.54.0 → 0.55.0-dev-20251008
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/esm/nls.messages.de.js +1 -1
- package/esm/nls.messages.es.js +1 -1
- package/esm/nls.messages.fr.js +1 -1
- package/esm/nls.messages.it.js +1 -1
- package/esm/nls.messages.ja.js +1 -1
- package/esm/nls.messages.ko.js +1 -1
- package/esm/nls.messages.ru.js +1 -1
- package/esm/nls.messages.zh-cn.js +1 -1
- package/esm/nls.messages.zh-tw.js +1 -1
- package/esm/vs/base/browser/canIUse.js +1 -0
- package/esm/vs/base/browser/canIUse.js.map +1 -1
- package/esm/vs/base/browser/dom.js +9 -0
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/fastDomNode.js.map +1 -1
- package/esm/vs/base/browser/mouseEvent.js +3 -0
- package/esm/vs/base/browser/mouseEvent.js.map +1 -1
- package/esm/vs/base/browser/trustedTypes.js +2 -0
- package/esm/vs/base/browser/trustedTypes.js.map +1 -1
- package/esm/vs/base/browser/ui/list/listWidget.js +5 -5
- package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
- package/esm/vs/base/browser/ui/sash/sash.css +1 -1
- package/esm/vs/base/browser/ui/sash/sash.js +4 -0
- package/esm/vs/base/browser/ui/sash/sash.js.map +1 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +1 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
- package/esm/vs/base/browser/ui/table/table.css +2 -2
- package/esm/vs/base/browser/ui/tree/abstractTree.js +5 -4
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +6 -4
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/indexTreeModel.js +1 -1
- package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/media/tree.css +2 -2
- package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
- package/esm/vs/base/browser/webWorkerFactory.js +3 -0
- package/esm/vs/base/browser/webWorkerFactory.js.map +1 -1
- package/esm/vs/base/common/buffer.js.map +1 -1
- package/esm/vs/base/common/decorators.js +1 -0
- package/esm/vs/base/common/decorators.js.map +1 -1
- package/esm/vs/base/common/errors.js +1 -0
- package/esm/vs/base/common/errors.js.map +1 -1
- package/esm/vs/base/common/glob.js +1 -1
- package/esm/vs/base/common/glob.js.map +1 -1
- package/esm/vs/base/common/hash.js.map +1 -1
- package/esm/vs/base/common/hotReload.js +2 -0
- package/esm/vs/base/common/hotReload.js.map +1 -1
- package/esm/vs/base/common/hotReloadHelpers.js +1 -0
- package/esm/vs/base/common/hotReloadHelpers.js.map +1 -1
- package/esm/vs/base/common/lifecycle.js +19 -0
- package/esm/vs/base/common/lifecycle.js.map +1 -1
- package/esm/vs/base/common/map.js.map +1 -1
- package/esm/vs/base/common/marshalling.js +4 -0
- package/esm/vs/base/common/marshalling.js.map +1 -1
- package/esm/vs/base/common/network.js +1 -0
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/normalization.js +39 -0
- package/esm/vs/base/common/normalization.js.map +1 -0
- package/esm/vs/base/common/objects.js +1 -0
- package/esm/vs/base/common/objects.js.map +1 -1
- package/esm/vs/base/common/observableInternal/changeTracker.js +4 -0
- package/esm/vs/base/common/observableInternal/changeTracker.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugLocation.js +1 -0
- package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugName.js +1 -0
- package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js +1 -0
- package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js +1 -0
- package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js +1 -0
- package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/derived.js +7 -1
- package/esm/vs/base/common/observableInternal/observables/derived.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +2 -0
- package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -0
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +1 -0
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
- package/esm/vs/base/common/process.js.map +1 -1
- package/esm/vs/base/common/product.js.map +1 -1
- package/esm/vs/base/common/types.js +2 -0
- package/esm/vs/base/common/types.js.map +1 -1
- package/esm/vs/base/common/worker/webWorker.js +26 -14
- package/esm/vs/base/common/worker/webWorker.js.map +1 -1
- package/esm/vs/base/parts/sandbox/common/sandboxTypes.js +2 -0
- package/esm/vs/base/parts/sandbox/common/sandboxTypes.js.map +1 -0
- package/esm/vs/editor/browser/config/editorConfiguration.js +3 -2
- package/esm/vs/editor/browser/config/editorConfiguration.js.map +1 -1
- package/esm/vs/editor/browser/config/migrateOptions.js +1 -1
- package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +2 -0
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +2 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseTarget.js +7 -0
- package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
- package/esm/vs/editor/browser/controller/pointerHandler.js.map +1 -1
- package/esm/vs/editor/browser/coreCommands.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/editorDom.js.map +1 -1
- package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
- package/esm/vs/editor/browser/gpu/gpuUtils.js +1 -0
- package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -0
- package/esm/vs/editor/browser/gpu/viewGpuContext.js.map +1 -1
- package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/services/bulkEditService.js.map +1 -1
- package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hover.css +2 -0
- package/esm/vs/editor/browser/services/hoverService/hoverService.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
- package/esm/vs/editor/browser/services/inlineCompletionsService.js +8 -8
- package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
- package/esm/vs/editor/browser/services/openerService.js.map +1 -1
- package/esm/vs/editor/browser/view/viewLayer.js +1 -1
- package/esm/vs/editor/browser/view/viewLayer.js.map +1 -1
- package/esm/vs/editor/browser/view.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -0
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +1 -0
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorContributions.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/utils.js +2 -0
- package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -0
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +122 -68
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/config/fontInfo.js +32 -16
- package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
- package/esm/vs/editor/common/config/fontInfoFromSettings.js +16 -0
- package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +1 -0
- package/esm/vs/editor/common/core/edits/edit.js +1 -0
- package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/stringEdit.js +2 -0
- package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
- package/esm/vs/editor/common/core/position.js +1 -1
- package/esm/vs/editor/common/core/position.js.map +1 -1
- package/esm/vs/editor/common/core/range.js +1 -1
- package/esm/vs/editor/common/core/range.js.map +1 -1
- package/esm/vs/editor/common/core/selection.js +1 -1
- package/esm/vs/editor/common/core/selection.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/editorCommon.js.map +1 -1
- package/esm/vs/editor/common/languages.js +1 -1
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +14 -0
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +2 -0
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js.map +1 -1
- package/esm/vs/editor/common/model/textModel.js +1 -1
- package/esm/vs/editor/common/model/textModel.js.map +1 -1
- package/esm/vs/editor/common/model.js +1 -1
- package/esm/vs/editor/common/model.js.map +1 -1
- package/esm/vs/editor/common/services/editorBaseApi.js.map +1 -1
- package/esm/vs/editor/common/services/editorWebWorker.js +1 -0
- package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
- package/esm/vs/editor/common/services/editorWorkerHost.js.map +1 -1
- package/esm/vs/editor/common/services/modelService.js +14 -21
- package/esm/vs/editor/common/services/modelService.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +2 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +40 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +2 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js.map +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +1 -0
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -0
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findModel.js +1 -0
- package/esm/vs/editor/contrib/find/browser/findModel.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findWidget.css +5 -5
- package/esm/vs/editor/contrib/folding/browser/folding.css +4 -4
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js.map +1 -1
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +30 -14
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +5 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +56 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +2 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +27 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.css +2 -0
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +2 -0
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +8 -8
- package/esm/vs/editor/editor.api.js +4 -0
- package/esm/vs/editor/editor.api.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneEditor.js +37 -0
- package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js +37 -0
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchCompile.js +3 -0
- package/esm/vs/editor/standalone/common/monarch/monarchCompile.js.map +1 -1
- package/esm/vs/platform/accessibility/browser/accessibilityService.js +2 -2
- package/esm/vs/platform/accessibility/browser/accessibilityService.js.map +1 -1
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/commands/common/commands.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +5 -0
- package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
- package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js +1 -1
- package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js.map +1 -1
- package/esm/vs/platform/dnd/browser/dnd.js +1 -1
- package/esm/vs/platform/dnd/browser/dnd.js.map +1 -1
- package/esm/vs/platform/instantiation/common/descriptors.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +1 -0
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
- package/esm/vs/platform/list/browser/listService.js +5 -0
- package/esm/vs/platform/list/browser/listService.js.map +1 -1
- package/esm/vs/platform/log/common/log.js.map +1 -1
- package/esm/vs/platform/log/common/logService.js.map +1 -1
- package/esm/vs/platform/observable/common/wrapInHotClass.js +2 -0
- package/esm/vs/platform/observable/common/wrapInHotClass.js.map +1 -1
- package/esm/vs/platform/observable/common/wrapInReloadableClass.js +3 -0
- package/esm/vs/platform/observable/common/wrapInReloadableClass.js.map +1 -1
- package/esm/vs/platform/product/common/product.js +68 -0
- package/esm/vs/platform/product/common/product.js.map +1 -0
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +26 -2
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/monaco.d.ts +8 -8
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/log/common/log.ts","vs/platform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AAC,OAAe,EAAE,GAAG,IAAW,IAAU,CAAC;IAC/C,IAAI,CAAC,OAAe,EAAE,GAAG,IAAW,IAAU,CAAC;IAC/C,KAAK,CAAC,OAAuB,EAAE,GAAG,IAAW,IAAU,CAAC;IACxD,OAAO,KAAW,CAAC;CACnB;AAED,MAAM,OAAO,iBAAkB,SAAQ,qBAAqB;IAC3D;QACC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAC9C,CAAC;IACkB,cAAc,CAAC,QAAa,EAAE,QAAkB,EAAE,OAAwB;QAC5F,OAAO,IAAI,UAAU,EAAE,CAAC;IACzB,CAAC;CACD;AAED,MAAM,UAAU,gBAAgB,CAAC,QAAkB;IAClD,QAAQ,QAAQ,EAAE,CAAC;QAClB,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,OAAO,CAAC;QACpC,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,OAAO,CAAC;QACpC,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,MAAM,CAAC;QAClC,KAAK,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,MAAM,CAAC;QACrC,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,OAAO,CAAC;QACpC,KAAK,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,CAAC;IACjC,CAAC;AACF,CAAC;AAED,WAAW;AACX,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,aAAa,CAAS,UAAU,EAAE,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC","file":"log.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { hash } from '../../../base/common/hash.js';\nimport { Disposable, IDisposable } from '../../../base/common/lifecycle.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport { joinPath } from '../../../base/common/resources.js';\nimport { Mutable, isString } from '../../../base/common/types.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { RawContextKey } from '../../contextkey/common/contextkey.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\n\nexport const ILogService = createDecorator<ILogService>('logService');\nexport const ILoggerService = createDecorator<ILoggerService>('loggerService');\n\nexport enum LogLevel {\n\tOff,\n\tTrace,\n\tDebug,\n\tInfo,\n\tWarning,\n\tError\n}\n\nexport const DEFAULT_LOG_LEVEL: LogLevel = LogLevel.Info;\n\nexport interface ILogger extends IDisposable {\n\tonDidChangeLogLevel: Event<LogLevel>;\n\tgetLevel(): LogLevel;\n\tsetLevel(level: LogLevel): void;\n\n\ttrace(message: string, ...args: any[]): void;\n\tdebug(message: string, ...args: any[]): void;\n\tinfo(message: string, ...args: any[]): void;\n\twarn(message: string, ...args: any[]): void;\n\terror(message: string | Error, ...args: any[]): void;\n}\n\nexport function canLog(loggerLevel: LogLevel, messageLevel: LogLevel): boolean {\n\treturn loggerLevel !== LogLevel.Off && loggerLevel <= messageLevel;\n}\n\nexport type LoggerGroup = {\n\treadonly id: string;\n\treadonly name: string;\n};\n\nexport interface ILogService extends ILogger {\n\treadonly _serviceBrand: undefined;\n}\n\nexport interface ILoggerOptions {\n\n\t/**\n\t * Id of the logger.\n\t */\n\tid?: string;\n\n\t/**\n\t * Name of the logger.\n\t */\n\tname?: string;\n\n\t/**\n\t * When to log. Set to `always` to log always.\n\t */\n\tlogLevel?: 'always' | LogLevel;\n\n\t/**\n\t * Whether the log should be hidden from the user.\n\t */\n\thidden?: boolean;\n\n\t/**\n\t * Condition which must be true to show this logger\n\t */\n\twhen?: string;\n\n\t/**\n\t * Id of the extension that created this logger.\n\t */\n\textensionId?: string;\n\n\t/**\n\t * Group of the logger.\n\t */\n\tgroup?: LoggerGroup;\n}\n\nexport interface ILoggerResource {\n\treadonly resource: URI;\n\treadonly id: string;\n\treadonly name?: string;\n\treadonly logLevel?: LogLevel;\n\treadonly hidden?: boolean;\n\treadonly when?: string;\n\treadonly extensionId?: string;\n\treadonly group?: LoggerGroup;\n}\n\nexport interface ILoggerService {\n\n\treadonly _serviceBrand: undefined;\n\n\t/**\n\t * Creates a logger for the given resource, or gets one if it already exists.\n\t *\n\t * This will also register the logger with the logger service.\n\t */\n\tcreateLogger(resource: URI, options?: ILoggerOptions): ILogger;\n\n\t/**\n\t * Creates a logger with the given id in the logs folder, or gets one if it already exists.\n\t *\n\t * This will also register the logger with the logger service.\n\t */\n\tcreateLogger(id: string, options?: Omit<ILoggerOptions, 'id'>): ILogger;\n}\n\nexport abstract class AbstractLogger extends Disposable implements ILogger {\n\n\tprivate level: LogLevel = DEFAULT_LOG_LEVEL;\n\tprivate readonly _onDidChangeLogLevel: Emitter<LogLevel> = this._register(new Emitter<LogLevel>());\n\tget onDidChangeLogLevel(): Event<LogLevel> { return this._onDidChangeLogLevel.event; }\n\n\tsetLevel(level: LogLevel): void {\n\t\tif (this.level !== level) {\n\t\t\tthis.level = level;\n\t\t\tthis._onDidChangeLogLevel.fire(this.level);\n\t\t}\n\t}\n\n\tgetLevel(): LogLevel {\n\t\treturn this.level;\n\t}\n\n\tprotected checkLogLevel(level: LogLevel): boolean {\n\t\treturn canLog(this.level, level);\n\t}\n\n\tprotected canLog(level: LogLevel): boolean {\n\t\tif (this._store.isDisposed) {\n\t\t\treturn false;\n\t\t}\n\t\treturn this.checkLogLevel(level);\n\t}\n\n\tabstract trace(message: string, ...args: any[]): void;\n\tabstract debug(message: string, ...args: any[]): void;\n\tabstract info(message: string, ...args: any[]): void;\n\tabstract warn(message: string, ...args: any[]): void;\n\tabstract error(message: string | Error, ...args: any[]): void;\n}\n\nexport class ConsoleLogger extends AbstractLogger implements ILogger {\n\n\tconstructor(logLevel: LogLevel = DEFAULT_LOG_LEVEL, private readonly useColors: boolean = true) {\n\t\tsuper();\n\t\tthis.setLevel(logLevel);\n\t}\n\n\ttrace(message: string, ...args: any[]): void {\n\t\tif (this.canLog(LogLevel.Trace)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.log('%cTRACE', 'color: #888', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\tdebug(message: string, ...args: any[]): void {\n\t\tif (this.canLog(LogLevel.Debug)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.log('%cDEBUG', 'background: #eee; color: #888', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\tinfo(message: string, ...args: any[]): void {\n\t\tif (this.canLog(LogLevel.Info)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.log('%c INFO', 'color: #33f', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\twarn(message: string | Error, ...args: any[]): void {\n\t\tif (this.canLog(LogLevel.Warning)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.warn('%c WARN', 'color: #993', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\terror(message: string, ...args: any[]): void {\n\t\tif (this.canLog(LogLevel.Error)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.error('%c ERR', 'color: #f33', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.error(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport class MultiplexLogger extends AbstractLogger implements ILogger {\n\n\tconstructor(private readonly loggers: ReadonlyArray<ILogger>) {\n\t\tsuper();\n\t\tif (loggers.length) {\n\t\t\tthis.setLevel(loggers[0].getLevel());\n\t\t}\n\t}\n\n\toverride setLevel(level: LogLevel): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.setLevel(level);\n\t\t}\n\t\tsuper.setLevel(level);\n\t}\n\n\ttrace(message: string, ...args: any[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.trace(message, ...args);\n\t\t}\n\t}\n\n\tdebug(message: string, ...args: any[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.debug(message, ...args);\n\t\t}\n\t}\n\n\tinfo(message: string, ...args: any[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.info(message, ...args);\n\t\t}\n\t}\n\n\twarn(message: string, ...args: any[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.warn(message, ...args);\n\t\t}\n\t}\n\n\terror(message: string | Error, ...args: any[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.error(message, ...args);\n\t\t}\n\t}\n\n\toverride dispose(): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.dispose();\n\t\t}\n\t\tsuper.dispose();\n\t}\n}\n\ntype LoggerEntry = { logger: ILogger | undefined; info: Mutable<ILoggerResource> };\n\nexport abstract class AbstractLoggerService extends Disposable implements ILoggerService {\n\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate readonly _loggers = new ResourceMap<LoggerEntry>();\n\n\tprivate _onDidChangeLoggers = this._register(new Emitter<{ added: ILoggerResource[]; removed: ILoggerResource[] }>);\n\n\tprivate _onDidChangeVisibility = this._register(new Emitter<[URI, boolean]>);\n\n\tconstructor(\n\t\tprotected logLevel: LogLevel,\n\t\tprivate readonly logsHome: URI,\n\t\tloggerResources?: Iterable<ILoggerResource>,\n\t) {\n\t\tsuper();\n\t\tif (loggerResources) {\n\t\t\tfor (const loggerResource of loggerResources) {\n\t\t\t\tthis._loggers.set(loggerResource.resource, { logger: undefined, info: loggerResource });\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate getLoggerEntry(resourceOrId: URI | string): LoggerEntry | undefined {\n\t\tif (isString(resourceOrId)) {\n\t\t\treturn [...this._loggers.values()].find(logger => logger.info.id === resourceOrId);\n\t\t}\n\t\treturn this._loggers.get(resourceOrId);\n\t}\n\n\tcreateLogger(idOrResource: URI | string, options?: ILoggerOptions): ILogger {\n\t\tconst resource = this.toResource(idOrResource);\n\t\tconst id = isString(idOrResource) ? idOrResource : (options?.id ?? hash(resource.toString()).toString(16));\n\t\tlet logger = this._loggers.get(resource)?.logger;\n\t\tconst logLevel = options?.logLevel === 'always' ? LogLevel.Trace : options?.logLevel;\n\t\tif (!logger) {\n\t\t\tlogger = this.doCreateLogger(resource, logLevel ?? this.getLogLevel(resource) ?? this.logLevel, { ...options, id });\n\t\t}\n\t\tconst loggerEntry: LoggerEntry = {\n\t\t\tlogger,\n\t\t\tinfo: {\n\t\t\t\tresource,\n\t\t\t\tid,\n\t\t\t\tlogLevel,\n\t\t\t\tname: options?.name,\n\t\t\t\thidden: options?.hidden,\n\t\t\t\tgroup: options?.group,\n\t\t\t\textensionId: options?.extensionId,\n\t\t\t\twhen: options?.when\n\t\t\t}\n\t\t};\n\t\tthis.registerLogger(loggerEntry.info);\n\t\t// TODO: @sandy081 Remove this once registerLogger can take ILogger\n\t\tthis._loggers.set(resource, loggerEntry);\n\t\treturn logger;\n\t}\n\n\tprotected toResource(idOrResource: string | URI): URI {\n\t\treturn isString(idOrResource) ? joinPath(this.logsHome, `${idOrResource}.log`) : idOrResource;\n\t}\n\n\tsetVisibility(resourceOrId: URI | string, visibility: boolean): void {\n\t\tconst logger = this.getLoggerEntry(resourceOrId);\n\t\tif (logger && visibility !== !logger.info.hidden) {\n\t\t\tlogger.info.hidden = !visibility;\n\t\t\tthis._loggers.set(logger.info.resource, logger);\n\t\t\tthis._onDidChangeVisibility.fire([logger.info.resource, visibility]);\n\t\t}\n\t}\n\n\tgetLogLevel(resource?: URI): LogLevel {\n\t\tlet logLevel;\n\t\tif (resource) {\n\t\t\tlogLevel = this._loggers.get(resource)?.info.logLevel;\n\t\t}\n\t\treturn logLevel ?? this.logLevel;\n\t}\n\n\tregisterLogger(resource: ILoggerResource): void {\n\t\tconst existing = this._loggers.get(resource.resource);\n\t\tif (existing) {\n\t\t\tif (existing.info.hidden !== resource.hidden) {\n\t\t\t\tthis.setVisibility(resource.resource, !resource.hidden);\n\t\t\t}\n\t\t} else {\n\t\t\tthis._loggers.set(resource.resource, { info: resource, logger: undefined });\n\t\t\tthis._onDidChangeLoggers.fire({ added: [resource], removed: [] });\n\t\t}\n\t}\n\n\toverride dispose(): void {\n\t\tthis._loggers.forEach(logger => logger.logger?.dispose());\n\t\tthis._loggers.clear();\n\t\tsuper.dispose();\n\t}\n\n\tprotected abstract doCreateLogger(resource: URI, logLevel: LogLevel, options?: ILoggerOptions): ILogger;\n}\n\nexport class NullLogger implements ILogger {\n\treadonly onDidChangeLogLevel: Event<LogLevel> = new Emitter<LogLevel>().event;\n\tsetLevel(level: LogLevel): void { }\n\tgetLevel(): LogLevel { return LogLevel.Info; }\n\ttrace(message: string, ...args: any[]): void { }\n\tdebug(message: string, ...args: any[]): void { }\n\tinfo(message: string, ...args: any[]): void { }\n\twarn(message: string, ...args: any[]): void { }\n\terror(message: string | Error, ...args: any[]): void { }\n\tdispose(): void { }\n}\n\nexport class NullLoggerService extends AbstractLoggerService {\n\tconstructor() {\n\t\tsuper(LogLevel.Off, URI.parse('log:///log'));\n\t}\n\tprotected override doCreateLogger(resource: URI, logLevel: LogLevel, options?: ILoggerOptions): ILogger {\n\t\treturn new NullLogger();\n\t}\n}\n\nexport function LogLevelToString(logLevel: LogLevel): string {\n\tswitch (logLevel) {\n\t\tcase LogLevel.Trace: return 'trace';\n\t\tcase LogLevel.Debug: return 'debug';\n\t\tcase LogLevel.Info: return 'info';\n\t\tcase LogLevel.Warning: return 'warn';\n\t\tcase LogLevel.Error: return 'error';\n\t\tcase LogLevel.Off: return 'off';\n\t}\n}\n\n// Contexts\nexport const CONTEXT_LOG_LEVEL = new RawContextKey<string>('logLevel', LogLevelToString(LogLevel.Info));\n","\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { hash } from '../../../base/common/hash.js';\nimport { Disposable, IDisposable } from '../../../base/common/lifecycle.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport { joinPath } from '../../../base/common/resources.js';\nimport { Mutable, isString } from '../../../base/common/types.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { RawContextKey } from '../../contextkey/common/contextkey.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\n\nexport const ILogService = createDecorator<ILogService>('logService');\nexport const ILoggerService = createDecorator<ILoggerService>('loggerService');\n\nexport enum LogLevel {\n\tOff,\n\tTrace,\n\tDebug,\n\tInfo,\n\tWarning,\n\tError\n}\n\nexport const DEFAULT_LOG_LEVEL: LogLevel = LogLevel.Info;\n\nexport interface ILogger extends IDisposable {\n\tonDidChangeLogLevel: Event<LogLevel>;\n\tgetLevel(): LogLevel;\n\tsetLevel(level: LogLevel): void;\n\n\ttrace(message: string, ...args: any[]): void;\n\tdebug(message: string, ...args: any[]): void;\n\tinfo(message: string, ...args: any[]): void;\n\twarn(message: string, ...args: any[]): void;\n\terror(message: string | Error, ...args: any[]): void;\n}\n\nexport function canLog(loggerLevel: LogLevel, messageLevel: LogLevel): boolean {\n\treturn loggerLevel !== LogLevel.Off && loggerLevel <= messageLevel;\n}\n\nexport type LoggerGroup = {\n\treadonly id: string;\n\treadonly name: string;\n};\n\nexport interface ILogService extends ILogger {\n\treadonly _serviceBrand: undefined;\n}\n\nexport interface ILoggerOptions {\n\n\t/**\n\t * Id of the logger.\n\t */\n\tid?: string;\n\n\t/**\n\t * Name of the logger.\n\t */\n\tname?: string;\n\n\t/**\n\t * When to log. Set to `always` to log always.\n\t */\n\tlogLevel?: 'always' | LogLevel;\n\n\t/**\n\t * Whether the log should be hidden from the user.\n\t */\n\thidden?: boolean;\n\n\t/**\n\t * Condition which must be true to show this logger\n\t */\n\twhen?: string;\n\n\t/**\n\t * Id of the extension that created this logger.\n\t */\n\textensionId?: string;\n\n\t/**\n\t * Group of the logger.\n\t */\n\tgroup?: LoggerGroup;\n}\n\nexport interface ILoggerResource {\n\treadonly resource: URI;\n\treadonly id: string;\n\treadonly name?: string;\n\treadonly logLevel?: LogLevel;\n\treadonly hidden?: boolean;\n\treadonly when?: string;\n\treadonly extensionId?: string;\n\treadonly group?: LoggerGroup;\n}\n\nexport interface ILoggerService {\n\n\treadonly _serviceBrand: undefined;\n\n\t/**\n\t * Creates a logger for the given resource, or gets one if it already exists.\n\t *\n\t * This will also register the logger with the logger service.\n\t */\n\tcreateLogger(resource: URI, options?: ILoggerOptions): ILogger;\n\n\t/**\n\t * Creates a logger with the given id in the logs folder, or gets one if it already exists.\n\t *\n\t * This will also register the logger with the logger service.\n\t */\n\tcreateLogger(id: string, options?: Omit<ILoggerOptions, 'id'>): ILogger;\n}\n\nexport abstract class AbstractLogger extends Disposable implements ILogger {\n\n\tprivate level: LogLevel = DEFAULT_LOG_LEVEL;\n\tprivate readonly _onDidChangeLogLevel: Emitter<LogLevel> = this._register(new Emitter<LogLevel>());\n\tget onDidChangeLogLevel(): Event<LogLevel> { return this._onDidChangeLogLevel.event; }\n\n\tsetLevel(level: LogLevel): void {\n\t\tif (this.level !== level) {\n\t\t\tthis.level = level;\n\t\t\tthis._onDidChangeLogLevel.fire(this.level);\n\t\t}\n\t}\n\n\tgetLevel(): LogLevel {\n\t\treturn this.level;\n\t}\n\n\tprotected checkLogLevel(level: LogLevel): boolean {\n\t\treturn canLog(this.level, level);\n\t}\n\n\tprotected canLog(level: LogLevel): boolean {\n\t\tif (this._store.isDisposed) {\n\t\t\treturn false;\n\t\t}\n\t\treturn this.checkLogLevel(level);\n\t}\n\n\tabstract trace(message: string, ...args: any[]): void;\n\tabstract debug(message: string, ...args: any[]): void;\n\tabstract info(message: string, ...args: any[]): void;\n\tabstract warn(message: string, ...args: any[]): void;\n\tabstract error(message: string | Error, ...args: any[]): void;\n}\n\nexport class ConsoleLogger extends AbstractLogger implements ILogger {\n\n\tconstructor(logLevel: LogLevel = DEFAULT_LOG_LEVEL, private readonly useColors: boolean = true) {\n\t\tsuper();\n\t\tthis.setLevel(logLevel);\n\t}\n\n\ttrace(message: string, ...args: any[]): void {\n\t\tif (this.canLog(LogLevel.Trace)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.log('%cTRACE', 'color: #888', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\tdebug(message: string, ...args: any[]): void {\n\t\tif (this.canLog(LogLevel.Debug)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.log('%cDEBUG', 'background: #eee; color: #888', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\tinfo(message: string, ...args: any[]): void {\n\t\tif (this.canLog(LogLevel.Info)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.log('%c INFO', 'color: #33f', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\twarn(message: string | Error, ...args: any[]): void {\n\t\tif (this.canLog(LogLevel.Warning)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.warn('%c WARN', 'color: #993', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\terror(message: string, ...args: any[]): void {\n\t\tif (this.canLog(LogLevel.Error)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.error('%c ERR', 'color: #f33', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.error(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport class MultiplexLogger extends AbstractLogger implements ILogger {\n\n\tconstructor(private readonly loggers: ReadonlyArray<ILogger>) {\n\t\tsuper();\n\t\tif (loggers.length) {\n\t\t\tthis.setLevel(loggers[0].getLevel());\n\t\t}\n\t}\n\n\toverride setLevel(level: LogLevel): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.setLevel(level);\n\t\t}\n\t\tsuper.setLevel(level);\n\t}\n\n\ttrace(message: string, ...args: any[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.trace(message, ...args);\n\t\t}\n\t}\n\n\tdebug(message: string, ...args: any[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.debug(message, ...args);\n\t\t}\n\t}\n\n\tinfo(message: string, ...args: any[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.info(message, ...args);\n\t\t}\n\t}\n\n\twarn(message: string, ...args: any[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.warn(message, ...args);\n\t\t}\n\t}\n\n\terror(message: string | Error, ...args: any[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.error(message, ...args);\n\t\t}\n\t}\n\n\toverride dispose(): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.dispose();\n\t\t}\n\t\tsuper.dispose();\n\t}\n}\n\ntype LoggerEntry = { logger: ILogger | undefined; info: Mutable<ILoggerResource> };\n\nexport abstract class AbstractLoggerService extends Disposable implements ILoggerService {\n\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate readonly _loggers = new ResourceMap<LoggerEntry>();\n\n\tprivate _onDidChangeLoggers = this._register(new Emitter<{ added: ILoggerResource[]; removed: ILoggerResource[] }>);\n\n\tprivate _onDidChangeVisibility = this._register(new Emitter<[URI, boolean]>);\n\n\tconstructor(\n\t\tprotected logLevel: LogLevel,\n\t\tprivate readonly logsHome: URI,\n\t\tloggerResources?: Iterable<ILoggerResource>,\n\t) {\n\t\tsuper();\n\t\tif (loggerResources) {\n\t\t\tfor (const loggerResource of loggerResources) {\n\t\t\t\tthis._loggers.set(loggerResource.resource, { logger: undefined, info: loggerResource });\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate getLoggerEntry(resourceOrId: URI | string): LoggerEntry | undefined {\n\t\tif (isString(resourceOrId)) {\n\t\t\treturn [...this._loggers.values()].find(logger => logger.info.id === resourceOrId);\n\t\t}\n\t\treturn this._loggers.get(resourceOrId);\n\t}\n\n\tcreateLogger(idOrResource: URI | string, options?: ILoggerOptions): ILogger {\n\t\tconst resource = this.toResource(idOrResource);\n\t\tconst id = isString(idOrResource) ? idOrResource : (options?.id ?? hash(resource.toString()).toString(16));\n\t\tlet logger = this._loggers.get(resource)?.logger;\n\t\tconst logLevel = options?.logLevel === 'always' ? LogLevel.Trace : options?.logLevel;\n\t\tif (!logger) {\n\t\t\tlogger = this.doCreateLogger(resource, logLevel ?? this.getLogLevel(resource) ?? this.logLevel, { ...options, id });\n\t\t}\n\t\tconst loggerEntry: LoggerEntry = {\n\t\t\tlogger,\n\t\t\tinfo: {\n\t\t\t\tresource,\n\t\t\t\tid,\n\t\t\t\tlogLevel,\n\t\t\t\tname: options?.name,\n\t\t\t\thidden: options?.hidden,\n\t\t\t\tgroup: options?.group,\n\t\t\t\textensionId: options?.extensionId,\n\t\t\t\twhen: options?.when\n\t\t\t}\n\t\t};\n\t\tthis.registerLogger(loggerEntry.info);\n\t\t// TODO: @sandy081 Remove this once registerLogger can take ILogger\n\t\tthis._loggers.set(resource, loggerEntry);\n\t\treturn logger;\n\t}\n\n\tprotected toResource(idOrResource: string | URI): URI {\n\t\treturn isString(idOrResource) ? joinPath(this.logsHome, `${idOrResource}.log`) : idOrResource;\n\t}\n\n\tsetVisibility(resourceOrId: URI | string, visibility: boolean): void {\n\t\tconst logger = this.getLoggerEntry(resourceOrId);\n\t\tif (logger && visibility !== !logger.info.hidden) {\n\t\t\tlogger.info.hidden = !visibility;\n\t\t\tthis._loggers.set(logger.info.resource, logger);\n\t\t\tthis._onDidChangeVisibility.fire([logger.info.resource, visibility]);\n\t\t}\n\t}\n\n\tgetLogLevel(resource?: URI): LogLevel {\n\t\tlet logLevel;\n\t\tif (resource) {\n\t\t\tlogLevel = this._loggers.get(resource)?.info.logLevel;\n\t\t}\n\t\treturn logLevel ?? this.logLevel;\n\t}\n\n\tregisterLogger(resource: ILoggerResource): void {\n\t\tconst existing = this._loggers.get(resource.resource);\n\t\tif (existing) {\n\t\t\tif (existing.info.hidden !== resource.hidden) {\n\t\t\t\tthis.setVisibility(resource.resource, !resource.hidden);\n\t\t\t}\n\t\t} else {\n\t\t\tthis._loggers.set(resource.resource, { info: resource, logger: undefined });\n\t\t\tthis._onDidChangeLoggers.fire({ added: [resource], removed: [] });\n\t\t}\n\t}\n\n\toverride dispose(): void {\n\t\tthis._loggers.forEach(logger => logger.logger?.dispose());\n\t\tthis._loggers.clear();\n\t\tsuper.dispose();\n\t}\n\n\tprotected abstract doCreateLogger(resource: URI, logLevel: LogLevel, options?: ILoggerOptions): ILogger;\n}\n\nexport class NullLogger implements ILogger {\n\treadonly onDidChangeLogLevel: Event<LogLevel> = new Emitter<LogLevel>().event;\n\tsetLevel(level: LogLevel): void { }\n\tgetLevel(): LogLevel { return LogLevel.Info; }\n\ttrace(message: string, ...args: any[]): void { }\n\tdebug(message: string, ...args: any[]): void { }\n\tinfo(message: string, ...args: any[]): void { }\n\twarn(message: string, ...args: any[]): void { }\n\terror(message: string | Error, ...args: any[]): void { }\n\tdispose(): void { }\n}\n\nexport class NullLoggerService extends AbstractLoggerService {\n\tconstructor() {\n\t\tsuper(LogLevel.Off, URI.parse('log:///log'));\n\t}\n\tprotected override doCreateLogger(resource: URI, logLevel: LogLevel, options?: ILoggerOptions): ILogger {\n\t\treturn new NullLogger();\n\t}\n}\n\nexport function LogLevelToString(logLevel: LogLevel): string {\n\tswitch (logLevel) {\n\t\tcase LogLevel.Trace: return 'trace';\n\t\tcase LogLevel.Debug: return 'debug';\n\t\tcase LogLevel.Info: return 'info';\n\t\tcase LogLevel.Warning: return 'warn';\n\t\tcase LogLevel.Error: return 'error';\n\t\tcase LogLevel.Off: return 'off';\n\t}\n}\n\n// Contexts\nexport const CONTEXT_LOG_LEVEL = new RawContextKey<string>('logLevel', LogLevelToString(LogLevel.Info));\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/log/common/log.ts","vs/platform/log/common/log.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO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AI,CAAC,OAAe,EAAE,GAAG,IAAe,IAAU,CAAC;IACnD,KAAK,CAAC,OAAuB,EAAE,GAAG,IAAe,IAAU,CAAC;IAC5D,OAAO,KAAW,CAAC;CACnB;AAED,MAAM,OAAO,iBAAkB,SAAQ,qBAAqB;IAC3D;QACC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAC9C,CAAC;IACkB,cAAc,CAAC,QAAa,EAAE,QAAkB,EAAE,OAAwB;QAC5F,OAAO,IAAI,UAAU,EAAE,CAAC;IACzB,CAAC;CACD;AAED,MAAM,UAAU,gBAAgB,CAAC,QAAkB;IAClD,QAAQ,QAAQ,EAAE,CAAC;QAClB,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,OAAO,CAAC;QACpC,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,OAAO,CAAC;QACpC,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,MAAM,CAAC;QAClC,KAAK,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,MAAM,CAAC;QACrC,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,OAAO,CAAC;QACpC,KAAK,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,CAAC;IACjC,CAAC;AACF,CAAC;AAED,WAAW;AACX,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,aAAa,CAAS,UAAU,EAAE,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC","file":"log.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { hash } from '../../../base/common/hash.js';\nimport { Disposable, IDisposable } from '../../../base/common/lifecycle.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport { joinPath } from '../../../base/common/resources.js';\nimport { Mutable, isString } from '../../../base/common/types.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { RawContextKey } from '../../contextkey/common/contextkey.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\n\nexport const ILogService = createDecorator<ILogService>('logService');\nexport const ILoggerService = createDecorator<ILoggerService>('loggerService');\n\nexport enum LogLevel {\n\tOff,\n\tTrace,\n\tDebug,\n\tInfo,\n\tWarning,\n\tError\n}\n\nexport const DEFAULT_LOG_LEVEL: LogLevel = LogLevel.Info;\n\nexport interface ILogger extends IDisposable {\n\tonDidChangeLogLevel: Event<LogLevel>;\n\tgetLevel(): LogLevel;\n\tsetLevel(level: LogLevel): void;\n\n\ttrace(message: string, ...args: unknown[]): void;\n\tdebug(message: string, ...args: unknown[]): void;\n\tinfo(message: string, ...args: unknown[]): void;\n\twarn(message: string, ...args: unknown[]): void;\n\terror(message: string | Error, ...args: unknown[]): void;\n}\n\nexport function canLog(loggerLevel: LogLevel, messageLevel: LogLevel): boolean {\n\treturn loggerLevel !== LogLevel.Off && loggerLevel <= messageLevel;\n}\n\nexport type LoggerGroup = {\n\treadonly id: string;\n\treadonly name: string;\n};\n\nexport interface ILogService extends ILogger {\n\treadonly _serviceBrand: undefined;\n}\n\nexport interface ILoggerOptions {\n\n\t/**\n\t * Id of the logger.\n\t */\n\tid?: string;\n\n\t/**\n\t * Name of the logger.\n\t */\n\tname?: string;\n\n\t/**\n\t * When to log. Set to `always` to log always.\n\t */\n\tlogLevel?: 'always' | LogLevel;\n\n\t/**\n\t * Whether the log should be hidden from the user.\n\t */\n\thidden?: boolean;\n\n\t/**\n\t * Condition which must be true to show this logger\n\t */\n\twhen?: string;\n\n\t/**\n\t * Id of the extension that created this logger.\n\t */\n\textensionId?: string;\n\n\t/**\n\t * Group of the logger.\n\t */\n\tgroup?: LoggerGroup;\n}\n\nexport interface ILoggerResource {\n\treadonly resource: URI;\n\treadonly id: string;\n\treadonly name?: string;\n\treadonly logLevel?: LogLevel;\n\treadonly hidden?: boolean;\n\treadonly when?: string;\n\treadonly extensionId?: string;\n\treadonly group?: LoggerGroup;\n}\n\nexport interface ILoggerService {\n\n\treadonly _serviceBrand: undefined;\n\n\t/**\n\t * Creates a logger for the given resource, or gets one if it already exists.\n\t *\n\t * This will also register the logger with the logger service.\n\t */\n\tcreateLogger(resource: URI, options?: ILoggerOptions): ILogger;\n\n\t/**\n\t * Creates a logger with the given id in the logs folder, or gets one if it already exists.\n\t *\n\t * This will also register the logger with the logger service.\n\t */\n\tcreateLogger(id: string, options?: Omit<ILoggerOptions, 'id'>): ILogger;\n}\n\nexport abstract class AbstractLogger extends Disposable implements ILogger {\n\n\tprivate level: LogLevel = DEFAULT_LOG_LEVEL;\n\tprivate readonly _onDidChangeLogLevel: Emitter<LogLevel> = this._register(new Emitter<LogLevel>());\n\tget onDidChangeLogLevel(): Event<LogLevel> { return this._onDidChangeLogLevel.event; }\n\n\tsetLevel(level: LogLevel): void {\n\t\tif (this.level !== level) {\n\t\t\tthis.level = level;\n\t\t\tthis._onDidChangeLogLevel.fire(this.level);\n\t\t}\n\t}\n\n\tgetLevel(): LogLevel {\n\t\treturn this.level;\n\t}\n\n\tprotected checkLogLevel(level: LogLevel): boolean {\n\t\treturn canLog(this.level, level);\n\t}\n\n\tprotected canLog(level: LogLevel): boolean {\n\t\tif (this._store.isDisposed) {\n\t\t\treturn false;\n\t\t}\n\t\treturn this.checkLogLevel(level);\n\t}\n\n\tabstract trace(message: string, ...args: unknown[]): void;\n\tabstract debug(message: string, ...args: unknown[]): void;\n\tabstract info(message: string, ...args: unknown[]): void;\n\tabstract warn(message: string, ...args: unknown[]): void;\n\tabstract error(message: string | Error, ...args: unknown[]): void;\n}\n\nexport class ConsoleLogger extends AbstractLogger implements ILogger {\n\n\tconstructor(logLevel: LogLevel = DEFAULT_LOG_LEVEL, private readonly useColors: boolean = true) {\n\t\tsuper();\n\t\tthis.setLevel(logLevel);\n\t}\n\n\ttrace(message: string, ...args: unknown[]): void {\n\t\tif (this.canLog(LogLevel.Trace)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.log('%cTRACE', 'color: #888', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\tdebug(message: string, ...args: unknown[]): void {\n\t\tif (this.canLog(LogLevel.Debug)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.log('%cDEBUG', 'background: #eee; color: #888', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\tinfo(message: string, ...args: unknown[]): void {\n\t\tif (this.canLog(LogLevel.Info)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.log('%c INFO', 'color: #33f', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\twarn(message: string | Error, ...args: unknown[]): void {\n\t\tif (this.canLog(LogLevel.Warning)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.warn('%c WARN', 'color: #993', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\terror(message: string, ...args: unknown[]): void {\n\t\tif (this.canLog(LogLevel.Error)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.error('%c ERR', 'color: #f33', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.error(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport class MultiplexLogger extends AbstractLogger implements ILogger {\n\n\tconstructor(private readonly loggers: ReadonlyArray<ILogger>) {\n\t\tsuper();\n\t\tif (loggers.length) {\n\t\t\tthis.setLevel(loggers[0].getLevel());\n\t\t}\n\t}\n\n\toverride setLevel(level: LogLevel): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.setLevel(level);\n\t\t}\n\t\tsuper.setLevel(level);\n\t}\n\n\ttrace(message: string, ...args: unknown[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.trace(message, ...args);\n\t\t}\n\t}\n\n\tdebug(message: string, ...args: unknown[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.debug(message, ...args);\n\t\t}\n\t}\n\n\tinfo(message: string, ...args: unknown[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.info(message, ...args);\n\t\t}\n\t}\n\n\twarn(message: string, ...args: unknown[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.warn(message, ...args);\n\t\t}\n\t}\n\n\terror(message: string | Error, ...args: unknown[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.error(message, ...args);\n\t\t}\n\t}\n\n\toverride dispose(): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.dispose();\n\t\t}\n\t\tsuper.dispose();\n\t}\n}\n\ntype LoggerEntry = { logger: ILogger | undefined; info: Mutable<ILoggerResource> };\n\nexport abstract class AbstractLoggerService extends Disposable implements ILoggerService {\n\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate readonly _loggers = new ResourceMap<LoggerEntry>();\n\n\tprivate _onDidChangeLoggers = this._register(new Emitter<{ added: ILoggerResource[]; removed: ILoggerResource[] }>);\n\n\tprivate _onDidChangeVisibility = this._register(new Emitter<[URI, boolean]>);\n\n\tconstructor(\n\t\tprotected logLevel: LogLevel,\n\t\tprivate readonly logsHome: URI,\n\t\tloggerResources?: Iterable<ILoggerResource>,\n\t) {\n\t\tsuper();\n\t\tif (loggerResources) {\n\t\t\tfor (const loggerResource of loggerResources) {\n\t\t\t\tthis._loggers.set(loggerResource.resource, { logger: undefined, info: loggerResource });\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate getLoggerEntry(resourceOrId: URI | string): LoggerEntry | undefined {\n\t\tif (isString(resourceOrId)) {\n\t\t\treturn [...this._loggers.values()].find(logger => logger.info.id === resourceOrId);\n\t\t}\n\t\treturn this._loggers.get(resourceOrId);\n\t}\n\n\tcreateLogger(idOrResource: URI | string, options?: ILoggerOptions): ILogger {\n\t\tconst resource = this.toResource(idOrResource);\n\t\tconst id = isString(idOrResource) ? idOrResource : (options?.id ?? hash(resource.toString()).toString(16));\n\t\tlet logger = this._loggers.get(resource)?.logger;\n\t\tconst logLevel = options?.logLevel === 'always' ? LogLevel.Trace : options?.logLevel;\n\t\tif (!logger) {\n\t\t\tlogger = this.doCreateLogger(resource, logLevel ?? this.getLogLevel(resource) ?? this.logLevel, { ...options, id });\n\t\t}\n\t\tconst loggerEntry: LoggerEntry = {\n\t\t\tlogger,\n\t\t\tinfo: {\n\t\t\t\tresource,\n\t\t\t\tid,\n\t\t\t\tlogLevel,\n\t\t\t\tname: options?.name,\n\t\t\t\thidden: options?.hidden,\n\t\t\t\tgroup: options?.group,\n\t\t\t\textensionId: options?.extensionId,\n\t\t\t\twhen: options?.when\n\t\t\t}\n\t\t};\n\t\tthis.registerLogger(loggerEntry.info);\n\t\t// TODO: @sandy081 Remove this once registerLogger can take ILogger\n\t\tthis._loggers.set(resource, loggerEntry);\n\t\treturn logger;\n\t}\n\n\tprotected toResource(idOrResource: string | URI): URI {\n\t\treturn isString(idOrResource) ? joinPath(this.logsHome, `${idOrResource}.log`) : idOrResource;\n\t}\n\n\tsetVisibility(resourceOrId: URI | string, visibility: boolean): void {\n\t\tconst logger = this.getLoggerEntry(resourceOrId);\n\t\tif (logger && visibility !== !logger.info.hidden) {\n\t\t\tlogger.info.hidden = !visibility;\n\t\t\tthis._loggers.set(logger.info.resource, logger);\n\t\t\tthis._onDidChangeVisibility.fire([logger.info.resource, visibility]);\n\t\t}\n\t}\n\n\tgetLogLevel(resource?: URI): LogLevel {\n\t\tlet logLevel;\n\t\tif (resource) {\n\t\t\tlogLevel = this._loggers.get(resource)?.info.logLevel;\n\t\t}\n\t\treturn logLevel ?? this.logLevel;\n\t}\n\n\tregisterLogger(resource: ILoggerResource): void {\n\t\tconst existing = this._loggers.get(resource.resource);\n\t\tif (existing) {\n\t\t\tif (existing.info.hidden !== resource.hidden) {\n\t\t\t\tthis.setVisibility(resource.resource, !resource.hidden);\n\t\t\t}\n\t\t} else {\n\t\t\tthis._loggers.set(resource.resource, { info: resource, logger: undefined });\n\t\t\tthis._onDidChangeLoggers.fire({ added: [resource], removed: [] });\n\t\t}\n\t}\n\n\toverride dispose(): void {\n\t\tthis._loggers.forEach(logger => logger.logger?.dispose());\n\t\tthis._loggers.clear();\n\t\tsuper.dispose();\n\t}\n\n\tprotected abstract doCreateLogger(resource: URI, logLevel: LogLevel, options?: ILoggerOptions): ILogger;\n}\n\nexport class NullLogger implements ILogger {\n\treadonly onDidChangeLogLevel: Event<LogLevel> = new Emitter<LogLevel>().event;\n\tsetLevel(level: LogLevel): void { }\n\tgetLevel(): LogLevel { return LogLevel.Info; }\n\ttrace(message: string, ...args: unknown[]): void { }\n\tdebug(message: string, ...args: unknown[]): void { }\n\tinfo(message: string, ...args: unknown[]): void { }\n\twarn(message: string, ...args: unknown[]): void { }\n\terror(message: string | Error, ...args: unknown[]): void { }\n\tdispose(): void { }\n}\n\nexport class NullLoggerService extends AbstractLoggerService {\n\tconstructor() {\n\t\tsuper(LogLevel.Off, URI.parse('log:///log'));\n\t}\n\tprotected override doCreateLogger(resource: URI, logLevel: LogLevel, options?: ILoggerOptions): ILogger {\n\t\treturn new NullLogger();\n\t}\n}\n\nexport function LogLevelToString(logLevel: LogLevel): string {\n\tswitch (logLevel) {\n\t\tcase LogLevel.Trace: return 'trace';\n\t\tcase LogLevel.Debug: return 'debug';\n\t\tcase LogLevel.Info: return 'info';\n\t\tcase LogLevel.Warning: return 'warn';\n\t\tcase LogLevel.Error: return 'error';\n\t\tcase LogLevel.Off: return 'off';\n\t}\n}\n\n// Contexts\nexport const CONTEXT_LOG_LEVEL = new RawContextKey<string>('logLevel', LogLevelToString(LogLevel.Info));\n","\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { hash } from '../../../base/common/hash.js';\nimport { Disposable, IDisposable } from '../../../base/common/lifecycle.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport { joinPath } from '../../../base/common/resources.js';\nimport { Mutable, isString } from '../../../base/common/types.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { RawContextKey } from '../../contextkey/common/contextkey.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\n\nexport const ILogService = createDecorator<ILogService>('logService');\nexport const ILoggerService = createDecorator<ILoggerService>('loggerService');\n\nexport enum LogLevel {\n\tOff,\n\tTrace,\n\tDebug,\n\tInfo,\n\tWarning,\n\tError\n}\n\nexport const DEFAULT_LOG_LEVEL: LogLevel = LogLevel.Info;\n\nexport interface ILogger extends IDisposable {\n\tonDidChangeLogLevel: Event<LogLevel>;\n\tgetLevel(): LogLevel;\n\tsetLevel(level: LogLevel): void;\n\n\ttrace(message: string, ...args: unknown[]): void;\n\tdebug(message: string, ...args: unknown[]): void;\n\tinfo(message: string, ...args: unknown[]): void;\n\twarn(message: string, ...args: unknown[]): void;\n\terror(message: string | Error, ...args: unknown[]): void;\n}\n\nexport function canLog(loggerLevel: LogLevel, messageLevel: LogLevel): boolean {\n\treturn loggerLevel !== LogLevel.Off && loggerLevel <= messageLevel;\n}\n\nexport type LoggerGroup = {\n\treadonly id: string;\n\treadonly name: string;\n};\n\nexport interface ILogService extends ILogger {\n\treadonly _serviceBrand: undefined;\n}\n\nexport interface ILoggerOptions {\n\n\t/**\n\t * Id of the logger.\n\t */\n\tid?: string;\n\n\t/**\n\t * Name of the logger.\n\t */\n\tname?: string;\n\n\t/**\n\t * When to log. Set to `always` to log always.\n\t */\n\tlogLevel?: 'always' | LogLevel;\n\n\t/**\n\t * Whether the log should be hidden from the user.\n\t */\n\thidden?: boolean;\n\n\t/**\n\t * Condition which must be true to show this logger\n\t */\n\twhen?: string;\n\n\t/**\n\t * Id of the extension that created this logger.\n\t */\n\textensionId?: string;\n\n\t/**\n\t * Group of the logger.\n\t */\n\tgroup?: LoggerGroup;\n}\n\nexport interface ILoggerResource {\n\treadonly resource: URI;\n\treadonly id: string;\n\treadonly name?: string;\n\treadonly logLevel?: LogLevel;\n\treadonly hidden?: boolean;\n\treadonly when?: string;\n\treadonly extensionId?: string;\n\treadonly group?: LoggerGroup;\n}\n\nexport interface ILoggerService {\n\n\treadonly _serviceBrand: undefined;\n\n\t/**\n\t * Creates a logger for the given resource, or gets one if it already exists.\n\t *\n\t * This will also register the logger with the logger service.\n\t */\n\tcreateLogger(resource: URI, options?: ILoggerOptions): ILogger;\n\n\t/**\n\t * Creates a logger with the given id in the logs folder, or gets one if it already exists.\n\t *\n\t * This will also register the logger with the logger service.\n\t */\n\tcreateLogger(id: string, options?: Omit<ILoggerOptions, 'id'>): ILogger;\n}\n\nexport abstract class AbstractLogger extends Disposable implements ILogger {\n\n\tprivate level: LogLevel = DEFAULT_LOG_LEVEL;\n\tprivate readonly _onDidChangeLogLevel: Emitter<LogLevel> = this._register(new Emitter<LogLevel>());\n\tget onDidChangeLogLevel(): Event<LogLevel> { return this._onDidChangeLogLevel.event; }\n\n\tsetLevel(level: LogLevel): void {\n\t\tif (this.level !== level) {\n\t\t\tthis.level = level;\n\t\t\tthis._onDidChangeLogLevel.fire(this.level);\n\t\t}\n\t}\n\n\tgetLevel(): LogLevel {\n\t\treturn this.level;\n\t}\n\n\tprotected checkLogLevel(level: LogLevel): boolean {\n\t\treturn canLog(this.level, level);\n\t}\n\n\tprotected canLog(level: LogLevel): boolean {\n\t\tif (this._store.isDisposed) {\n\t\t\treturn false;\n\t\t}\n\t\treturn this.checkLogLevel(level);\n\t}\n\n\tabstract trace(message: string, ...args: unknown[]): void;\n\tabstract debug(message: string, ...args: unknown[]): void;\n\tabstract info(message: string, ...args: unknown[]): void;\n\tabstract warn(message: string, ...args: unknown[]): void;\n\tabstract error(message: string | Error, ...args: unknown[]): void;\n}\n\nexport class ConsoleLogger extends AbstractLogger implements ILogger {\n\n\tconstructor(logLevel: LogLevel = DEFAULT_LOG_LEVEL, private readonly useColors: boolean = true) {\n\t\tsuper();\n\t\tthis.setLevel(logLevel);\n\t}\n\n\ttrace(message: string, ...args: unknown[]): void {\n\t\tif (this.canLog(LogLevel.Trace)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.log('%cTRACE', 'color: #888', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\tdebug(message: string, ...args: unknown[]): void {\n\t\tif (this.canLog(LogLevel.Debug)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.log('%cDEBUG', 'background: #eee; color: #888', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\tinfo(message: string, ...args: unknown[]): void {\n\t\tif (this.canLog(LogLevel.Info)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.log('%c INFO', 'color: #33f', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\twarn(message: string | Error, ...args: unknown[]): void {\n\t\tif (this.canLog(LogLevel.Warning)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.warn('%c WARN', 'color: #993', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.log(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n\n\terror(message: string, ...args: unknown[]): void {\n\t\tif (this.canLog(LogLevel.Error)) {\n\t\t\tif (this.useColors) {\n\t\t\t\tconsole.error('%c ERR', 'color: #f33', message, ...args);\n\t\t\t} else {\n\t\t\t\tconsole.error(message, ...args);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport class MultiplexLogger extends AbstractLogger implements ILogger {\n\n\tconstructor(private readonly loggers: ReadonlyArray<ILogger>) {\n\t\tsuper();\n\t\tif (loggers.length) {\n\t\t\tthis.setLevel(loggers[0].getLevel());\n\t\t}\n\t}\n\n\toverride setLevel(level: LogLevel): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.setLevel(level);\n\t\t}\n\t\tsuper.setLevel(level);\n\t}\n\n\ttrace(message: string, ...args: unknown[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.trace(message, ...args);\n\t\t}\n\t}\n\n\tdebug(message: string, ...args: unknown[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.debug(message, ...args);\n\t\t}\n\t}\n\n\tinfo(message: string, ...args: unknown[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.info(message, ...args);\n\t\t}\n\t}\n\n\twarn(message: string, ...args: unknown[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.warn(message, ...args);\n\t\t}\n\t}\n\n\terror(message: string | Error, ...args: unknown[]): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.error(message, ...args);\n\t\t}\n\t}\n\n\toverride dispose(): void {\n\t\tfor (const logger of this.loggers) {\n\t\t\tlogger.dispose();\n\t\t}\n\t\tsuper.dispose();\n\t}\n}\n\ntype LoggerEntry = { logger: ILogger | undefined; info: Mutable<ILoggerResource> };\n\nexport abstract class AbstractLoggerService extends Disposable implements ILoggerService {\n\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate readonly _loggers = new ResourceMap<LoggerEntry>();\n\n\tprivate _onDidChangeLoggers = this._register(new Emitter<{ added: ILoggerResource[]; removed: ILoggerResource[] }>);\n\n\tprivate _onDidChangeVisibility = this._register(new Emitter<[URI, boolean]>);\n\n\tconstructor(\n\t\tprotected logLevel: LogLevel,\n\t\tprivate readonly logsHome: URI,\n\t\tloggerResources?: Iterable<ILoggerResource>,\n\t) {\n\t\tsuper();\n\t\tif (loggerResources) {\n\t\t\tfor (const loggerResource of loggerResources) {\n\t\t\t\tthis._loggers.set(loggerResource.resource, { logger: undefined, info: loggerResource });\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate getLoggerEntry(resourceOrId: URI | string): LoggerEntry | undefined {\n\t\tif (isString(resourceOrId)) {\n\t\t\treturn [...this._loggers.values()].find(logger => logger.info.id === resourceOrId);\n\t\t}\n\t\treturn this._loggers.get(resourceOrId);\n\t}\n\n\tcreateLogger(idOrResource: URI | string, options?: ILoggerOptions): ILogger {\n\t\tconst resource = this.toResource(idOrResource);\n\t\tconst id = isString(idOrResource) ? idOrResource : (options?.id ?? hash(resource.toString()).toString(16));\n\t\tlet logger = this._loggers.get(resource)?.logger;\n\t\tconst logLevel = options?.logLevel === 'always' ? LogLevel.Trace : options?.logLevel;\n\t\tif (!logger) {\n\t\t\tlogger = this.doCreateLogger(resource, logLevel ?? this.getLogLevel(resource) ?? this.logLevel, { ...options, id });\n\t\t}\n\t\tconst loggerEntry: LoggerEntry = {\n\t\t\tlogger,\n\t\t\tinfo: {\n\t\t\t\tresource,\n\t\t\t\tid,\n\t\t\t\tlogLevel,\n\t\t\t\tname: options?.name,\n\t\t\t\thidden: options?.hidden,\n\t\t\t\tgroup: options?.group,\n\t\t\t\textensionId: options?.extensionId,\n\t\t\t\twhen: options?.when\n\t\t\t}\n\t\t};\n\t\tthis.registerLogger(loggerEntry.info);\n\t\t// TODO: @sandy081 Remove this once registerLogger can take ILogger\n\t\tthis._loggers.set(resource, loggerEntry);\n\t\treturn logger;\n\t}\n\n\tprotected toResource(idOrResource: string | URI): URI {\n\t\treturn isString(idOrResource) ? joinPath(this.logsHome, `${idOrResource}.log`) : idOrResource;\n\t}\n\n\tsetVisibility(resourceOrId: URI | string, visibility: boolean): void {\n\t\tconst logger = this.getLoggerEntry(resourceOrId);\n\t\tif (logger && visibility !== !logger.info.hidden) {\n\t\t\tlogger.info.hidden = !visibility;\n\t\t\tthis._loggers.set(logger.info.resource, logger);\n\t\t\tthis._onDidChangeVisibility.fire([logger.info.resource, visibility]);\n\t\t}\n\t}\n\n\tgetLogLevel(resource?: URI): LogLevel {\n\t\tlet logLevel;\n\t\tif (resource) {\n\t\t\tlogLevel = this._loggers.get(resource)?.info.logLevel;\n\t\t}\n\t\treturn logLevel ?? this.logLevel;\n\t}\n\n\tregisterLogger(resource: ILoggerResource): void {\n\t\tconst existing = this._loggers.get(resource.resource);\n\t\tif (existing) {\n\t\t\tif (existing.info.hidden !== resource.hidden) {\n\t\t\t\tthis.setVisibility(resource.resource, !resource.hidden);\n\t\t\t}\n\t\t} else {\n\t\t\tthis._loggers.set(resource.resource, { info: resource, logger: undefined });\n\t\t\tthis._onDidChangeLoggers.fire({ added: [resource], removed: [] });\n\t\t}\n\t}\n\n\toverride dispose(): void {\n\t\tthis._loggers.forEach(logger => logger.logger?.dispose());\n\t\tthis._loggers.clear();\n\t\tsuper.dispose();\n\t}\n\n\tprotected abstract doCreateLogger(resource: URI, logLevel: LogLevel, options?: ILoggerOptions): ILogger;\n}\n\nexport class NullLogger implements ILogger {\n\treadonly onDidChangeLogLevel: Event<LogLevel> = new Emitter<LogLevel>().event;\n\tsetLevel(level: LogLevel): void { }\n\tgetLevel(): LogLevel { return LogLevel.Info; }\n\ttrace(message: string, ...args: unknown[]): void { }\n\tdebug(message: string, ...args: unknown[]): void { }\n\tinfo(message: string, ...args: unknown[]): void { }\n\twarn(message: string, ...args: unknown[]): void { }\n\terror(message: string | Error, ...args: unknown[]): void { }\n\tdispose(): void { }\n}\n\nexport class NullLoggerService extends AbstractLoggerService {\n\tconstructor() {\n\t\tsuper(LogLevel.Off, URI.parse('log:///log'));\n\t}\n\tprotected override doCreateLogger(resource: URI, logLevel: LogLevel, options?: ILoggerOptions): ILogger {\n\t\treturn new NullLogger();\n\t}\n}\n\nexport function LogLevelToString(logLevel: LogLevel): string {\n\tswitch (logLevel) {\n\t\tcase LogLevel.Trace: return 'trace';\n\t\tcase LogLevel.Debug: return 'debug';\n\t\tcase LogLevel.Info: return 'info';\n\t\tcase LogLevel.Warning: return 'warn';\n\t\tcase LogLevel.Error: return 'error';\n\t\tcase LogLevel.Off: return 'off';\n\t}\n}\n\n// Contexts\nexport const CONTEXT_LOG_LEVEL = new RawContextKey<string>('logLevel', LogLevelToString(LogLevel.Info));\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/log/common/logService.ts","vs/platform/log/common/logService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAkC,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3E,MAAM,OAAO,UAAW,SAAQ,UAAU;IAMzC,YAAY,aAAsB,EAAE,eAA0B,EAAE;QAC/D,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,CAAC,CAAC,aAAa,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC;QACpE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAClF,CAAC;IAED,IAAI,mBAAmB;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC;IACxC,CAAC;IAED,QAAQ,CAAC,KAAe;QACvB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED,QAAQ;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,GAAG,
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/log/common/logService.ts","vs/platform/log/common/logService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAkC,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3E,MAAM,OAAO,UAAW,SAAQ,UAAU;IAMzC,YAAY,aAAsB,EAAE,eAA0B,EAAE;QAC/D,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,CAAC,CAAC,aAAa,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC;QACpE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAClF,CAAC;IAED,IAAI,mBAAmB;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC;IACxC,CAAC;IAED,QAAQ,CAAC,KAAe;QACvB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED,QAAQ;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,GAAG,IAAe;QACxC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,GAAG,IAAe;QACxC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IACrC,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,GAAG,IAAe;QACvC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,GAAG,IAAe;QACvC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,OAAuB,EAAE,GAAG,IAAe;QAChD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IACrC,CAAC;CACD","file":"logService.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { Event } from '../../../base/common/event.js';\nimport { ILogger, ILogService, LogLevel, MultiplexLogger } from './log.js';\n\nexport class LogService extends Disposable implements ILogService {\n\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate readonly logger: ILogger;\n\n\tconstructor(primaryLogger: ILogger, otherLoggers: ILogger[] = []) {\n\t\tsuper();\n\t\tthis.logger = new MultiplexLogger([primaryLogger, ...otherLoggers]);\n\t\tthis._register(primaryLogger.onDidChangeLogLevel(level => this.setLevel(level)));\n\t}\n\n\tget onDidChangeLogLevel(): Event<LogLevel> {\n\t\treturn this.logger.onDidChangeLogLevel;\n\t}\n\n\tsetLevel(level: LogLevel): void {\n\t\tthis.logger.setLevel(level);\n\t}\n\n\tgetLevel(): LogLevel {\n\t\treturn this.logger.getLevel();\n\t}\n\n\ttrace(message: string, ...args: unknown[]): void {\n\t\tthis.logger.trace(message, ...args);\n\t}\n\n\tdebug(message: string, ...args: unknown[]): void {\n\t\tthis.logger.debug(message, ...args);\n\t}\n\n\tinfo(message: string, ...args: unknown[]): void {\n\t\tthis.logger.info(message, ...args);\n\t}\n\n\twarn(message: string, ...args: unknown[]): void {\n\t\tthis.logger.warn(message, ...args);\n\t}\n\n\terror(message: string | Error, ...args: unknown[]): void {\n\t\tthis.logger.error(message, ...args);\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { Event } from '../../../base/common/event.js';\nimport { ILogger, ILogService, LogLevel, MultiplexLogger } from './log.js';\n\nexport class LogService extends Disposable implements ILogService {\n\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate readonly logger: ILogger;\n\n\tconstructor(primaryLogger: ILogger, otherLoggers: ILogger[] = []) {\n\t\tsuper();\n\t\tthis.logger = new MultiplexLogger([primaryLogger, ...otherLoggers]);\n\t\tthis._register(primaryLogger.onDidChangeLogLevel(level => this.setLevel(level)));\n\t}\n\n\tget onDidChangeLogLevel(): Event<LogLevel> {\n\t\treturn this.logger.onDidChangeLogLevel;\n\t}\n\n\tsetLevel(level: LogLevel): void {\n\t\tthis.logger.setLevel(level);\n\t}\n\n\tgetLevel(): LogLevel {\n\t\treturn this.logger.getLevel();\n\t}\n\n\ttrace(message: string, ...args: unknown[]): void {\n\t\tthis.logger.trace(message, ...args);\n\t}\n\n\tdebug(message: string, ...args: unknown[]): void {\n\t\tthis.logger.debug(message, ...args);\n\t}\n\n\tinfo(message: string, ...args: unknown[]): void {\n\t\tthis.logger.info(message, ...args);\n\t}\n\n\twarn(message: string, ...args: unknown[]): void {\n\t\tthis.logger.warn(message, ...args);\n\t}\n\n\terror(message: string | Error, ...args: unknown[]): void {\n\t\tthis.logger.error(message, ...args);\n\t}\n}\n"]}
|
|
@@ -16,6 +16,7 @@ import { autorunWithStore } from '../../../base/common/observable.js';
|
|
|
16
16
|
import { IInstantiationService } from '../../instantiation/common/instantiation.js';
|
|
17
17
|
export function hotClassGetOriginalInstance(value) {
|
|
18
18
|
if (value instanceof BaseClass) {
|
|
19
|
+
// eslint-disable-next-line local/code-no-any-casts
|
|
19
20
|
return value._instance;
|
|
20
21
|
}
|
|
21
22
|
return value;
|
|
@@ -27,6 +28,7 @@ class BaseClass {
|
|
|
27
28
|
init(...params) { }
|
|
28
29
|
}
|
|
29
30
|
function createWrapper(clazz, B) {
|
|
31
|
+
// eslint-disable-next-line local/code-no-any-casts
|
|
30
32
|
return (class ReloadableWrapper extends B {
|
|
31
33
|
constructor() {
|
|
32
34
|
super(...arguments);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/observable/common/wrapInHotClass.ts","vs/platform/observable/common/wr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AG,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC/E,CAAC;AAED,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,SAAS;IACjC,YAAY,MAAW,EAAyB,CAAwB,IAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAC3G,CAAA;AAFK,UAAU;IACW,WAAA,qBAAqB,CAAA;GAD1C,UAAU,CAEf","file":"wrapInHotClass.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { isHotReloadEnabled } from '../../../base/common/hotReload.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { autorunWithStore, IObservable } from '../../../base/common/observable.js';\nimport { BrandedService, IInstantiationService } from '../../instantiation/common/instantiation.js';\n\nexport function hotClassGetOriginalInstance<T>(value: T): T {\n\tif (value instanceof BaseClass) {\n\t\treturn value._instance as any;\n\t}\n\treturn value;\n}\n\ntype Result<TArgs extends any[]> = new (...args: TArgs) => IDisposable;\n\nclass BaseClass {\n\tpublic _instance: unknown;\n\n\tconstructor(\n\t\tpublic readonly instantiationService: IInstantiationService,\n\t) { }\n\n\tpublic init(...params: any[]): void { }\n}\n\nfunction createWrapper<T extends any[]>(clazz: IObservable<any>, B: new (...args: T) => BaseClass) {\n\treturn (class ReloadableWrapper extends B {\n\t\tprivate _autorun: IDisposable | undefined = undefined;\n\n\t\toverride init(...params: any[]) {\n\t\t\tthis._autorun = autorunWithStore((reader, store) => {\n\t\t\t\tconst clazz_ = clazz.read(reader);\n\t\t\t\tthis._instance = store.add(this.instantiationService.createInstance(clazz_, ...params) as IDisposable);\n\t\t\t});\n\t\t}\n\n\t\tdispose(): void {\n\t\t\tthis._autorun?.dispose();\n\t\t}\n\t}) as any;\n}\n\n/**\n * Wrap a class in a reloadable wrapper.\n * When the wrapper is created, the original class is created.\n * When the original class changes, the instance is re-created.\n*/\nexport function wrapInHotClass1<TArgs extends [any, ...BrandedService[]]>(clazz: IObservable<Result<TArgs>>): Result<TArgs> {\n\treturn !isHotReloadEnabled() ? clazz.get() : createWrapper(clazz, BaseClass1);\n}\n\nclass BaseClass1 extends BaseClass {\n\tconstructor(param1: any, @IInstantiationService i: IInstantiationService,) { super(i); this.init(param1); }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { isHotReloadEnabled } from '../../../base/common/hotReload.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { autorunWithStore, IObservable } from '../../../base/common/observable.js';\nimport { BrandedService, IInstantiationService } from '../../instantiation/common/instantiation.js';\n\nexport function hotClassGetOriginalInstance<T>(value: T): T {\n\tif (value instanceof BaseClass) {\n\t\treturn value._instance as any;\n\t}\n\treturn value;\n}\n\ntype Result<TArgs extends any[]> = new (...args: TArgs) => IDisposable;\n\nclass BaseClass {\n\tpublic _instance: unknown;\n\n\tconstructor(\n\t\tpublic readonly instantiationService: IInstantiationService,\n\t) { }\n\n\tpublic init(...params: any[]): void { }\n}\n\nfunction createWrapper<T extends any[]>(clazz: IObservable<any>, B: new (...args: T) => BaseClass) {\n\treturn (class ReloadableWrapper extends B {\n\t\tprivate _autorun: IDisposable | undefined = undefined;\n\n\t\toverride init(...params: any[]) {\n\t\t\tthis._autorun = autorunWithStore((reader, store) => {\n\t\t\t\tconst clazz_ = clazz.read(reader);\n\t\t\t\tthis._instance = store.add(this.instantiationService.createInstance(clazz_, ...params) as IDisposable);\n\t\t\t});\n\t\t}\n\n\t\tdispose(): void {\n\t\t\tthis._autorun?.dispose();\n\t\t}\n\t}) as any;\n}\n\n/**\n * Wrap a class in a reloadable wrapper.\n * When the wrapper is created, the original class is created.\n * When the original class changes, the instance is re-created.\n*/\nexport function wrapInHotClass1<TArgs extends [any, ...BrandedService[]]>(clazz: IObservable<Result<TArgs>>): Result<TArgs> {\n\treturn !isHotReloadEnabled() ? clazz.get() : createWrapper(clazz, BaseClass1);\n}\n\nclass BaseClass1 extends BaseClass {\n\tconstructor(param1: any, @IInstantiationService i: IInstantiationService,) { super(i); this.init(param1); }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/observable/common/wrapInHotClass.ts","vs/platform/observable/common/wrapInHotClass.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;gGAGgG;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAe,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAkB,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAEpG,MAAM,UAAU,2BAA2B,CAAI,KAAQ;IACtD,IAAI,KAAK,YAAY,SAAS,EAAE,CAAC;QAChC,mDAAmD;QACnD,OAAO,KAAK,CAAC,SAAgB,CAAC;IAC/B,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAID,MAAM,SAAS;IAGd,YACiB,oBAA2C;QAA3C,yBAAoB,GAApB,oBAAoB,CAAuB;IACxD,CAAC;IAEE,IAAI,CAAC,GAAG,MAAa,IAAU,CAAC;CACvC;AAED,SAAS,aAAa,CAAkB,KAAuB,EAAE,CAAgC;IAChG,mDAAmD;IACnD,OAAO,CAAC,MAAM,iBAAkB,SAAQ,CAAC;QAAjC;;YACC,aAAQ,GAA4B,SAAS,CAAC;QAYvD,CAAC;QAVS,IAAI,CAAC,GAAG,MAAa;YAC7B,IAAI,CAAC,QAAQ,GAAG,gBAAgB,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;gBAClD,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAClC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,MAAM,CAAgB,CAAC,CAAC;YACxG,CAAC,CAAC,CAAC;QACJ,CAAC;QAED,OAAO;YACN,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;QAC1B,CAAC;KACD,CAAQ,CAAC;AACX,CAAC;AAED;;;;EAIE;AACF,MAAM,UAAU,eAAe,CAA2C,KAAiC;IAC1G,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC/E,CAAC;AAED,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,SAAS;IACjC,YAAY,MAAW,EAAyB,CAAwB,IAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAC3G,CAAA;AAFK,UAAU;IACW,WAAA,qBAAqB,CAAA;GAD1C,UAAU,CAEf","file":"wrapInHotClass.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { isHotReloadEnabled } from '../../../base/common/hotReload.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { autorunWithStore, IObservable } from '../../../base/common/observable.js';\nimport { BrandedService, IInstantiationService } from '../../instantiation/common/instantiation.js';\n\nexport function hotClassGetOriginalInstance<T>(value: T): T {\n\tif (value instanceof BaseClass) {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\treturn value._instance as any;\n\t}\n\treturn value;\n}\n\ntype Result<TArgs extends any[]> = new (...args: TArgs) => IDisposable;\n\nclass BaseClass {\n\tpublic _instance: unknown;\n\n\tconstructor(\n\t\tpublic readonly instantiationService: IInstantiationService,\n\t) { }\n\n\tpublic init(...params: any[]): void { }\n}\n\nfunction createWrapper<T extends any[]>(clazz: IObservable<any>, B: new (...args: T) => BaseClass) {\n\t// eslint-disable-next-line local/code-no-any-casts\n\treturn (class ReloadableWrapper extends B {\n\t\tprivate _autorun: IDisposable | undefined = undefined;\n\n\t\toverride init(...params: any[]) {\n\t\t\tthis._autorun = autorunWithStore((reader, store) => {\n\t\t\t\tconst clazz_ = clazz.read(reader);\n\t\t\t\tthis._instance = store.add(this.instantiationService.createInstance(clazz_, ...params) as IDisposable);\n\t\t\t});\n\t\t}\n\n\t\tdispose(): void {\n\t\t\tthis._autorun?.dispose();\n\t\t}\n\t}) as any;\n}\n\n/**\n * Wrap a class in a reloadable wrapper.\n * When the wrapper is created, the original class is created.\n * When the original class changes, the instance is re-created.\n*/\nexport function wrapInHotClass1<TArgs extends [any, ...BrandedService[]]>(clazz: IObservable<Result<TArgs>>): Result<TArgs> {\n\treturn !isHotReloadEnabled() ? clazz.get() : createWrapper(clazz, BaseClass1);\n}\n\nclass BaseClass1 extends BaseClass {\n\tconstructor(param1: any, @IInstantiationService i: IInstantiationService,) { super(i); this.init(param1); }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { isHotReloadEnabled } from '../../../base/common/hotReload.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { autorunWithStore, IObservable } from '../../../base/common/observable.js';\nimport { BrandedService, IInstantiationService } from '../../instantiation/common/instantiation.js';\n\nexport function hotClassGetOriginalInstance<T>(value: T): T {\n\tif (value instanceof BaseClass) {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\treturn value._instance as any;\n\t}\n\treturn value;\n}\n\ntype Result<TArgs extends any[]> = new (...args: TArgs) => IDisposable;\n\nclass BaseClass {\n\tpublic _instance: unknown;\n\n\tconstructor(\n\t\tpublic readonly instantiationService: IInstantiationService,\n\t) { }\n\n\tpublic init(...params: any[]): void { }\n}\n\nfunction createWrapper<T extends any[]>(clazz: IObservable<any>, B: new (...args: T) => BaseClass) {\n\t// eslint-disable-next-line local/code-no-any-casts\n\treturn (class ReloadableWrapper extends B {\n\t\tprivate _autorun: IDisposable | undefined = undefined;\n\n\t\toverride init(...params: any[]) {\n\t\t\tthis._autorun = autorunWithStore((reader, store) => {\n\t\t\t\tconst clazz_ = clazz.read(reader);\n\t\t\t\tthis._instance = store.add(this.instantiationService.createInstance(clazz_, ...params) as IDisposable);\n\t\t\t});\n\t\t}\n\n\t\tdispose(): void {\n\t\t\tthis._autorun?.dispose();\n\t\t}\n\t}) as any;\n}\n\n/**\n * Wrap a class in a reloadable wrapper.\n * When the wrapper is created, the original class is created.\n * When the original class changes, the instance is re-created.\n*/\nexport function wrapInHotClass1<TArgs extends [any, ...BrandedService[]]>(clazz: IObservable<Result<TArgs>>): Result<TArgs> {\n\treturn !isHotReloadEnabled() ? clazz.get() : createWrapper(clazz, BaseClass1);\n}\n\nclass BaseClass1 extends BaseClass {\n\tconstructor(param1: any, @IInstantiationService i: IInstantiationService,) { super(i); this.init(param1); }\n}\n"]}
|
|
@@ -22,6 +22,7 @@ class BaseClass {
|
|
|
22
22
|
init(...params) { }
|
|
23
23
|
}
|
|
24
24
|
function createWrapper(getClass, B) {
|
|
25
|
+
// eslint-disable-next-line local/code-no-any-casts
|
|
25
26
|
return (class ReloadableWrapper extends B {
|
|
26
27
|
constructor() {
|
|
27
28
|
super(...arguments);
|
|
@@ -30,6 +31,7 @@ function createWrapper(getClass, B) {
|
|
|
30
31
|
init(...params) {
|
|
31
32
|
this._autorun = autorunWithStore((reader, store) => {
|
|
32
33
|
const clazz = readHotReloadableExport(getClass(), reader);
|
|
34
|
+
// eslint-disable-next-line local/code-no-any-casts
|
|
33
35
|
store.add(this.instantiationService.createInstance(clazz, ...params));
|
|
34
36
|
});
|
|
35
37
|
}
|
|
@@ -44,6 +46,7 @@ function createWrapper(getClass, B) {
|
|
|
44
46
|
* When the original class changes, the instance is re-created.
|
|
45
47
|
*/
|
|
46
48
|
export function wrapInReloadableClass1(getClass) {
|
|
49
|
+
// eslint-disable-next-line local/code-no-any-casts
|
|
47
50
|
return !isHotReloadEnabled() ? getClass() : createWrapper(getClass, BaseClass1);
|
|
48
51
|
}
|
|
49
52
|
let BaseClass1 = class BaseClass1 extends BaseClass {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/observable/common/wrapInReloadableClass.ts","vs/platform/observable/common/wrapInReloadableClass.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;gGAGgG;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAEnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAA4C,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAI9H,MAAM,SAAS;IACd,YACiB,oBAA2C;QAA3C,yBAAoB,GAApB,oBAAoB,CAAuB;IACxD,CAAC;IAEE,IAAI,CAAC,GAAG,MAAa,IAAU,CAAC;CACvC;AAED,SAAS,aAAa,CAAkB,QAAmB,EAAE,CAAgC;IAC5F,OAAO,CAAC,MAAM,iBAAkB,SAAQ,CAAC;QAAjC;;YACC,aAAQ,GAA4B,SAAS,CAAC;
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/observable/common/wrapInReloadableClass.ts","vs/platform/observable/common/wrapInReloadableClass.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;gGAGgG;AAChG,OAAO,EA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,CAAwB,IAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAC3G,CAAA;AAFK,UAAU;IACW,WAAA,qBAAqB,CAAA;GAD1C,UAAU,CAEf","file":"wrapInReloadableClass.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { isHotReloadEnabled } from '../../../base/common/hotReload.js';\nimport { readHotReloadableExport } from '../../../base/common/hotReloadHelpers.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { autorunWithStore } from '../../../base/common/observable.js';\nimport { BrandedService, GetLeadingNonServiceArgs, IInstantiationService } from '../../instantiation/common/instantiation.js';\n\ntype Result<TArgs extends any[]> = new (...args: TArgs) => IDisposable;\n\nclass BaseClass {\n\tconstructor(\n\t\tpublic readonly instantiationService: IInstantiationService,\n\t) { }\n\n\tpublic init(...params: any[]): void { }\n}\n\nfunction createWrapper<T extends any[]>(getClass: () => any, B: new (...args: T) => BaseClass) {\n\t// eslint-disable-next-line local/code-no-any-casts\n\treturn (class ReloadableWrapper extends B {\n\t\tprivate _autorun: IDisposable | undefined = undefined;\n\n\t\toverride init(...params: any[]) {\n\t\t\tthis._autorun = autorunWithStore((reader, store) => {\n\t\t\t\tconst clazz = readHotReloadableExport(getClass(), reader);\n\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\tstore.add(this.instantiationService.createInstance(clazz as any, ...params) as IDisposable);\n\t\t\t});\n\t\t}\n\n\t\tdispose(): void {\n\t\t\tthis._autorun?.dispose();\n\t\t}\n\t}) as any;\n}\n\n/**\n * Wrap a class in a reloadable wrapper.\n * When the wrapper is created, the original class is created.\n * When the original class changes, the instance is re-created.\n*/\nexport function wrapInReloadableClass1<TArgs extends [any, ...BrandedService[]]>(getClass: () => Result<TArgs>): Result<GetLeadingNonServiceArgs<TArgs>> {\n\t// eslint-disable-next-line local/code-no-any-casts\n\treturn !isHotReloadEnabled() ? getClass() as any : createWrapper(getClass, BaseClass1);\n}\n\nclass BaseClass1 extends BaseClass {\n\tconstructor(param1: any, @IInstantiationService i: IInstantiationService,) { super(i); this.init(param1); }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { isHotReloadEnabled } from '../../../base/common/hotReload.js';\nimport { readHotReloadableExport } from '../../../base/common/hotReloadHelpers.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { autorunWithStore } from '../../../base/common/observable.js';\nimport { BrandedService, GetLeadingNonServiceArgs, IInstantiationService } from '../../instantiation/common/instantiation.js';\n\ntype Result<TArgs extends any[]> = new (...args: TArgs) => IDisposable;\n\nclass BaseClass {\n\tconstructor(\n\t\tpublic readonly instantiationService: IInstantiationService,\n\t) { }\n\n\tpublic init(...params: any[]): void { }\n}\n\nfunction createWrapper<T extends any[]>(getClass: () => any, B: new (...args: T) => BaseClass) {\n\t// eslint-disable-next-line local/code-no-any-casts\n\treturn (class ReloadableWrapper extends B {\n\t\tprivate _autorun: IDisposable | undefined = undefined;\n\n\t\toverride init(...params: any[]) {\n\t\t\tthis._autorun = autorunWithStore((reader, store) => {\n\t\t\t\tconst clazz = readHotReloadableExport(getClass(), reader);\n\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\tstore.add(this.instantiationService.createInstance(clazz as any, ...params) as IDisposable);\n\t\t\t});\n\t\t}\n\n\t\tdispose(): void {\n\t\t\tthis._autorun?.dispose();\n\t\t}\n\t}) as any;\n}\n\n/**\n * Wrap a class in a reloadable wrapper.\n * When the wrapper is created, the original class is created.\n * When the original class changes, the instance is re-created.\n*/\nexport function wrapInReloadableClass1<TArgs extends [any, ...BrandedService[]]>(getClass: () => Result<TArgs>): Result<GetLeadingNonServiceArgs<TArgs>> {\n\t// eslint-disable-next-line local/code-no-any-casts\n\treturn !isHotReloadEnabled() ? getClass() as any : createWrapper(getClass, BaseClass1);\n}\n\nclass BaseClass1 extends BaseClass {\n\tconstructor(param1: any, @IInstantiationService i: IInstantiationService,) { super(i); this.init(param1); }\n}\n"]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { env } from '../../../base/common/process.js';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated It is preferred that you use `IProductService` if you can. This
|
|
8
|
+
* allows web embedders to override our defaults. But for things like `product.quality`,
|
|
9
|
+
* the use is fine because that property is not overridable.
|
|
10
|
+
*/
|
|
11
|
+
let product;
|
|
12
|
+
// Native sandbox environment
|
|
13
|
+
const vscodeGlobal = globalThis.vscode;
|
|
14
|
+
if (typeof vscodeGlobal !== 'undefined' && typeof vscodeGlobal.context !== 'undefined') {
|
|
15
|
+
const configuration = vscodeGlobal.context.configuration();
|
|
16
|
+
if (configuration) {
|
|
17
|
+
product = configuration.product;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
throw new Error('Sandbox: unable to resolve product configuration from preload script.');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
// _VSCODE environment
|
|
24
|
+
else if (globalThis._VSCODE_PRODUCT_JSON && globalThis._VSCODE_PACKAGE_JSON) {
|
|
25
|
+
// Obtain values from product.json and package.json-data
|
|
26
|
+
product = globalThis._VSCODE_PRODUCT_JSON;
|
|
27
|
+
// Running out of sources
|
|
28
|
+
if (env['VSCODE_DEV']) {
|
|
29
|
+
Object.assign(product, {
|
|
30
|
+
nameShort: `${product.nameShort} Dev`,
|
|
31
|
+
nameLong: `${product.nameLong} Dev`,
|
|
32
|
+
dataFolderName: `${product.dataFolderName}-dev`,
|
|
33
|
+
serverDataFolderName: product.serverDataFolderName ? `${product.serverDataFolderName}-dev` : undefined
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
// Version is added during built time, but we still
|
|
37
|
+
// want to have it running out of sources so we
|
|
38
|
+
// read it from package.json only when we need it.
|
|
39
|
+
if (!product.version) {
|
|
40
|
+
const pkg = globalThis._VSCODE_PACKAGE_JSON;
|
|
41
|
+
Object.assign(product, {
|
|
42
|
+
version: pkg.version
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// Web environment or unknown
|
|
47
|
+
else {
|
|
48
|
+
// Built time configuration (do NOT modify)
|
|
49
|
+
// eslint-disable-next-line local/code-no-dangerous-type-assertions
|
|
50
|
+
product = { /*BUILD->INSERT_PRODUCT_CONFIGURATION*/};
|
|
51
|
+
// Running out of sources
|
|
52
|
+
if (Object.keys(product).length === 0) {
|
|
53
|
+
Object.assign(product, {
|
|
54
|
+
version: '1.104.0-dev',
|
|
55
|
+
nameShort: 'Code - OSS Dev',
|
|
56
|
+
nameLong: 'Code - OSS Dev',
|
|
57
|
+
applicationName: 'code-oss',
|
|
58
|
+
dataFolderName: '.vscode-oss',
|
|
59
|
+
urlProtocol: 'code-oss',
|
|
60
|
+
reportIssueUrl: 'https://github.com/microsoft/vscode/issues/new',
|
|
61
|
+
licenseName: 'MIT',
|
|
62
|
+
licenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt',
|
|
63
|
+
serverLicenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt'
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export default product;
|
|
68
|
+
//# sourceMappingURL=product.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/plat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AC;QAEnE,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YACtB,OAAO,EAAE,GAAG,CAAC,OAAO;SACpB,CAAC,CAAC;IACJ,CAAC;AACF,CAAC;AAED,6BAA6B;KACxB,CAAC;IAEL,2CAA2C;IAC3C,mEAAmE;IACnE,OAAO,GAAG,EAAE,uCAAuC,CAAsC,CAAC;IAE1F,yBAAyB;IACzB,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YACtB,OAAO,EAAE,aAAa;YACtB,SAAS,EAAE,gBAAgB;YAC3B,QAAQ,EAAE,gBAAgB;YAC1B,eAAe,EAAE,UAAU;YAC3B,cAAc,EAAE,aAAa;YAC7B,WAAW,EAAE,UAAU;YACvB,cAAc,EAAE,gDAAgD;YAChE,WAAW,EAAE,KAAK;YAClB,UAAU,EAAE,2DAA2D;YACvE,gBAAgB,EAAE,2DAA2D;SAC7E,CAAC,CAAC;IACJ,CAAC;AACF,CAAC;AAED,eAAe,OAAO,CAAC","file":"product.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { env } from '../../../base/common/process.js';\nimport { IProductConfiguration } from '../../../base/common/product.js';\nimport { ISandboxConfiguration } from '../../../base/parts/sandbox/common/sandboxTypes.js';\n\n/**\n * @deprecated It is preferred that you use `IProductService` if you can. This\n * allows web embedders to override our defaults. But for things like `product.quality`,\n * the use is fine because that property is not overridable.\n */\nlet product: IProductConfiguration;\n\n// Native sandbox environment\nconst vscodeGlobal = (globalThis as { vscode?: { context?: { configuration(): ISandboxConfiguration | undefined } } }).vscode;\nif (typeof vscodeGlobal !== 'undefined' && typeof vscodeGlobal.context !== 'undefined') {\n\tconst configuration: ISandboxConfiguration | undefined = vscodeGlobal.context.configuration();\n\tif (configuration) {\n\t\tproduct = configuration.product;\n\t} else {\n\t\tthrow new Error('Sandbox: unable to resolve product configuration from preload script.');\n\t}\n}\n// _VSCODE environment\nelse if (globalThis._VSCODE_PRODUCT_JSON && globalThis._VSCODE_PACKAGE_JSON) {\n\t// Obtain values from product.json and package.json-data\n\tproduct = globalThis._VSCODE_PRODUCT_JSON as unknown as IProductConfiguration;\n\n\t// Running out of sources\n\tif (env['VSCODE_DEV']) {\n\t\tObject.assign(product, {\n\t\t\tnameShort: `${product.nameShort} Dev`,\n\t\t\tnameLong: `${product.nameLong} Dev`,\n\t\t\tdataFolderName: `${product.dataFolderName}-dev`,\n\t\t\tserverDataFolderName: product.serverDataFolderName ? `${product.serverDataFolderName}-dev` : undefined\n\t\t});\n\t}\n\n\t// Version is added during built time, but we still\n\t// want to have it running out of sources so we\n\t// read it from package.json only when we need it.\n\tif (!product.version) {\n\t\tconst pkg = globalThis._VSCODE_PACKAGE_JSON as { version: string };\n\n\t\tObject.assign(product, {\n\t\t\tversion: pkg.version\n\t\t});\n\t}\n}\n\n// Web environment or unknown\nelse {\n\n\t// Built time configuration (do NOT modify)\n\t// eslint-disable-next-line local/code-no-dangerous-type-assertions\n\tproduct = { /*BUILD->INSERT_PRODUCT_CONFIGURATION*/ } as unknown as IProductConfiguration;\n\n\t// Running out of sources\n\tif (Object.keys(product).length === 0) {\n\t\tObject.assign(product, {\n\t\t\tversion: '1.104.0-dev',\n\t\t\tnameShort: 'Code - OSS Dev',\n\t\t\tnameLong: 'Code - OSS Dev',\n\t\t\tapplicationName: 'code-oss',\n\t\t\tdataFolderName: '.vscode-oss',\n\t\t\turlProtocol: 'code-oss',\n\t\t\treportIssueUrl: 'https://github.com/microsoft/vscode/issues/new',\n\t\t\tlicenseName: 'MIT',\n\t\t\tlicenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt',\n\t\t\tserverLicenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt'\n\t\t});\n\t}\n}\n\nexport default product;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { env } from '../../../base/common/process.js';\nimport { IProductConfiguration } from '../../../base/common/product.js';\nimport { ISandboxConfiguration } from '../../../base/parts/sandbox/common/sandboxTypes.js';\n\n/**\n * @deprecated It is preferred that you use `IProductService` if you can. This\n * allows web embedders to override our defaults. But for things like `product.quality`,\n * the use is fine because that property is not overridable.\n */\nlet product: IProductConfiguration;\n\n// Native sandbox environment\nconst vscodeGlobal = (globalThis as { vscode?: { context?: { configuration(): ISandboxConfiguration | undefined } } }).vscode;\nif (typeof vscodeGlobal !== 'undefined' && typeof vscodeGlobal.context !== 'undefined') {\n\tconst configuration: ISandboxConfiguration | undefined = vscodeGlobal.context.configuration();\n\tif (configuration) {\n\t\tproduct = configuration.product;\n\t} else {\n\t\tthrow new Error('Sandbox: unable to resolve product configuration from preload script.');\n\t}\n}\n// _VSCODE environment\nelse if (globalThis._VSCODE_PRODUCT_JSON && globalThis._VSCODE_PACKAGE_JSON) {\n\t// Obtain values from product.json and package.json-data\n\tproduct = globalThis._VSCODE_PRODUCT_JSON as unknown as IProductConfiguration;\n\n\t// Running out of sources\n\tif (env['VSCODE_DEV']) {\n\t\tObject.assign(product, {\n\t\t\tnameShort: `${product.nameShort} Dev`,\n\t\t\tnameLong: `${product.nameLong} Dev`,\n\t\t\tdataFolderName: `${product.dataFolderName}-dev`,\n\t\t\tserverDataFolderName: product.serverDataFolderName ? `${product.serverDataFolderName}-dev` : undefined\n\t\t});\n\t}\n\n\t// Version is added during built time, but we still\n\t// want to have it running out of sources so we\n\t// read it from package.json only when we need it.\n\tif (!product.version) {\n\t\tconst pkg = globalThis._VSCODE_PACKAGE_JSON as { version: string };\n\n\t\tObject.assign(product, {\n\t\t\tversion: pkg.version\n\t\t});\n\t}\n}\n\n// Web environment or unknown\nelse {\n\n\t// Built time configuration (do NOT modify)\n\t// eslint-disable-next-line local/code-no-dangerous-type-assertions\n\tproduct = { /*BUILD->INSERT_PRODUCT_CONFIGURATION*/ } as unknown as IProductConfiguration;\n\n\t// Running out of sources\n\tif (Object.keys(product).length === 0) {\n\t\tObject.assign(product, {\n\t\t\tversion: '1.104.0-dev',\n\t\t\tnameShort: 'Code - OSS Dev',\n\t\t\tnameLong: 'Code - OSS Dev',\n\t\t\tapplicationName: 'code-oss',\n\t\t\tdataFolderName: '.vscode-oss',\n\t\t\turlProtocol: 'code-oss',\n\t\t\treportIssueUrl: 'https://github.com/microsoft/vscode/issues/new',\n\t\t\tlicenseName: 'MIT',\n\t\t\tlicenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt',\n\t\t\tserverLicenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt'\n\t\t});\n\t}\n}\n\nexport default product;\n"]}
|
|
@@ -29,6 +29,7 @@ import { ILogService } from '../../log/common/log.js';
|
|
|
29
29
|
import { PickerQuickAccessProvider } from './pickerQuickAccess.js';
|
|
30
30
|
import { IStorageService, WillSaveStateReason } from '../../storage/common/storage.js';
|
|
31
31
|
import { ITelemetryService } from '../../telemetry/common/telemetry.js';
|
|
32
|
+
import { removeAccents } from '../../../base/common/normalization.js';
|
|
32
33
|
let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvider extends PickerQuickAccessProvider {
|
|
33
34
|
static { AbstractCommandsQuickAccessProvider_1 = this; }
|
|
34
35
|
static { this.PREFIX = '>'; }
|
|
@@ -61,11 +62,17 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
61
62
|
.filter(score => score.score > AbstractCommandsQuickAccessProvider_1.TFIDF_THRESHOLD)
|
|
62
63
|
.slice(0, AbstractCommandsQuickAccessProvider_1.TFIDF_MAX_RESULTS);
|
|
63
64
|
});
|
|
65
|
+
const noAccentsFilter = this.normalizeForFiltering(filter);
|
|
64
66
|
// Filter
|
|
65
67
|
const filteredCommandPicks = [];
|
|
66
68
|
for (const commandPick of allCommandPicks) {
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
+
commandPick.labelNoAccents ??= this.normalizeForFiltering(commandPick.label);
|
|
70
|
+
const labelHighlights = AbstractCommandsQuickAccessProvider_1.WORD_FILTER(noAccentsFilter, commandPick.labelNoAccents) ?? undefined;
|
|
71
|
+
let aliasHighlights;
|
|
72
|
+
if (commandPick.commandAlias) {
|
|
73
|
+
commandPick.aliasNoAccents ??= this.normalizeForFiltering(commandPick.commandAlias);
|
|
74
|
+
aliasHighlights = AbstractCommandsQuickAccessProvider_1.WORD_FILTER(noAccentsFilter, commandPick.aliasNoAccents) ?? undefined;
|
|
75
|
+
}
|
|
69
76
|
// Add if matching in label or alias
|
|
70
77
|
if (labelHighlights || aliasHighlights) {
|
|
71
78
|
commandPick.highlights = {
|
|
@@ -242,6 +249,23 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
|
|
|
242
249
|
}
|
|
243
250
|
return chunk;
|
|
244
251
|
}
|
|
252
|
+
/**
|
|
253
|
+
* Normalizes a string for filtering by removing accents, but only if the result has the same length, otherwise
|
|
254
|
+
* returns the original string.
|
|
255
|
+
*/
|
|
256
|
+
normalizeForFiltering(value) {
|
|
257
|
+
const withoutAccents = removeAccents(value);
|
|
258
|
+
if (withoutAccents.length !== value.length) {
|
|
259
|
+
this.telemetryService.publicLog2('QuickAccess:FilterLengthMismatch', {
|
|
260
|
+
originalLength: value.length,
|
|
261
|
+
normalizedLength: withoutAccents.length
|
|
262
|
+
});
|
|
263
|
+
return value;
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
return withoutAccents;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
245
269
|
};
|
|
246
270
|
AbstractCommandsQuickAccessProvider = AbstractCommandsQuickAccessProvider_1 = __decorate([
|
|
247
271
|
__param(1, IInstantiationService),
|