Skip to content

Commit

Permalink
add vsx utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofstetter Benjamin (extern) committed Apr 9, 2024
1 parent 45402d4 commit 95bd3ab
Show file tree
Hide file tree
Showing 4 changed files with 263 additions and 0 deletions.
5 changes: 5 additions & 0 deletions extension-dependencies.open-vsx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extensionDependencies": [
"vemonet.stardog-rdf-grammars"
]
}
225 changes: 225 additions & 0 deletions package.json.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
{
"name": "sparql-notebook",
"displayName": "SPARQL Notebook",
"description": "A powerful way to document SPARQL queries and make them execute as notebook code cells",
"publisher": "Zazuko",
"license": "SEE LICENSE IN LICENSE.md",
"icon": "images/zazuko.png",
"preview": true,
"repository": {
"url": "https://github.com/zazuko/vscode-sparql-notebook.git"
},
"version": "0.0.36",
"engines": {
"vscode": "^1.77.0"
},
"categories": [
"Notebooks",
"Data Science"
],
"keywords": [
"sparql"
],
"activationEvents": [
"onNotebook:sparql-notebook"
],
"main": "./out/extension.js",
"contributes": {
"notebooks": [
{
"id": "sparql-notebook",
"type": "sparql-notebook",
"displayName": "SPARQL Notebook",
"selector": [
{
"filenamePattern": "*.sparqlbook"
}
]
}
],
"notebookRenderer": [
{
"id": "sparql-notebook-json-result",
"entrypoint": "./out/renderer.js",
"displayName": "SPARQL JSON Result",
"mimeTypes": [
"application/sparql-results+json"
]
}
],
"menus": {
"commandPalette": [
{
"command": "sparql-notebook.exportToMarkdown",
"when": "false"
},
{
"command": "sparql-notebook.createStoreFromFile",
"when": "false"
}
],
"view/item/context": [
{
"command": "sparql-notebook.connect",
"when": "view == sparql-notebook-connections && viewItem == database",
"group": "inline"
},
{
"command": "sparql-notebook.connect",
"when": "view == sparql-notebook-connections && viewItem == database"
},
{
"command": "sparql-notebook.deleteConnectionConfiguration",
"when": "view == sparql-notebook-connections && viewItem == database"
}
],
"view/title": [
{
"command": "sparql-notebook.addNewConnectionConfiguration",
"when": "view == sparql-notebook-connections",
"group": "navigation"
}
],
"explorer/context": [
{
"when": "resourceExtname == .sparqlbook",
"command": "sparql-notebook.exportToMarkdown",
"group": "sparql-notebook"
},
{
"when": "resourceExtname == .ttl || resourceExtname == .nt || resourceExtname == .rdf",
"command": "sparql-notebook.createStoreFromFile",
"group": "sparql-notebook"
}
],
"notebook/cell/title": [
{
"command": "sparql-notebook.addQueryFromFile",
"group": "cell/insert@1",
"when": "resourceExtname == .sparqlbook"
}
]
},
"commands": [
{
"command": "sparql-notebook.addQueryFromFile",
"title": "Add Query from File",
"icon": {
"dark": "assets/dark/add.svg",
"light": "assets/light/add.svg"
}
},
{
"command": "sparql-notebook.connect",
"title": "Connect to SPARQL Endpoint",
"icon": {
"dark": "assets/dark/endpoint-connected.svg",
"light": "assets/light/endpoint-connected.svg"
}
},
{
"command": "sparql-notebook.addNewConnectionConfiguration",
"title": "Create New Connection Configuration",
"icon": {
"light": "assets/light/plus.svg",
"dark": "assets/dark/plus.svg"
}
},
{
"command": "sparql-notebook.deleteConnectionConfiguration",
"title": "Delete Connection Configuration"
},
{
"title": "SPARQL Notebook: Export to Markdown",
"command": "sparql-notebook.exportToMarkdown"
},
{
"title": "SPARQL Notebook: Use File as Store",
"command": "sparql-notebook.createStoreFromFile"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "sparql-notebook",
"title": "Sparql Notebook",
"icon": "assets/logo.svg"
}
]
},
"views": {
"sparql-notebook": [
{
"id": "sparql-notebook-connections",
"name": "Sparql Connections",
"visibility": "visible",
"icon": "assets/logo.svg",
"contextualTitle": "Connections"
}
]
},
"configuration": [
{
"title": "SPARQL Notebook",
"properties": {
"sparqlbook.useNamespaces": {
"type": "boolean",
"default": true,
"description": "Format output using prefixes from query."
}
}
}
]
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "webpack --mode production",
"lint": "eslint src --ext ts",
"watch": "webpack --mode development --watch",
"pretest": "webpack --mode development && npm run lint",
"test": "node ./out/test/runTest.js",
"deploy": "npx vsce publish",
"package": "npx vsce package"
},
"devDependencies": {
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.1",
"@types/node": "16.x",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"@types/vscode": "^1.77.0",
"@types/vscode-notebook-renderer": "^1.72.3",
"@types/vscode-webview": "^1.57.2",
"@types/webpack-env": "^1.18.1",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"@vscode/test-electron": "^2.3.3",
"css-loader": "^6.8.1",
"eslint": "^8.43.0",
"fork-ts-checker-webpack-plugin": "^8.0.0",
"glob": "^10.3.0",
"mocha": "^10.2.0",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"style-loader": "^3.3.3",
"ts-loader": "^9.4.3",
"typescript": "^5.1.3",
"url": "^0.11.1",
"util": "^0.12.5",
"webpack": "^5.88.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"@vscode/webview-ui-toolkit": "^1.2.2",
"@zazuko/prefixes": "^2.2.0",
"axios": "^1.6.7",
"oxigraph": "^0.3.22",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"extensionDependencies": [
"stardog-union.stardog-rdf-grammars",
"stardog-union.vscode-langserver-sparql",
"RandomFractalsInc.vscode-data-table"
]
}
22 changes: 22 additions & 0 deletions vsx-utils/replace-deps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const fs = require('fs');
const path = require('path');

// Path to your package.json file
const packageJsonFilePath = path.join(__dirname, '..', 'package.json');
const extensionFilePath = path.join(__dirname, '..', ' extension-dependencies.open-vsx.json');

// Read the package.json file
const packageJsonFile = fs.readFileSync(packageJsonFilePath);
const packageJson = JSON.parse(packageJsonFile);

const extensionFile = fs.readFileSync(extensionFilePath);
const extensionJson = JSON.parse(extensionFile);

// Create a backup
fs.writeFileSync(path.join(__dirname, '..', 'package.json.bak'), packageJsonFile);

// Replace the extensionDependencies array
packageJson.extensionDependencies = extensionJson.extensionDependencies;

// Write the updated JSON back to the file
fs.writeFileSync(packageJsonFilePath, JSON.stringify(packageJson, null, 2));
11 changes: 11 additions & 0 deletions vsx-utils/restore-deps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const fs = require('fs');
const path = require('path');

// Path to your package.json file
const filePath = path.join(__dirname, '..', 'package.json');

// Path to your backup file
const backupPath = path.join(__dirname, '..', 'package.json.bak');

// Restore the original package.json
fs.copyFileSync(backupPath, filePath);

0 comments on commit 95bd3ab

Please sign in to comment.