diff --git a/extension-api/.npmignore b/extension-api/.npmignore
index 9fdaecc..d2dfd10 100644
--- a/extension-api/.npmignore
+++ b/extension-api/.npmignore
@@ -1,2 +1,4 @@
*
!dist/*
+!CHANGELOG.md
+!SECURITY.md
diff --git a/extension-api/CHANGELOG.md b/extension-api/CHANGELOG.md
new file mode 100644
index 0000000..b8abe41
--- /dev/null
+++ b/extension-api/CHANGELOG.md
@@ -0,0 +1,12 @@
+# Changelog for @oracle/sql-developer-api
+
+## 25.2.0 - July 2025
+- Features:
+ - Add support for attaching worksheets to a connection session.
+ - Add support for preparing SQL (i.e. extracting binds, substitutions, SQL id, ..etc).
+- Bug fixes:
+ - Fix exported enums are unusable.
+ - Ensure all types are exported.
+
+## 25.1.0 - July 2025
+Initial Release
\ No newline at end of file
diff --git a/extension-api/README.md b/extension-api/README.md
index 96af613..32cae01 100644
--- a/extension-api/README.md
+++ b/extension-api/README.md
@@ -1,4 +1,18 @@
-[TOC]
+# Table of Contents
+
+- [Introduction](#introduction)
+- [Getting Started](#getting-started)
+ - [Prerequisites](#prerequisites)
+ - [Install `Oracle SQL Developer Extension for VSCode`](#install--oracle-sql-developer-extension-for-vscode-)
+ - [Install Typescript:](#install-typescript-)
+ - [Install Type definitions for VSCode](#install-type-definitions-for-vscode)
+ - [Installation](#installation)
+- [Usage](#usage)
+ - [Connections](#connections)
+ - [Worksheets](#worksheets)
+- [Contributing](#contributing)
+- [Security](#security)
+- [License](#license)
# Introduction
@@ -14,16 +28,18 @@ Provides Typescript type definitions for the API exposed by [Oracle SQL Develope
If you haven't already, install `Oracle SQL Developer Extension for VSCode` using the following [link](https://marketplace.visualstudio.com/items?itemName=Oracle.sql-developer).
-**Note:** The extension supports VSCode >=1.97.0, so make sure your VSCode version is at least 1.97.
+**Note:** The extension supports VSCode >=1.101.0, so make sure your VSCode version is at least 1.101.0.
### Install Typescript:
NPM
+
```sh
npm install --save-dev typescript
```
YARN
+
```sh
yarn add --dev typescript
```
@@ -31,11 +47,13 @@ yarn add --dev typescript
### Install Type definitions for VSCode
NPM
+
```sh
npm install --save-dev @types/vscode
```
YARN
+
```sh
yarn add --dev @types/vscode
```
@@ -43,16 +61,19 @@ yarn add --dev @types/vscode
## Installation
NPM
+
```sh
npm install --save-dev @oracle/sql-developer-api
```
YARN
+
```sh
yarn add --dev @oracle/sql-developer-api
```
# Usage
+
The following code sample illustrates how to retrieve an API instance and use it:
```ts
@@ -65,15 +86,16 @@ if (!extension) {
const api = extension.exports;
```
-
## Connections
The API exposes a `Connections` interface, allowing access to connections and connection sessions. For instance, the following snippet allows retrieving the first connection in the connections list, connecting to it and executing a script against the session:
+
```ts
const connections = api.connections().list();
const session = await connections[0].connect();
const resultSet = await session.executeQuery({ sql: 'SELECT * FROM dual;' });
```
+
The following table lists all available connection and connection session methods:
@@ -109,7 +131,7 @@ The following table lists all available connection and connection session method
- Connection Session |
+ Connection Session |
executeQuery |
Executes a DQL query and returns a ResultSet object. |
@@ -117,17 +139,23 @@ The following table lists all available connection and connection session method
execute |
Executes the given SQL script and returns a result in the specified format. |
+
+ prepareSql |
+ Prepares the SQL to execute by analyzing the given sql script and extracts binds and substitutions. |
+
## Worksheets
The API also exposes a `Worksheets` interface, that provides access to SQL worksheets. The following snippets illustrates how this interface can be leveraged to retrieve the content of the active worksheet and executes it against the attached session:
+
```ts
const activeWorksheet = api.worksheets().activeWorksheet;
const content = activeWorksheet.editor.document.getText();
const resultSet = await activeWorksheet.session.executeQuery({ sql: content });
```
+
The following table lists all available worksheets methods:
@@ -172,19 +200,38 @@ The following table lists all available worksheets methods:
Registers a command that can be executed from within a worksheet e.g. from the toolbar. |
+
+ Worksheet |
+ editor |
+ The VSCode text editor that's backing the worksheet. |
+
+
+ session |
+ The session associated with the worksheet. |
+
+
+ attach |
+ Allows attaching the worksheet to a connection session. |
+
Consult [the code samples](https://github.com/oracle/sql-developer-vscode/tree/main/samples) for more examples and code snippets on how to use different parts of the API.
-
+# Changelog
+
+Refer to the [changelog](./CHANGELOG.md) for full release notes and version history.
+
+# Contributing
+
+Please review our [contribution guide](https://github.com/oracle/sql-developer-vscode/blob/main/CONTRIBUTING.md).
-## Contributing
+# Security
-Please review our [contribution guide](https://github.com/oracle/sql-developer-vscode/blob/main/CONTRIBUTING.md)
+Please consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process.
# License
Copyright (c) 2025 Oracle and/or its affiliates.
-Released under the Universal Permissive License v1.0 as shown at .
\ No newline at end of file
+Released under the Universal Permissive License v1.0 as shown at .
diff --git a/extension-api/SECURITY.md b/extension-api/SECURITY.md
new file mode 100644
index 0000000..2ca8102
--- /dev/null
+++ b/extension-api/SECURITY.md
@@ -0,0 +1,38 @@
+# Reporting security vulnerabilities
+
+Oracle values the independent security research community and believes that
+responsible disclosure of security vulnerabilities helps us ensure the security
+and privacy of all our users.
+
+Please do NOT raise a GitHub Issue to report a security vulnerability. If you
+believe you have found a security vulnerability, please submit a report to
+[secalert_us@oracle.com][1] preferably with a proof of concept. Please review
+some additional information on [how to report security vulnerabilities to Oracle][2].
+We encourage people who contact Oracle Security to use email encryption using
+[our encryption key][3].
+
+We ask that you do not use other channels or contact the project maintainers
+directly.
+
+Non-vulnerability related security issues including ideas for new or improved
+security features are welcome on GitHub Issues.
+
+## Security updates, alerts and bulletins
+
+Security updates will be released on a regular cadence. Many of our projects
+will typically release security fixes in conjunction with the
+Oracle Critical Patch Update program. Additional
+information, including past advisories, is available on our [security alerts][4]
+page.
+
+## Security-related information
+
+We will provide security related information such as a threat model, considerations
+for secure use, or any known security issues in our documentation. Please note
+that labs and sample code are intended to demonstrate a concept and may not be
+sufficiently hardened for production use.
+
+[1]: mailto:secalert_us@oracle.com
+[2]: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html
+[3]: https://www.oracle.com/security-alerts/encryptionkey.html
+[4]: https://www.oracle.com/security-alerts/
diff --git a/extension-api/dist/index.d.ts b/extension-api/dist/index.d.ts
index 3d58dae..3fe38af 100644
--- a/extension-api/dist/index.d.ts
+++ b/extension-api/dist/index.d.ts
@@ -41,7 +41,7 @@
import { Readable } from 'node:stream';
import { Disposable as Disposable$1, Event as Event$1, TextEditor } from 'vscode';
-declare enum BindDataType {
+export const enum BindDataType {
CHAR = "CHAR",
NCHAR = "NCHAR",
NVARCHAR2 = "NVARCHAR2",
@@ -72,44 +72,126 @@ declare enum BindDataType {
JSON = "JSON",
XML = "XML"
}
-declare enum BindMode {
+export const enum BindMode {
IN = "IN",
OUT = "OUT",
INOUT = "INOUT",
UNKNOWN = "UNKNOWN",
RETURNING = "RETURNING"
}
-type BindVariable = {
+export type BindVariable = {
name: string;
value: string;
dataType: BindDataType;
mode?: BindMode;
};
-interface ResultSet {
- query(): SqlQuery;
- rows(): {
- [key: string]: any;
- }[];
- metadata(): {
- [key: string]: any;
- }[];
- hasNext(): boolean;
- next(): Promise<{
- [key: string]: any;
- }[] | undefined>;
- close(): Promise;
+export type Position = {
+ /**
+ * Line position in a document (zero-based).
+ */
+ line: number;
+ /**
+ * Character offset on a line in a document (zero-based).
+ * If the character value is greater than the line length it defaults back to the line length.
+ *
+ */
+ character: number;
+};
+type Range$1 = {
+ start: Position;
+ end: Position;
+};
+export const enum SqlStatementType {
+ QUERY = "query",
+ OTHER = "other",
+ IGNORE = "ignore",
+ PLSQL = "plsql",
+ SQLPLUS = "sqlplus",
+ DML = "dml",
+ TRANSACTION_CONTROL = "transaction-control",
+ SESSION_CONTROL = "session-control",
+ SYSTEM_CONTROL = "system-control",
+ DDL = "ddl",
+ JDBC = "jdbc"
}
-type SqlQuery = {
- sql: string;
- binds?: BindVariable[];
+export const enum EchoMode {
+ NORMAL = "NORMAL",
+ HIDDEN = "HIDDEN"
+}
+export const enum SubstitutionKind {
+ PROMPT_ALWAYS = "PROMPT_ALWAYS",
+ PROMPT_FIRST = "PROMPT_FIRST",
+ ACCEPT = "ACCEPT",
+ DEFINED = "DEFINED"
+}
+export type Substitution = {
+ /**
+ * The substitution variable name
+ */
+ name: string;
+ /**
+ * The type of substitution prompt
+ */
+ kind: SubstitutionKind;
+ /**
+ * The textual range that the substitution replaces
+ */
+ range?: Range$1;
+ /**
+ * The data type the value MUST conform to
+ */
+ dataType?: string;
+ /**
+ * The format the value MUST conform to
+ */
+ format?: string;
+ /**
+ * The default value to show in the prompt
+ */
+ defaultValue?: string;
+ /**
+ * The end user facing prompt
+ */
+ prompt?: string;
+ /**
+ * Indicate if the entered value should be displayed
+ */
+ echoMode?: EchoMode;
+ /**
+ * The value assigned to the substitution. Only provided for `Kind.DEFINED`
+ */
+ value?: string;
};
-type Link = {
+export type SqlPrepareResponse = {
+ statementType?: SqlStatementType;
+ /**
+ * The text of the SQL statement
+ */
+ statementText?: string;
+ /**
+ * The SQL_ID for SQL queries. Present when `statementType == query`
+ */
+ statementSqlId?: string;
+ /**
+ * The range of the selected statement or null if not found or not requested
+ */
+ statementRange?: Range$1;
+ /**
+ * The set of substitution prompts that need to be completed by the user before the script can be executed
+ */
+ substitutions?: Array;
+ /**
+ * Bound parameters for SQL Statement
+ */
+ binds?: Array;
+};
+export type Link = {
/**
* The link target
*/
href: string;
};
-type Hyperlink = (Link & {
+export type Hyperlink = (Link & {
/**
* The link target
*/
@@ -127,7 +209,7 @@ type Hyperlink = (Link & {
*/
type?: string;
});
-type SqlResultSetMetadata = {
+export type SqlResultSetMetadata = {
/**
* The name of the result set column
*/
@@ -153,8 +235,8 @@ type SqlResultSetMetadata = {
*/
isNullable?: boolean;
};
-type SqlResultSetRow = Record;
-type SqlResultSet = {
+export type SqlResultSetRow = Record;
+export type SqlResultSet = {
metadata?: Array;
items?: Array;
/**
@@ -178,7 +260,7 @@ type SqlResultSet = {
*/
links?: Array;
};
-type SqlScriptError = {
+export type SqlScriptError = {
/**
* The a unique identifier for the error condition
*/
@@ -204,20 +286,7 @@ type SqlScriptError = {
*/
column?: number;
};
-declare enum SqlStatementType {
- QUERY = "query",
- OTHER = "other",
- IGNORE = "ignore",
- PLSQL = "plsql",
- SQLPLUS = "sqlplus",
- DML = "dml",
- TRANSACTION_CONTROL = "transaction-control",
- SESSION_CONTROL = "session-control",
- SYSTEM_CONTROL = "system-control",
- DDL = "ddl",
- JDBC = "jdbc"
-}
-type SqlStatementResponse = {
+export type SqlStatementResponse = {
/**
* The index of the statement in the script
*/
@@ -276,7 +345,7 @@ type SqlStatementResponse = {
*/
result?: number;
};
-type SqlScriptResponse = {
+export type SqlScriptResponse = {
env?: {
defaultTimeZone?: string;
};
@@ -356,6 +425,18 @@ export interface ConnectionSession {
execute(script: SqlScript, options?: ScriptExecutionJsonOptions): Promise;
execute(script: SqlScript, options?: ScriptExecutionTextOptions): Promise;
execute(script: SqlScript, options?: ScriptExecutionBinaryOptions): Promise;
+ /**
+ * Prepares the SQL to execute by analyzing the given sql script
+ * and extracts the range based on the cursor position, and any bound
+ * binds or substitutions
+ * @param sql The SQL text to analyze
+ * @param position Optional cursor position to determine which statement to prepare
+ * @returns A promise that resolves to a SqlPrepareResponse containing statement info and variables
+ */
+ prepareSql(sql: string, position?: {
+ line: number;
+ character: number;
+ }): Promise;
}
export type QueryExecutionOptions = {
/**
@@ -393,6 +474,24 @@ export type ConnectionStatusChangeEventData = {
};
export type ConnectionStatus = "added" | "removed" | "updated" | "opened" | "closed" | "renamed" | "reconnected" | "cloned";
export type SessionStatus = "connected" | "disconnected";
+export interface ResultSet {
+ query(): SqlQuery;
+ rows(): {
+ [key: string]: any;
+ }[];
+ metadata(): {
+ [key: string]: any;
+ }[];
+ hasNext(): boolean;
+ next(): Promise<{
+ [key: string]: any;
+ }[] | undefined>;
+ close(): Promise;
+}
+export type SqlQuery = {
+ sql: string;
+ binds?: BindVariable[];
+};
export type SqlScript = SqlQuery;
/**
* Interface for dealing with worksheets, provides convenient methods
@@ -457,6 +556,11 @@ export interface Worksheets {
export interface Worksheet {
editor: TextEditor;
session: ConnectionSession | undefined;
+ /**
+ * Attaches the worksheet to a connection session.
+ * @returns A promise that resolves when the worksheet is attached.
+ */
+ attach(): Promise;
}
export type WorksheetCommand = "runStatement" | "runScript" | "attach" | "detach" | "explainPlan";
export interface Api {
diff --git a/extension-api/dts-config.js b/extension-api/dts-config.js
deleted file mode 100644
index f46b492..0000000
--- a/extension-api/dts-config.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
- *
- * The Universal Permissive License (UPL), Version 1.0
- *
- * Subject to the condition set forth below, permission is hereby granted to any
- * person obtaining a copy of this software, associated documentation and/or
- * data (collectively the "Software"), free of charge and under any and all
- * copyright rights in the Software, and any and all patent rights owned or
- * freely licensable by each licensor hereunder covering either (i) the
- * unmodified Software as contributed to or provided by such licensor, or (ii)
- * the Larger Works (as defined below), to deal in both
- *
- * (a) the Software, and
- *
- * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
- * one is included with the Software each a "Larger Work" to which the Software
- * is contributed by such licensors),
- *
- * without restriction, including without limitation the rights to copy, create
- * derivative works of, display, perform, and distribute the Software and make,
- * use, sell, offer for sale, import, export, have made, and have sold the
- * Software and the Larger Work(s), and to sublicense the foregoing rights on
- * either these or other terms.
- *
- * This license is subject to the following condition:
- *
- * The above copyright notice and either this complete permission notice or at a
- * minimum a reference to the UPL must be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-// @ts-check
-
-/** @type import('dts-bundle-generator/config-schema').BundlerConfig */
-const config = {
- compilationOptions: {
- preferredConfigPath: './tsconfig.json'
- },
- entries: [
- {
- filePath: '../src/api/types/index.ts',
- outFile: './dist/index.d.ts',
- noCheck: true,
- output: {
- noBanner: true,
- exportReferencedTypes: false
- }
- }
- ]
-};
-
-module.exports = config;
diff --git a/extension-api/package.json b/extension-api/package.json
index 328bf21..1b9e82f 100644
--- a/extension-api/package.json
+++ b/extension-api/package.json
@@ -1,6 +1,6 @@
{
"name": "@oracle/sql-developer-api",
- "version": "25.1.0",
+ "version": "25.2.0",
"description": "Provides Typescript type definitions for the API exposed by Oracle SQL Developer Extension for VSCode",
"main": "",
"license": "UPL-1.0",
@@ -23,10 +23,11 @@
"update:version": "./scripts/update-version",
"licensify": "./scripts/licensify",
"bundle": "dts-bundle-generator --config dts-config.js",
- "build": "yarn bundle && yarn licensify && yarn update:version"
+ "build": "yarn bundle && yarn licensify && yarn update:version && ./scripts/patch-generated"
},
"devDependencies": {
"dts-bundle-generator": "^9.5.1",
+ "ts-morph": "^26.0.0",
"typescript": "^5.7.3"
}
}
\ No newline at end of file
diff --git a/extension-api/scripts/licensify b/extension-api/scripts/licensify
deleted file mode 100755
index c0500fe..0000000
--- a/extension-api/scripts/licensify
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/usr/bin/env node
-
-/*
- * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
- *
- * The Universal Permissive License (UPL), Version 1.0
- *
- * Subject to the condition set forth below, permission is hereby granted to any
- * person obtaining a copy of this software, associated documentation and/or
- * data (collectively the "Software"), free of charge and under any and all
- * copyright rights in the Software, and any and all patent rights owned or
- * freely licensable by each licensor hereunder covering either (i) the
- * unmodified Software as contributed to or provided by such licensor, or (ii)
- * the Larger Works (as defined below), to deal in both
- *
- * (a) the Software, and
- *
- * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
- * one is included with the Software each a "Larger Work" to which the Software
- * is contributed by such licensors),
- *
- * without restriction, including without limitation the rights to copy, create
- * derivative works of, display, perform, and distribute the Software and make,
- * use, sell, offer for sale, import, export, have made, and have sold the
- * Software and the Larger Work(s), and to sublicense the foregoing rights on
- * either these or other terms.
- *
- * This license is subject to the following condition:
- *
- * The above copyright notice and either this complete permission notice or at a
- * minimum a reference to the UPL must be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-const fs = require('node:fs');
-const path = require('node:path');
-
-const startYear = 2025;
-const currentYear = new Date().getFullYear();
-const year = currentYear !== startYear ? `${startYear}, ${currentYear}` : `${startYear}`;
-const HEADER = `/*
- * Copyright (c) ${year}, Oracle and/or its affiliates. All rights reserved.
- *
- * The Universal Permissive License (UPL), Version 1.0
- *
- * Subject to the condition set forth below, permission is hereby granted to any
- * person obtaining a copy of this software, associated documentation and/or
- * data (collectively the "Software"), free of charge and under any and all
- * copyright rights in the Software, and any and all patent rights owned or
- * freely licensable by each licensor hereunder covering either (i) the
- * unmodified Software as contributed to or provided by such licensor, or (ii)
- * the Larger Works (as defined below), to deal in both
- *
- * (a) the Software, and
- *
- * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
- * one is included with the Software each a "Larger Work" to which the Software
- * is contributed by such licensors),
- *
- * without restriction, including without limitation the rights to copy, create
- * derivative works of, display, perform, and distribute the Software and make,
- * use, sell, offer for sale, import, export, have made, and have sold the
- * Software and the Larger Work(s), and to sublicense the foregoing rights on
- * either these or other terms.
- *
- * This license is subject to the following condition:
- *
- * The above copyright notice and either this complete permission notice or at a
- * minimum a reference to the UPL must be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-`;
-
-function main() {
- let fileDescriptor;
- try {
- const dirname = __dirname;
- const targetFile = path.resolve(dirname, '..', 'dist', 'index.d.ts');
- const content = fs.readFileSync(targetFile);
- const header = Buffer.from(HEADER);
- const newContent = Buffer.concat([header, content]);
- fileDescriptor = fs.openSync(targetFile, 'w+');
- fs.writeSync(fileDescriptor, newContent, 0, newContent.length, 0);
- } catch (error) {
- console.error('An error occurred while adding the copyright header', { cause: error });
- } finally {
- fs.closeSync(fileDescriptor);
- }
-}
-
-main();
diff --git a/extension-api/scripts/update-version b/extension-api/scripts/update-version
deleted file mode 100755
index 6ec58cc..0000000
--- a/extension-api/scripts/update-version
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/env node
-
-/*
- * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
- *
- * The Universal Permissive License (UPL), Version 1.0
- *
- * Subject to the condition set forth below, permission is hereby granted to any
- * person obtaining a copy of this software, associated documentation and/or
- * data (collectively the "Software"), free of charge and under any and all
- * copyright rights in the Software, and any and all patent rights owned or
- * freely licensable by each licensor hereunder covering either (i) the
- * unmodified Software as contributed to or provided by such licensor, or (ii)
- * the Larger Works (as defined below), to deal in both
- *
- * (a) the Software, and
- *
- * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
- * one is included with the Software each a "Larger Work" to which the Software
- * is contributed by such licensors),
- *
- * without restriction, including without limitation the rights to copy, create
- * derivative works of, display, perform, and distribute the Software and make,
- * use, sell, offer for sale, import, export, have made, and have sold the
- * Software and the Larger Work(s), and to sublicense the foregoing rights on
- * either these or other terms.
- *
- * This license is subject to the following condition:
- *
- * The above copyright notice and either this complete permission notice or at a
- * minimum a reference to the UPL must be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-const fs = require('node:fs');
-const path = require('node:path');
-
-const sqlDevPackageJson = require('../../package.json');
-const apiPackageJson = require('../package.json');
-
-function main() {
- const updatedPackageJson = {};
- const version = sqlDevPackageJson['version'];
-
- for (const key of Object.keys(apiPackageJson)) {
- if (key === 'version') {
- updatedPackageJson[key] = version;
- } else {
- updatedPackageJson[key] = apiPackageJson[key];
- }
- }
-
- const dirname = __dirname;
- const rootDir = path.resolve(dirname, '..');
- const distPath = path.join(rootDir, 'package.json');
- const content = JSON.stringify(updatedPackageJson, null, 4);
-
- try {
- fs.writeFileSync(distPath, content);
- } catch (error) {
- console.error(err);
- }
-}
-
-main();
diff --git a/extension-api/tsconfig.json b/extension-api/tsconfig.json
deleted file mode 100644
index 458e39a..0000000
--- a/extension-api/tsconfig.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "compilerOptions": {
- "module": "commonjs",
- "target": "es2022",
- "outDir": "dist",
- "lib": ["es2022"],
- "skipLibCheck": true,
- "sourceMap": true,
- "declaration": true,
- "emitDeclarationOnly": true,
- "strict": true,
- "esModuleInterop": true,
- "forceConsistentCasingInFileNames": true,
- },
- "include": [
- "../src/api/types/index.ts"
- ],
- "exclude": [
- "node_modules"
- ]
-}
\ No newline at end of file
diff --git a/extension-api/yarn.lock b/extension-api/yarn.lock
deleted file mode 100644
index 118aca7..0000000
--- a/extension-api/yarn.lock
+++ /dev/null
@@ -1,122 +0,0 @@
-# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-# yarn lockfile v1
-
-
-ansi-regex@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
- integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
-
-ansi-styles@^4.0.0:
- version "4.3.0"
- resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
- integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
- dependencies:
- color-convert "^2.0.1"
-
-cliui@^8.0.1:
- version "8.0.1"
- resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa"
- integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==
- dependencies:
- string-width "^4.2.0"
- strip-ansi "^6.0.1"
- wrap-ansi "^7.0.0"
-
-color-convert@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
- integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
- dependencies:
- color-name "~1.1.4"
-
-color-name@~1.1.4:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
- integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
-
-dts-bundle-generator@^9.5.1:
- version "9.5.1"
- resolved "https://registry.yarnpkg.com/dts-bundle-generator/-/dts-bundle-generator-9.5.1.tgz#7eac7f47a2d5b51bdaf581843e7f969b88bfc225"
- integrity sha512-DxpJOb2FNnEyOzMkG11sxO2dmxPjthoVWxfKqWYJ/bI/rT1rvTMktF5EKjAYrRZu6Z6t3NhOUZ0sZ5ZXevOfbA==
- dependencies:
- typescript ">=5.0.2"
- yargs "^17.6.0"
-
-emoji-regex@^8.0.0:
- version "8.0.0"
- resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
- integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
-
-escalade@^3.1.1:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5"
- integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==
-
-get-caller-file@^2.0.5:
- version "2.0.5"
- resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
- integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
-
-is-fullwidth-code-point@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
- integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
-
-require-directory@^2.1.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
- integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==
-
-string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
- version "4.2.3"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
- integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
- dependencies:
- emoji-regex "^8.0.0"
- is-fullwidth-code-point "^3.0.0"
- strip-ansi "^6.0.1"
-
-strip-ansi@^6.0.0, strip-ansi@^6.0.1:
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
- integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
- dependencies:
- ansi-regex "^5.0.1"
-
-typescript@>=5.0.2, typescript@^5.7.3:
- version "5.8.3"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.3.tgz#92f8a3e5e3cf497356f4178c34cd65a7f5e8440e"
- integrity sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==
-
-wrap-ansi@^7.0.0:
- version "7.0.0"
- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
- integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
- dependencies:
- ansi-styles "^4.0.0"
- string-width "^4.1.0"
- strip-ansi "^6.0.0"
-
-y18n@^5.0.5:
- version "5.0.8"
- resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
- integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
-
-yargs-parser@^21.1.1:
- version "21.1.1"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
- integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
-
-yargs@^17.6.0:
- version "17.7.2"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
- integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
- dependencies:
- cliui "^8.0.1"
- escalade "^3.1.1"
- get-caller-file "^2.0.5"
- require-directory "^2.1.1"
- string-width "^4.2.3"
- y18n "^5.0.5"
- yargs-parser "^21.1.1"