This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { describe, expect, test } from 'vitest' | |
import { lastValueFromAsyncGenerator } from '../common/asyncGenerator' | |
import { parseMessageXMLLike } from './structuredMessageParser' | |
describe('parseXmlTags', () => { | |
test('parses XML tags correctly', async () => { | |
const input = '<tag1>content1</tag1><tag2>content2</tag2><tag1>content3</tag1>' | |
async function* generateChunks() { | |
yield input | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/doc/extensions/authoring/publishing.md b/doc/extensions/authoring/publishing.md | |
index ddd670600..147efece3 100644 | |
--- a/doc/extensions/authoring/publishing.md | |
+++ b/doc/extensions/authoring/publishing.md | |
@@ -19,11 +19,26 @@ At this point, your extension has been built and sent to Sourcegraph. The output | |
Any user can publish to the Sourcegraph.com extension registry, all Sourcegraph instances can use extensions from Sourcegraph.com, and all Sourcegraph.com extensions are visible to everyone. If you need to publish an extension privately, use a private extension registry on your own self-hosted Sourcegraph instance. | |
-## Testing your extension | |
+## Using extensions in local development (sideloading) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Full-text/regexp search across the top 500 Rust crates: | |
// | |
// 1. Sign up for Sourcegraph.com at https://sourcegraph.com/sign-up (or sign in) | |
// 2. Click your username in the top right | |
// 3. Go to Configuration | |
// 4. Paste this entire JSON in and click Save | |
// 5. In the search box, type a search query of the form "repogroup:crates YOUR QUERY" | |
// and hit enter (regexps, exact matching, etc., are supported) | |
// | |
// Examples: "repogroup:crates remove_file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*--------------------------------------------------------------------------------------------- | |
* Copyright (c) Microsoft Corporation. All rights reserved. | |
* Licensed under the MIT License. See License.txt in the project root for license information. | |
*--------------------------------------------------------------------------------------------*/ | |
'use strict'; | |
import URI from 'vs/base/common/uri'; | |
import { FileService } from 'vs/workbench/services/files/electron-browser/fileService'; | |
import { IContent, IStreamContent, IFileStat, IResolveContentOptions, IResolveFileOptions, IResolveFileResult, IUpdateContentOptions, FileChangesEvent, FileChangeType, IImportResult } from 'vs/platform/files/common/files'; | |
import { TPromise } from "vs/base/common/winjs.base"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* An EventEmitter that implements the NodeJS.EventEmitter interface. | |
*/ | |
export class EventEmitter implements NodeJS.EventEmitter { | |
private _events: { [name: string]: Function[] } = Object.create(null); | |
private _maxListeners = 10; | |
private _onceListeners: Function[] = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns true iff url == uri-resolve(url, candidate) per | |
* https://tools.ietf.org/html/rfc3986#section-5.2.2. For example, if currentURL is | |
* http://example.com/foo and newURL is /foo, then it returns true. | |
*/ | |
export function resolvesToEqual(url: URI | string, candidate: URI | string): boolean { | |
if (typeof url === 'string') { url = URI.parse(url); } | |
if (typeof candidate === 'string') { candidate = URI.parse(candidate); } | |
const change: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ if (window.location.hostname !== "github.com" && window.location.hostname !== "sourcegraph.com") { alert("This bookmarklet may only be used on GitHub.com or Sourcegraph.com, not " + window.location.hostname + "."); return; } var pats = [ ["^/([^/]+)/([^/]+)/tree/([^/]+)$", "/github.com/$1/$2@$3", "^/github\.com/([^/]+)/([^/@]+)@([^/]+)$", "/$1/$2/tree/$3"], ["^/([^/]+)/([^/]+)/tree/([^/]+)/(.+)$", "/github.com/$1/$2@$3/-/tree/$4", "^/github\.com/([^/]+)/([^/@]+)@([^/]+)/-/tree/(.+)$", "/$1/$2/tree/$3/$4"], ["^/([^/]+)/([^/]+)/blob/([^/]+)/(.+)$", "/github.com/$1/$2@$3/-/blob/$4", "", ""], ["^/([^/]+)/([^/]+)$", "/github.com/$1/$2", "^/github\.com/([^/]+)/([^/]+)$", "/$1/$2"], ["^/([^/]+)$", "/$1", "^/([^/]+)$", "/$1"], ]; var pathname = window.location.pathname; if (window.location.hostname === 'sourcegraph.com') { if (pathname.indexOf('/sourcegraph.com/') === 0) { pathname = pathname.replace('/sourcegraph.com/', '/github.com/'); } else if (pathname.indexOf('/sourcegraph/') === 0) { pa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
“Name”: “twitter-text-dart”, | |
“Type”: “DartPackage”, // same as defined in the Srclibtoolchain | |
“Files”: [ | |
“lib/foo.dart”, “lib/bar.dart” // all files related to the Dart package (used as make prereqs in Makefile generated by srclib underlying backend) | |
], | |
“Ops”: { // just use this - null means use the registered toolchain for graphing/depresolving DartPackage source units | |
“graph”: null, | |
“depresolve: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package db | |
import ( | |
"strings" | |
"time" | |
"github.com/sqs/modl" | |
) | |
// SimpleQueue is a PostgreSQL-backed queue with atomic enqueue and dequeue, no |
NewerOlder