diff --git a/package.json b/package.json index 886a5e13..e1a4199b 100644 --- a/package.json +++ b/package.json @@ -24,28 +24,8 @@ ], "activationEvents": [ "workspaceContains:**/*.sqlx", - "onCommand:extension.runFilesTagsWtOptionsInRemoteWorkspace", - "onCommand:extension.runCurrentFile", - "onCommand:extension.runCurrentFileWtApi", - "onCommand:extension.runCurrentFileWtDependenciesApi", - "onCommand:extension.runCurrentFileWtDependentsApi", - "onCommand:extension.showDependentsInGraph", - "onCommand:extension.runCurrentFileWtDeps", - "onCommand:extension.runCurrentFileWtDownstreamDeps", - "onCommand:extension.showCompiledQueryWtDryRun", - "onCommand:extension.runTag", - "onCommand:extension.runTagWtDeps", - "onCommand:extension.runTagWtDownstreamDeps", - "onCommand:extension.runTagWtApi", - "onCommand:extension.runTagWtDependenciesApi", - "onCommand:extension.runTagWtDependentsApi", - "onCommand:extension.runFilesTagsWtOptions", - "onCommand:extension.runFilesTagsWtOptionsApi", - "onCommand:extension.createNewDataformProject", - "onCommand:extension.showCompiledQueryInWebView", - "onCommand:extension.dependencyGraphPanel", - "onCommand:extension.selectWorkspaceFolder", - "onCommand:extension.clearExtensionCache" + "workspaceContains:**/workflow_settings.yaml", + "workspaceContains:**/dataform.json" ], "main": "./out/src/extension.js", "contributes": { @@ -138,6 +118,11 @@ "category": "Dataform", "title": "Run tag with dependents using API" }, + { + "command": "vscode-dataform-tools.runAssertions", + "category": "Dataform", + "title": "Run assertions in the current model" + }, { "command": "vscode-dataform-tools.runCurrentFileWtDownstreamDeps", "category": "Dataform", @@ -438,4 +423,4 @@ "tablemark": "^3.1.0", "typescript": "^5.7.3" } -} +} \ No newline at end of file diff --git a/src/constants.ts b/src/constants.ts index baafcb5b..843db936 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -184,4 +184,17 @@ export async function getFileNotFoundErrorMessageForWebView(relativeFilePath: st `; return errorMessage; -} \ No newline at end of file +} + + + +export const defaultCdnLinks = { + highlightJsCssUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css", + highlightJsUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js", + highlightJsOneDarkThemeUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css", + highlightJsOneLightThemeUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-light.min.css", + highlightJsLineNoExtUri: "https://cdn.jsdelivr.net/npm/highlightjs-line-numbers.js/dist/highlightjs-line-numbers.min.js", + tabulatorDarkCssUri: "https://unpkg.com/tabulator-tables@6.3.0/dist/css/tabulator_midnight.min.css", + tabulatorLightCssUri: "https://unpkg.com/tabulator-tables@6.3.0/dist/css/tabulator_simple.min.css", + tabulatorUri: "https://unpkg.com/tabulator-tables@6.3.0/dist/js/tabulator.min.js", +}; \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index 238daf34..f2433b1e 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -8,7 +8,7 @@ import { CustomViewProvider } from './views/register-query-results-panel'; import { dataformCodeActionProviderDisposable, applyCodeActionUsingDiagnosticMessage } from './codeActionProvider'; import { DataformRequireDefinitionProvider, DataformJsDefinitionProvider, DataformCTEDefinitionProvider } from './definitionProvider'; import { DataformConfigProvider, DataformHoverProvider, DataformBigQueryHoverProvider } from './hoverProvider'; -import { executablesToCheck } from './constants'; +import { defaultCdnLinks, executablesToCheck } from './constants'; import { getWorkspaceFolder, getCurrentFileMetadata, sendNotifactionToUserOnExtensionUpdate, selectWorkspaceFolder } from './utils'; import { executableIsAvailable } from './utils'; import { sourcesAutoCompletionDisposable, dependenciesAutoCompletionDisposable, tagsAutoCompletionDisposable, schemaAutoCompletionDisposable } from './completions'; @@ -50,16 +50,7 @@ export async function activate(context: vscode.ExtensionContext) { globalThis.cancelBigQueryJobSignal = false; globalThis.queryLimit = 1000; globalThis.diagnosticCollection = undefined; - globalThis.cdnLinks = { - highlightJsCssUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css", - highlightJsUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js", - highlightJsOneDarkThemeUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css", - highlightJsOneLightThemeUri: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-light.min.css", - highlightJsLineNoExtUri: "https://cdn.jsdelivr.net/npm/highlightjs-line-numbers.js/dist/highlightjs-line-numbers.min.js", - tabulatorDarkCssUri: "https://unpkg.com/tabulator-tables@6.2.5/dist/css/tabulator_midnight.min.css", - tabulatorLightCssUri: "https://unpkg.com/tabulator-tables@6.2.5/dist/css/tabulator_simple.min.css", - tabulatorUri: "https://unpkg.com/tabulator-tables@6.3.0/dist/js/tabulator.min.js", - }; + globalThis.cdnLinks = defaultCdnLinks; globalThis.compiledQuerySchema = undefined; globalThis.incrementalCheckBox = false; globalThis.schemaAutoCompletions = [];