diff --git a/src/connector-cli/debugger/src/App.tsx b/src/connector-cli/debugger/src/App.tsx index be16091..9bfe844 100644 --- a/src/connector-cli/debugger/src/App.tsx +++ b/src/connector-cli/debugger/src/App.tsx @@ -1,12 +1,13 @@ -import { useState } from 'react'; +import { useEffect, useState } from 'react'; import './App.css'; -import { DataModel } from './Helpers/DataModel'; -import { Header, initRuntime } from './Helpers/ConnectorRuntime'; -// import react -import { useEffect } from 'react'; -import { Models } from './Helpers/Models'; import { MainContent } from './Components/MainContent'; import { Sidebar } from './Components/Sidebar'; +import { Header, initRuntime } from './Helpers/ConnectorRuntime'; +import { DataModel } from './Helpers/DataModel'; +import { Models } from './Helpers/Models'; + +const httpHeadersStorageKey = 'connector-cli-http-headers'; +const runtimeSettingsStorageKey = 'connector-cli-runtime-settings'; function App() { const [dataModel, setDataModel] = useState(undefined); @@ -17,7 +18,7 @@ function App() { const [globalHeaders, setGlobalHeaders] = useState([]); const [authorization, setAuthorization] = useState
({} as any); - const [runtimeOptions, setRuntimeOptinos] = useState>( + const [runtimeOptions, setRuntimeOptions] = useState>( {} ); @@ -32,11 +33,74 @@ function App() { .catch((err) => { setError('Could not fetch connector'); setLoading(false); - console.log('error', err); + console.error('error', err); }); }, [globalHeaders, runtimeOptions, authorization]); + useEffect(() => { + Models.updateConfiguration = ( + name: 'headers' | 'options', + value: unknown + ) => { + switch (name) { + case 'headers': + const val: { authorization: Header; other: Header[] } = value as { + authorization: Header; + other: Header[]; + }; + setAuthorization(val.authorization); + setGlobalHeaders(val.other); + + sessionStorage.setItem(httpHeadersStorageKey, JSON.stringify(val)); + break; + case 'options': { + setRuntimeOptions(value as Record); + sessionStorage.setItem( + runtimeSettingsStorageKey, + JSON.stringify(value) + ); + } + } + }; + + // Read saved configuration from session storage + if (!!sessionStorage.getItem(runtimeSettingsStorageKey)) { + Models.updateConfiguration( + 'options', + JSON.parse(sessionStorage.getItem(runtimeSettingsStorageKey)!) + ); + } + if (!!sessionStorage.getItem(httpHeadersStorageKey)) { + Models.updateConfiguration( + 'headers', + JSON.parse(sessionStorage.getItem(httpHeadersStorageKey)!) + ); + } + }, []); + function onModelChanged(model: DataModel): void { + // TODO: Implement better way of propagation stored values to the component params + if ( + model.name === 'Runtime options' && + Object.keys(runtimeOptions).length !== 0 + ) { + model.parameters[0].value = runtimeOptions; + } + if ( + model.name === 'headers' && + (authorization.name || authorization.value) + ) { + model.parameters[0].value = { [authorization.name]: authorization.value }; + } + if (model.name === 'headers' && Object.keys(globalHeaders).length !== 0) { + model.parameters[1].value = globalHeaders.reduce( + (val, gh) => { + val[gh.name] = gh.value; + return val; + }, + {} as Record + ); + } setDataModel(model); } @@ -48,24 +112,6 @@ function App() { return
Error: {error}
; } - Models.updateConfiguration = ( - name: 'headers' | 'options', - value: unknown - ) => { - switch (name) { - case 'headers': - setAuthorization( - (value as { authorization: Header; other: Header[] }).authorization - ); - setGlobalHeaders( - (value as { authorization: Header; other: Header[] }).other - ); - break; - case 'options': - setRuntimeOptinos(value as Record); - } - }; - Models.ConnectorMetadata = { name: connector.constructor.name, type: diff --git a/src/connector-cli/debugger/src/Components/GenericComponent.tsx b/src/connector-cli/debugger/src/Components/GenericComponent.tsx index 5074f04..16e8895 100644 --- a/src/connector-cli/debugger/src/Components/GenericComponent.tsx +++ b/src/connector-cli/debugger/src/Components/GenericComponent.tsx @@ -1,13 +1,13 @@ -import { useCallback, useState } from 'react'; -import { ParameterInput } from './ParameterInput'; +import { useCallback, useEffect, useState } from 'react'; import { DataModel, InvokableDataModel, Parameter, SettableDataModel, } from '../Helpers/DataModel'; -import JsonObjectRenderer from './JsonObjectRenderer'; import ArrayBufferImage from './ImageFromBuffer'; +import JsonObjectRenderer from './JsonObjectRenderer'; +import { ParameterInput } from './ParameterInput'; export const GenericComponent = ({ dataModel }: { dataModel: DataModel }) => { const [values, setValues] = useState>({}); @@ -28,6 +28,28 @@ export const GenericComponent = ({ dataModel }: { dataModel: DataModel }) => { [] ); + const denormalizeValues = useCallback(() => { + return dataModel.parameters.reduce( + (val, p) => { + if (p.componentType === 'complex') { + p.complex + .filter((cp) => cp.value !== undefined) + .forEach((cp) => { + val[`${p.name}.${cp.name}`] = cp.value; + }); + } else if (p.value) { + val[p.name] = p.value; + } + return val; + }, + {} as Record + ); + }, [dataModel.parameters]); + + useEffect(() => { + setValues(denormalizeValues()); + }, [denormalizeValues]); + const normalizeValues = () => { // in the values we will find something like {"orderType.id": "dsfadf","orderType.name": "dsfaasdf","orderId": "dasfadsf"} // we want to flatten this to {"orderType": {"id": "dsfadf","name": "dsfaasdf"},"orderId": "dasfadsf"} @@ -62,7 +84,6 @@ export const GenericComponent = ({ dataModel }: { dataModel: DataModel }) => { normalizedValues ); setResult(result); - console.log('result', result); } catch (error) { setResult({ message: `failed to invoke ${ diff --git a/src/connector-cli/debugger/src/Components/ParameterDictionaryInput.tsx b/src/connector-cli/debugger/src/Components/ParameterDictionaryInput.tsx index 404f6e6..e3b2bdb 100644 --- a/src/connector-cli/debugger/src/Components/ParameterDictionaryInput.tsx +++ b/src/connector-cli/debugger/src/Components/ParameterDictionaryInput.tsx @@ -36,7 +36,14 @@ export const ParameterDictionaryInput = ({ const handleRemove = (index: number) => { // remove the item from the list - setItems(items.filter((item, i) => i !== index)); + const newItems = items.filter((item, i) => i !== index); + setItems(newItems); + // convert newItems to an object + const newItemsObject: { [key: string]: any } = {}; + newItems.forEach((item) => { + newItemsObject[item.key] = item.value; + }); + onChange(parameter.name, parameter, newItemsObject); }; const handleKeyChange = ( diff --git a/src/connector-cli/debugger/src/Helpers/DataModel.tsx b/src/connector-cli/debugger/src/Helpers/DataModel.tsx index 6faf3f2..e8972e6 100644 --- a/src/connector-cli/debugger/src/Helpers/DataModel.tsx +++ b/src/connector-cli/debugger/src/Helpers/DataModel.tsx @@ -21,20 +21,20 @@ export type ConnectorMetadata = { }; export type SimpleParameter = { - value?: any | undefined; + value?: any; name: string; componentType: 'text' | 'boolean' | 'list'; }; export type SelectParameter = { - value?: any | undefined; + value?: any; name: string; componentType: 'select'; - options: string[] | undefined; + options?: string[]; }; export type NumberParameter = { - value?: number | undefined; + value?: number; name: string; componentType: 'number'; min?: number; @@ -42,7 +42,7 @@ export type NumberParameter = { }; export type DictionaryParameter = { - value?: any | undefined; + value?: any; name: string; componentType: 'dictionary'; rectrictModification?: boolean; @@ -56,10 +56,8 @@ export type Parameter = | NumberParameter; export type ComplexParameter = { - value?: any | undefined; + value?: any; name: string; - componentType: 'text' | 'boolean' | 'complex'; - complex: - | Array - | undefined; + componentType: 'complex'; + complex: Array; }; diff --git a/src/connector-cli/debugger/src/Helpers/Models.tsx b/src/connector-cli/debugger/src/Helpers/Models.tsx index 9c170b2..3f02b60 100644 --- a/src/connector-cli/debugger/src/Helpers/Models.tsx +++ b/src/connector-cli/debugger/src/Helpers/Models.tsx @@ -31,8 +31,8 @@ export const Models: { set: (values: any[]) => { Models.updateConfiguration('headers', { authorization: { - name: Object.keys(values[0])[0], - value: Object.values(values[0])[0], + name: Object.keys(values[0] ?? [])[0], + value: Object.values(values[0] ?? [])[0], }, other: Object.entries(values[1] ?? []).map((h) => ({ name: h[0], diff --git a/src/connector-cli/package.json b/src/connector-cli/package.json index 22b6d06..a4c1b95 100644 --- a/src/connector-cli/package.json +++ b/src/connector-cli/package.json @@ -16,6 +16,7 @@ "commander": "^12.0.0", "dot-object": "^2.1.4", "express": "^4.19.2", + "reload": "^3.2.1", "js-yaml": "^4.1.0", "open": "^9.1.0", "prettier": "^3.0.3", diff --git a/src/connector-cli/readme.md b/src/connector-cli/readme.md index a86805b..e18d673 100644 --- a/src/connector-cli/readme.md +++ b/src/connector-cli/readme.md @@ -1,23 +1,29 @@ # @chili-publish/connector-cli -`@chili-publish/connector-cli` is a command-line interface tool designed to facilitate the management of connector test and publish processes in the CHILI publisher ecosystem. It provides a suite of commands to initialize projects, build connectors, debug, test, deploy and publish them to the marketplace. +`@chili-publish/connector-cli` is a command-line interface tool designed to facilitate the management of connector test and publish processes in the CHILI publisher ecosystem. It provides a suite of commands to initialize projects, build connectors, debug, test, deploy them to your environment. ## Features -### Main +### Project setup + +- **Init**: Scaffold a new connector project with `init`. +- **New**: Scaffold a new connector project with `new`. + +### Development -- **Initialize**: Scaffold a new connector with `init`. -- **Publish**: Deploy your connector to the specified environment with `publish`. -- **Set Auth**: Configure your connector authentication with `set-auth`. - **Build**: Build your connector from TypeScript to JavaScript with `build`. - **Debug**: Run a local debug server for your connector with `debug`. - **Test**: Run a test suite against your connector with `test`. - **Stress Test**: Perform stress tests on your compiled connector with `stress`. +### Deployment + +- **Publish**: Deploy your connector to the specified environment with `publish`. +- **Set Auth**: Configure your connector authentication with `set-auth`. + ### Informational -- **Info**: Retrieve runtime information about your connector with `info`. -- **List options**: Retrieve information about particular connector config with `list-options`. +- **Info**: Retrieve information about your connector with `info`. ## Installation @@ -43,6 +49,12 @@ After installation, the `connector-cli` command will be available globally. Belo connector-cli init --name YourConnectorName ``` +or + +```sh +connector-cli new --name YourConnectorName +``` + ### Build a connector ```sh @@ -58,13 +70,13 @@ connector-cli login ### Deploy a connector to environment ```sh -connector-cli publish pathToTsFile --baseUrl EnvironmentAPIBaseURL --environment YOUR_ENVIRONMENT --name YourConnectorName +connector-cli publish pathToProject --baseUrl EnvironmentAPIBaseURL --environment YOUR_ENVIRONMENT --name YourConnectorName ``` ### Configure a connector authentication ```sh -connector-cli set-auth pathToConnectorDir --baseUrl EnvironmentAPIBaseURL --environment YOUR_ENVIRONMENT --connectorId ConnectorIdFromEnv --usage browser --type staticKey --auth-data-file ./pathToAuthData +connector-cli set-auth pathToProject --baseUrl EnvironmentAPIBaseURL --environment YOUR_ENVIRONMENT --connectorId ConnectorIdFromEnv --usage browser --type staticKey --auth-data-file ./pathToAuthData ``` ### Debug a connector diff --git a/src/connector-cli/src/commands/build.ts b/src/connector-cli/src/commands/build.ts index 7da24de..e98a8c5 100644 --- a/src/connector-cli/src/commands/build.ts +++ b/src/connector-cli/src/commands/build.ts @@ -1,38 +1,32 @@ import * as fs from 'fs'; -import { compile } from '../compiler/connectorCompiler'; import path from 'path'; +import { compile } from '../compiler/connectorCompiler'; +import { info, startCommand, success, verbose } from '../core'; +import { ExecutionError } from '../core/types'; import { - startCommand, - validateInputConnectorFile, - verbose, - errorNoColor, - success, - info, -} from '../core'; + getConnectorProjectFileInfo, + outputDirectory, + outputFilename, +} from '../utils/connector-project'; interface BuildCommandOptions { watch?: boolean; - outFolder?: string; } export async function runBuild( - connectorFile: string, + projectPath: string, options: BuildCommandOptions ): Promise { - startCommand('build', { connectorFile, options }); - - if (!validateInputConnectorFile(connectorFile)) { - return; - } + startCommand('build', { projectPath, options }); // store all options as vars - const { outFolder, watch } = options; + const { watch } = options; - // get connectorfile directory using path utils or fs - const connectorFolder = path.dirname(connectorFile); + const { projectDir, connectorFile } = + getConnectorProjectFileInfo(projectPath); // if no outfolder, user the directory of the connector file and create subfolder 'out' - const out = path.resolve(outFolder || `${connectorFolder}/out`); + const out = path.resolve(path.join(projectDir, outputDirectory)); // if outfolder does not exist, create it if (!fs.existsSync(out)) { @@ -43,13 +37,12 @@ export async function runBuild( const compilation = await compile(connectorFile); if (compilation.errors.length > 0) { - errorNoColor(compilation.formattedDiagnostics); - return; + throw new ExecutionError(compilation.formattedDiagnostics); } - // write to out/connector.js - fs.writeFileSync(path.join(out, 'connector.js'), compilation.script); - verbose(`Written to ${out}/connector.js`); + // write to output file + fs.writeFileSync(path.join(out, outputFilename), compilation.script); + verbose(`Written to ${path.join(out, outputFilename)}`); success('Build succeeded'); @@ -63,14 +56,14 @@ export async function runBuild( info('Rebuilding...'); const compilation = await compile(connectorFile); if (compilation.errors.length > 0) { - errorNoColor(compilation.formattedDiagnostics); - return; - } else { - success('Build succeeded -> ' + `${out}/connector.js`); + throw new ExecutionError(compilation.formattedDiagnostics); } - // write to out/connector.js - fs.writeFileSync(path.join(out, 'connector.js'), compilation.script); + verbose(`Recompiling to ${path.join(out, outputFilename)}`); + success('Rebuild succeeded'); + + // write to output file + fs.writeFileSync(path.join(out, outputFilename), compilation.script); info(''); info('Watching for changes... (press ctrl+c to exit)'); diff --git a/src/connector-cli/src/commands/debug.ts b/src/connector-cli/src/commands/debug.ts index 639b850..139cd31 100644 --- a/src/connector-cli/src/commands/debug.ts +++ b/src/connector-cli/src/commands/debug.ts @@ -1,18 +1,14 @@ import express from 'express'; -import path from 'path'; import fs from 'fs'; +import path from 'path'; +import reload from 'reload'; import { compileToTempFile, introspectTsFile, } from '../compiler/connectorCompiler'; -import { - startCommand, - validateInputConnectorFile, - info, - errorNoColor, - success, - verbose, -} from '../core'; +import { error, info, startCommand, verbose } from '../core'; +import { ExecutionError } from '../core/types'; +import { getConnectorProjectFileInfo } from '../utils/connector-project'; interface DebuggerCommandOptions { port: number; @@ -20,50 +16,70 @@ interface DebuggerCommandOptions { } export async function runDebugger( - connectorFile: string, + projectPath: string, options: DebuggerCommandOptions ): Promise { - startCommand('debug', { connectorFile, options }); - if (!validateInputConnectorFile(connectorFile)) { - return; - } + startCommand('debug', { projectPath, options }); + + const { connectorFile } = getConnectorProjectFileInfo(projectPath); const connectorType = await introspectTsFile(connectorFile); const compilation = await compileToTempFile(connectorFile); + if (compilation.errors.length > 0) { + if (options.watch) { + error(compilation.formattedDiagnostics); + } else { + throw new ExecutionError(compilation.formattedDiagnostics); + } + } + + const app = express(); + const reloadTrigger = await reload(app); + const port = options.port; + const indexTemplate = debuggerHandleBarTemplate; if (options.watch) { info( 'Watching for changes on ' + connectorFile + '... (press ctrl+c to exit)' ); - fs.watchFile(path.resolve(connectorFile), async function () { - info('Rebuilding...'); + const watcher = fs.watch(connectorFile, async function (event, filename) { + verbose(`Triggers watch callback for ${event}, ${filename}`); + info('Recompiling...'); const watchCompilation = await compileToTempFile( connectorFile, compilation.tempFile ); + if (watchCompilation.errors.length > 0) { - errorNoColor(watchCompilation.formattedDiagnostics); - return; + error(watchCompilation.formattedDiagnostics); } else { - success('Build succeeded -> ' + compilation.tempFile); + verbose('Compiled -> ' + watchCompilation.tempFile); + info('Reloading browser tab...'); + reloadTrigger.reload(); } - - info(''); info('Watching for changes... (press ctrl+c to exit)'); }); - } - const app = express(); - const port = options.port; - const indexTemplate = debuggerHandleBarTemplate; + process.on('SIGINT', async () => { + verbose('Destroy debug for "SIGINT"'); + verbose('Stop watching the connector file: ' + connectorFile); + watcher.close(); + }); + + process.on('exit', async () => { + verbose('Destroy debug for "exit"'); + verbose('Stop watching the connector file: ' + connectorFile); + watcher.close(); + }); + } // recursive (3 deep) find parent folder with subfolder 'out' function findOutFolder(folder: string, depth: number): string | undefined { if (depth === 5) { return undefined; } - info('Looking for out folder in ' + folder); + verbose('Looking for CLI out folder in ' + folder); const outFolder = path.join(folder, 'out'); if (fs.existsSync(outFolder)) { return outFolder; @@ -74,11 +90,10 @@ export async function runDebugger( const outFolder = findOutFolder(__dirname, 0); if (!outFolder) { - errorNoColor('Could not find out folder'); - return; + throw new ExecutionError('Output folder for CLI tool can not be detected'); } - info('Detected out folder: ' + outFolder); + verbose('Detected out folder: ' + outFolder); // make sure connectorFile is absolute path const tempConnectorBuild = path.resolve(compilation.tempFile); @@ -125,12 +140,27 @@ export async function runDebugger( }); const server = app.listen(port, async () => { - info( - `Debugger running on port ${port}. Visit http://localhost:${port}?type=${connectorType} for testing` - ); - (await import('open')).default( - `http://localhost:${port}?type=${connectorType}` - ); + const debugURL = `http://localhost:${port}?type=${connectorType}`; + info(`Debugger running on port ${port}. Visit "${debugURL}" for testing`); + (await import('open')).default(debugURL); + }); + + process.on('SIGINT', async () => { + verbose('Destroy debug for "SIGINT"'); + verbose('Stoping express server...'); + server.closeAllConnections(); + server.close(); + verbose('Closing websocket connection'); + await reloadTrigger.closeServer(); + }); + + process.on('exit', async () => { + verbose('Destroy debug for "exit"'); + verbose('Stoping express server...'); + server.closeAllConnections(); + server.close(); + verbose('Closing websocket connection'); + await reloadTrigger.closeServer(); }); } @@ -144,6 +174,7 @@ const debuggerHandleBarTemplate = `
+ diff --git a/src/connector-cli/src/commands/delete/index.ts b/src/connector-cli/src/commands/delete/index.ts new file mode 100644 index 0000000..795eaaa --- /dev/null +++ b/src/connector-cli/src/commands/delete/index.ts @@ -0,0 +1,22 @@ +import { buildRequestUrl } from '../../common/build-request-url'; +import { info, readAccessToken, startCommand } from '../../core'; +import { removeConnector } from './steps/remove-connector'; +interface DeleteCommandOptions { + tenant: 'dev' | 'prod'; + baseUrl: string; + environment: string; + connectorId: string; +} + +export async function runDelete(options: DeleteCommandOptions): Promise { + startCommand('delete', { options }); + + const accessToken = await readAccessToken(options.tenant); + + const { baseUrl, environment, connectorId } = options; + + info('Build full request URL...'); + const requestUrl = buildRequestUrl(baseUrl, environment); + + await removeConnector(requestUrl, connectorId, accessToken); +} diff --git a/src/connector-cli/src/commands/delete/steps/remove-connector.ts b/src/connector-cli/src/commands/delete/steps/remove-connector.ts new file mode 100644 index 0000000..e274a27 --- /dev/null +++ b/src/connector-cli/src/commands/delete/steps/remove-connector.ts @@ -0,0 +1,33 @@ +import { selectAvailableConnector } from '../../../common/select-available-connector'; +import { httpErrorHandler, info, success, verbose, warn } from '../../../core'; + +export async function removeConnector( + connectorEndpointBaseUrl: string, + connectorId: string, + token: string +): Promise { + info('Removing connector...'); + const deleteConnectorEnpdoint = `${connectorEndpointBaseUrl}/${connectorId}`; + + verbose('Removing connector via -> ' + deleteConnectorEnpdoint); + + const res = await fetch(deleteConnectorEnpdoint, { + method: 'DELETE', + headers: { + 'Content-Type': 'application/json', + Authorization: token, + }, + }); + + if (!res.ok && res.status === 404) { + warn( + `Connector with id ${connectorId} doesn't exist or you don't have permission to remove it` + ); + const id = await selectAvailableConnector(connectorEndpointBaseUrl, token); + return removeConnector(connectorEndpointBaseUrl, id, token); + } else if (!res.ok) { + await httpErrorHandler(res); + } + + success(`Connector "${connectorId}" is removed`); +} diff --git a/src/connector-cli/src/commands/info.ts b/src/connector-cli/src/commands/info.ts index 2b3d757..6a19539 100644 --- a/src/connector-cli/src/commands/info.ts +++ b/src/connector-cli/src/commands/info.ts @@ -1,44 +1,136 @@ -import { compileToTempFile } from '../compiler/connectorCompiler'; import fs from 'fs'; import path from 'path'; -import { getInfoInternal } from '../utils/execution-util'; -import { - startCommand, - validateInputConnectorFile, - errorNoColor, - success, - info, -} from '../core'; +import { info, readConnectorConfig, startCommand, warn } from '../core'; +import { readConnectorCodeConfig } from '../core/connector-code-config'; +import { getConnectorProjectFileInfo } from '../utils/connector-project'; +import { getInstalledPackageVersion } from '../utils/version-reader'; interface GetInfoCommandOptions { out?: string; } export async function runGetInfo( - connectorFile: string, + projectPath: string, options: GetInfoCommandOptions ): Promise { - startCommand('info', { connectorFile, options }); - if (!validateInputConnectorFile(connectorFile)) { + startCommand('info', { projectPath, options }); + + const { packageJson, connectorFile, projectDir } = + getConnectorProjectFileInfo(projectPath); + + const connectorCodeConfig = await readConnectorCodeConfig(connectorFile); + + const connectorConfig = readConnectorConfig(packageJson); + + const apiVersion = getInstalledPackageVersion( + '@chili-publish/studio-connectors', + projectDir + ); + + if (options.out) { + const properties = { + apiVersion: apiVersion, + ...connectorCodeConfig, + type: connectorConfig.type, + logoUrl: connectorConfig.iconUrl, + supportedAuth: connectorConfig.supportedAuth, + runtimeOptions: connectorConfig.options, + }; + fs.writeFileSync( + path.resolve(options.out), + JSON.stringify(properties, null, 2) + ); + info(`Written to ${options.out} file`); return; } - const compilation = await compileToTempFile(connectorFile); + info(''); + // API version + info(`Framework version: ${apiVersion}`); - if (compilation.errors.length > 0) { - errorNoColor(compilation.formattedDiagnostics); - return; + // Connector type + info(`Type: "${connectorConfig.type}"`); + + if (connectorConfig.iconUrl) { + // Connector logo + info(`Logo: "${connectorConfig.iconUrl}"`); } else { - success('Build succeeded -> ' + compilation.tempFile); + info('Logo: There is no connector logo URL specified for this connector'); } - const properties = - '\n' + JSON.stringify(await getInfoInternal(compilation), null, 2) + '\n'; + if (connectorConfig.type === 'media') { + // Connector capability + const formattedCapabilities = Object.entries( + connectorCodeConfig.capabilities + ) + .filter(([_, value]) => !!value) + .map(([key, value]) => { + return { + capability: key, + }; + }); - if (options.out) { - fs.writeFileSync(path.resolve(options.out), properties); - info(`Written to ${options.out}`); + if (formattedCapabilities.length === 0) { + warn('Capabilities: Connector does not have any enabled capabilities.'); + } else { + info('Capabilities...'); + console.table(formattedCapabilities, ['capability']); + } + + // Connector settings + const formattedConfigurationOptions = + connectorCodeConfig.configurationOptions; + + if (formattedConfigurationOptions.length === 0) { + info('Settings: Connector does not have any settings defined'); + } else { + info('Settings...'); + console.table(formattedConfigurationOptions, [ + 'type', + 'name', + 'displayName', + ]); + } + } + + // Runtime options + if (Object.values(connectorConfig.options).length === 0) { + info( + 'Runtime options: Connector does not have any runtime options defined' + ); } else { - process.stdout.write(properties); + const formattedOptinos = Object.entries(connectorConfig.options).map( + ([key, value]) => { + const required = value === null || value === undefined; + return { + name: key, + required, + default: required ? 'N/A' : value, + }; + } + ); + + info('Runtime options...'); + console.table(formattedOptinos, ['name', 'required', 'default']); + } + + // Supported authentication + + if ( + !connectorConfig.supportedAuth || + Object.values(connectorConfig.supportedAuth).length === 0 + ) { + info( + 'Authentication: There is no any supported authentication defined for this connector' + ); + } else { + const formattedOptinos = connectorConfig.supportedAuth.map((auth) => { + return { + type: auth, + }; + }); + + info('Supported authentication...'); + console.table(formattedOptinos, ['type']); } } diff --git a/src/connector-cli/src/commands/init.ts b/src/connector-cli/src/commands/init.ts deleted file mode 100644 index 2d16681..0000000 --- a/src/connector-cli/src/commands/init.ts +++ /dev/null @@ -1,162 +0,0 @@ -import fs from 'fs'; -import path from 'path'; -import { startCommand, info, error } from '../core'; - -interface InitCommandOptions { - name: string; - type: 'media' | 'fonts'; -} - -export async function runInit( - directory: string, - options: InitCommandOptions -): Promise { - startCommand('init', { directory, options }); - const resultDirectory = path.resolve(directory); - - info(`Generating "${options.name}" ${options.type} connector template...`); - - if (!fs.existsSync(resultDirectory)) { - info('Creating directory ' + resultDirectory); - fs.mkdirSync(resultDirectory, { recursive: true }); - } - // intialize a new node project in current folder - // 1. check if no existing projects in current folder - if (fs.existsSync(path.join(resultDirectory, './package.json'))) { - error('package.json already exists in current folder: ' + resultDirectory); - return; - } - - // 2. create package.json - const packageJson = { - name: options.name, - description: '', - version: '1.0.0', - author: { - name: 'CHILI publish', - email: 'info@chili-publish.com', - url: 'https://github.com/chili-publish', - }, - config: { - type: options.type, - options: {}, - mappings: {}, - }, - license: 'MIT', - main: 'out/connector.js', - dependencies: { - typescript: '^5.2.2', - '@chili-publish/studio-connectors': '^1', - }, - scripts: { - build: 'yarn connector-cli build', - test: 'yarn connector-cli test -t tests.json && yarn connector-cli stress', - }, - devDependencies: { - '@chili-publish/connector-cli': '^1', - }, - }; - - info('Creating package.json'); - fs.writeFileSync( - path.join(resultDirectory, './package.json'), - JSON.stringify(packageJson, null, 2) - ); - - // 3. create tsconfig.json - const tsConfig = { - compilerOptions: { - lib: ['ES2020'], - noEmitHelpers: true, - module: 'ES2020', - outDir: 'out', - target: 'ES2020', - moduleResolution: 'Node', - preserveConstEnums: false, - esModuleInterop: false, - removeComments: true, - declaration: false, - }, - include: ['connector.ts'], - exclude: ['node_modules', 'out'], - }; - - info('Creating tsconfig.json'); - fs.writeFileSync( - path.join(resultDirectory, './tsconfig.json'), - JSON.stringify(tsConfig, null, 2) - ); - - // 4. create connector.ts - const connectorTs = ` - import { Connector, Media } from '@chili-publish/studio-connectors'; - - export default class MyConnector implements Media.MediaConnector { - detail(id: string, context: Connector.Dictionary): Promise { - throw new Error('Method not implemented.'); - } - query(options: Connector.QueryOptions, context: Connector.Dictionary): Promise { - throw new Error('Method not implemented.'); - } - download(id: string, previewType: Media.DownloadType, intent: Media.DownloadIntent, context: Connector.Dictionary): Promise { - throw new Error('Method not implemented.'); - } - getConfigurationOptions(): Connector.ConnectorConfigValue[] | null { - return [] - } - getCapabilities(): Media.MediaConnectorCapabilities { - return { - query: false, - detail: false, - filtering: false - } - } - } - `; - - info('Creating ./connector.ts'); - fs.writeFileSync(path.join(resultDirectory, './connector.ts'), connectorTs); - - // 5. create tests.json - const testsJson = ` - { - "setup": { - "runtime_options": { - "BASE_URL": "https://localhost:3000" - } - }, - "tests": [ - { - "name": "test1", - "method": "download", - "arguments": { - "id": "id", - "url": "url", - "options": {} - }, - "asserts": { - "fetch": [ - { - "url": "url", - "method": "GET", - "count": 1 - } - ] - } - } - ] - } - `; - - info('Creating tests.json'); - fs.writeFileSync(path.join(resultDirectory, './tests.json'), testsJson); - - // 6. create .gitignore - const gitIgnore = ` - node_modules - out - `; - - info('Creating .gitignore'); - fs.writeFileSync(path.join(resultDirectory, './.gitignore'), gitIgnore); -} diff --git a/src/connector-cli/src/commands/init/index.ts b/src/connector-cli/src/commands/init/index.ts new file mode 100644 index 0000000..458797f --- /dev/null +++ b/src/connector-cli/src/commands/init/index.ts @@ -0,0 +1,100 @@ +import { execSync } from 'child_process'; +import { program } from 'commander'; +import fs from 'fs'; +import path from 'path'; +import { info, startCommand, verbose } from '../../core'; +import { Type as ConnectorType, ExecutionError } from '../../core/types'; +import { + getGitIgnoreFile, + getMediaConnectorFile, + getMediaConnectorTestFile, + getPackageJson, + getTsConfig, +} from './templates'; + +interface InitCommandOptions { + name: string; + type: ConnectorType; +} + +export async function runInit(options: InitCommandOptions): Promise { + const [commandName] = program.args as ['new' | 'init']; + startCommand(commandName, { options }); + + // validate project name + verbose(`Validating project name "${options.name}"`); + if (!/^(\w+-?)*\w+$/.test(options.name)) { + throw new ExecutionError( + 'Invalid project name. The name must consist of letters, numbers, underscores, and hyphens' + ); + } + + let relDirectory = './'; + if (commandName === 'new') { + relDirectory = path.join(relDirectory, options.name); + } + const projectDir = path.resolve(relDirectory); + + verbose( + `Create "${options.name}" project in ${projectDir} for ${options.type} type` + ); + + info(`Generating connector's project...`); + // 1. intialize a new project in "projectDir" directory + if (!fs.existsSync(projectDir)) { + verbose('Creating directory ' + projectDir); + fs.mkdirSync(projectDir); + } + + // Check if no existing projects in "resultDirectory" + if (fs.existsSync(path.join(projectDir, './package.json'))) { + throw new ExecutionError( + 'package.json already exists in a directory: ' + projectDir + ); + } + + // 2. create package.json + const packageJson = getPackageJson(options.name, options.type); + info('Creating package.json...'); + fs.writeFileSync( + path.join(projectDir, './package.json'), + JSON.stringify(packageJson, null, 2) + ); + + // 3. create tsconfig.json + info('Creating tsconfig.json'); + const tsConfig = getTsConfig(); + fs.writeFileSync( + path.join(projectDir, './tsconfig.json'), + JSON.stringify(tsConfig, null, 2) + ); + + // 4. create connector file + const { content, fileName } = getMediaConnectorFile(); + + info('Creating ' + fileName); + fs.writeFileSync(path.join(projectDir, fileName), content); + + // 5. create tests.json + const testsJson = getMediaConnectorTestFile(); + + info('Creating tests.json'); + fs.writeFileSync( + path.join(projectDir, './tests.json'), + JSON.stringify(testsJson, null, 2) + ); + + // 6. create .gitignore + const gitIgnore = getGitIgnoreFile(); + + info('Creating .gitignore'); + fs.writeFileSync(path.join(projectDir, './.gitignore'), gitIgnore); + + // 7. init git project + info( + execSync(`git init`, { + cwd: projectDir, + encoding: 'utf-8', + }) + ); +} diff --git a/src/connector-cli/src/commands/init/templates.ts b/src/connector-cli/src/commands/init/templates.ts new file mode 100644 index 0000000..6017eb7 --- /dev/null +++ b/src/connector-cli/src/commands/init/templates.ts @@ -0,0 +1,123 @@ +import { Type } from '../../core/types'; +import { + connectorFileName, + outputDirectory, + outputFilename, +} from '../../utils/connector-project'; + +export const getPackageJson = (projectName: string, type: Type) => ({ + name: projectName, + description: '', + version: '1.0.0', + author: { + name: 'CHILI publish', + email: 'info@chili-publish.com', + url: 'https://github.com/chili-publish', + }, + config: { + type: type, + options: {}, + mappings: {}, + }, + license: 'MIT', + main: `${outputDirectory}/${outputFilename}`, + dependencies: { + typescript: '^5.2.2', + '@chili-publish/studio-connectors': '^1', + }, + scripts: { + build: 'yarn connector-cli build', + test: 'yarn connector-cli test -t tests.json && yarn connector-cli stress', + }, + devDependencies: { + '@chili-publish/connector-cli': '^1', + }, +}); + +export const getTsConfig = () => ({ + compilerOptions: { + lib: ['ES2020'], + noEmitHelpers: true, + module: 'ES2020', + outDir: `${outputDirectory}`, + target: 'ES2020', + moduleResolution: 'Node', + preserveConstEnums: false, + esModuleInterop: false, + removeComments: true, + declaration: false, + }, + include: [connectorFileName], + exclude: ['node_modules', `${outputDirectory}`], +}); + +const mediaConnectorFileContent = `import { Connector, Media } from "@chili-publish/studio-connectors"; + +export default class MyConnector implements Media.MediaConnector { + query( + options: Connector.QueryOptions, + context: Connector.Dictionary + ): Promise { + throw new Error("Method not implemented."); + } + detail( + id: string, + context: Connector.Dictionary + ): Promise { + throw new Error("Method not implemented."); + } + download( + id: string, + previewType: Media.DownloadType, + intent: Media.DownloadIntent, + context: Connector.Dictionary + ): Promise { + throw new Error("Method not implemented."); + } + getConfigurationOptions(): Connector.ConnectorConfigValue[] | null { + return []; + } + getCapabilities(): Media.MediaConnectorCapabilities { + return { + query: false, + detail: false, + filtering: false, + metadata: false, + }; + } +}`; +export const getMediaConnectorFile = () => ({ + content: mediaConnectorFileContent, + fileName: connectorFileName, +}); + +export const getMediaConnectorTestFile = () => ({ + setup: { + runtime_options: { + BASE_URL: 'https://localhost:3000', + }, + }, + tests: [ + { + name: 'test1', + method: 'download', + arguments: { + id: 'id', + url: 'url', + options: {}, + }, + asserts: { + fetch: [ + { + url: 'url', + method: 'GET', + count: 1, + }, + ], + }, + }, + ], +}); + +export const getGitIgnoreFile = () => `node_modules +${outputDirectory}`; diff --git a/src/connector-cli/src/commands/list-options.ts b/src/connector-cli/src/commands/list-options.ts deleted file mode 100644 index 7bd320f..0000000 --- a/src/connector-cli/src/commands/list-options.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { - startCommand, - validateInputConnectorPath, - info, - readConnectorConfig, -} from '../core'; - -export enum ListCommandTypeOption { - RuntimeOptions = 'runtime-options', - SupportedAuth = 'supported-auth', -} - -interface ListCommandOptions { - type: ListCommandTypeOption; -} - -export async function runListOptions( - connectorPath: string, - options: ListCommandOptions -): Promise { - startCommand('list-options', { connectorPath, options }); - if (!validateInputConnectorPath(connectorPath)) { - return; - } - - // store all options as vars - const { type } = options; - - const connectorConfig = readConnectorConfig(connectorPath); - - switch (type) { - case 'runtime-options': { - if (Object.values(connectorConfig.options).length === 0) { - info('No runtime options specified for this connector'); - return; - } - - const formattedOptinos = Object.entries(connectorConfig.options).map( - ([key, value]) => { - const required = value === null || value === undefined; - return { - name: key, - required, - default: required ? 'N/A' : value, - }; - } - ); - - console.table(formattedOptinos, ['name', 'required', 'default']); - break; - } - case 'supported-auth': { - if ( - !connectorConfig.supportedAuth || - Object.values(connectorConfig.supportedAuth).length === 0 - ) { - info('No supported authentication specified for this connector'); - return; - } - - const formattedOptinos = connectorConfig.supportedAuth.map((auth) => { - return { - type: auth, - }; - }); - - console.table(formattedOptinos, ['type']); - break; - } - default: - throw new Error('Unsupported command type'); - } -} diff --git a/src/connector-cli/src/commands/publish/index.ts b/src/connector-cli/src/commands/publish/index.ts index 38bda55..09b22ce 100644 --- a/src/connector-cli/src/commands/publish/index.ts +++ b/src/connector-cli/src/commands/publish/index.ts @@ -1,20 +1,19 @@ import dot from 'dot-object'; +import { buildRequestUrl } from '../../common/build-request-url'; import { - startCommand, - validateInputConnectorFile, - validateRuntimeOptions, info, - success, readConnectorConfig, + startCommand, + validateRuntimeOptions, } from '../../core'; +import { readAccessToken } from '../../core/read-access-token'; +import { getConnectorProjectFileInfo } from '../../utils/connector-project'; import { compileConnector } from './steps/compile'; -import { getRequestUrl } from './steps/get-request-url'; import { createNewConnector } from './steps/create-connector'; -import { updateExistingConnector } from './steps/update-connector'; -import { ProxyOptions } from './types'; import { extractPackageInfo } from './steps/extract-package-info'; -import { readAccessToken } from '../../core/read-access-token'; +import { updateExistingConnector } from './steps/update-connector'; import { validateAllowedDomains } from './steps/validate-allowed-domains'; +import { ProxyOptions } from './types'; interface PublishCommandOptions { tenant: 'dev' | 'prod'; @@ -28,13 +27,10 @@ interface PublishCommandOptions { } export async function runPublish( - connectorFile: string, + projectPath: string, options: PublishCommandOptions ): Promise { - startCommand('publish', { connectorFile, options }); - if (!validateInputConnectorFile(connectorFile)) { - throw new Error('Invalid connector file path: ' + connectorFile); - } + startCommand('publish', { projectPath, options }); const accessToken = await readAccessToken(options.tenant); @@ -53,7 +49,10 @@ export async function runPublish( dot.object(rawProxyOptions) as any )?.['proxyOption'] ?? { allowedDomains: [] }; - const config = readConnectorConfig(connectorFile); + const { connectorFile, projectDir, packageJson } = + getConnectorProjectFileInfo(projectPath); + + const config = readConnectorConfig(packageJson); info('Validating allowed domains option...'); @@ -65,8 +64,10 @@ export async function runPublish( info('Extracting package information...'); - const { description, version, apiVersion } = - extractPackageInfo(connectorFile); + const { description, version, apiVersion } = extractPackageInfo( + projectDir, + packageJson + ); info('Compiling connector...'); @@ -76,7 +77,7 @@ export async function runPublish( // const connectorInfo = await getInfoInternal(compilation); info('Build full request URL...'); - const requestUrl = getRequestUrl(baseUrl, environment); + const requestUrl = buildRequestUrl(baseUrl, environment); const connectorPayload = { name, @@ -93,7 +94,7 @@ export async function runPublish( }, }; - const result = connectorId + connectorId ? await updateExistingConnector( requestUrl, connectorId, diff --git a/src/connector-cli/src/commands/publish/steps/compile.ts b/src/connector-cli/src/commands/publish/steps/compile.ts index c4e08e9..6c3f510 100644 --- a/src/connector-cli/src/commands/publish/steps/compile.ts +++ b/src/connector-cli/src/commands/publish/steps/compile.ts @@ -1,8 +1,8 @@ -import path from 'node:path'; import fs from 'node:fs'; -import { ExecutionError } from '../../../core/types'; -import { verbose } from '../../../core'; +import path from 'node:path'; import { compileToTempFile } from '../../../compiler/connectorCompiler'; +import { verbose } from '../../../core'; +import { ExecutionError } from '../../../core/types'; export async function compileConnector(connectorFile: string) { // Compile connector @@ -14,7 +14,7 @@ export async function compileConnector(connectorFile: string) { verbose('Compiled -> ' + compilation.tempFile); - // Read the connector.js file + // Read the output file and connector file return { connectorJs: fs.readFileSync(path.resolve(compilation.tempFile), 'utf8'), connectorTs: fs.readFileSync(path.resolve(connectorFile), 'utf8'), diff --git a/src/connector-cli/src/commands/publish/steps/extract-package-info.ts b/src/connector-cli/src/commands/publish/steps/extract-package-info.ts index 88fc548..8c98109 100644 --- a/src/connector-cli/src/commands/publish/steps/extract-package-info.ts +++ b/src/connector-cli/src/commands/publish/steps/extract-package-info.ts @@ -1,18 +1,18 @@ -import path from 'path'; import { getInstalledPackageVersion } from '../../../utils/version-reader'; -export function extractPackageInfo(connectorFile: string) { - const dir = path.dirname(path.resolve(connectorFile)); - +export function extractPackageInfo( + projectDir: string, + packageJsonPath: string +) { // Read the package.json and extract the necessary info - const packageJson = require(path.join(dir, 'package.json')); + const packageJson = require(packageJsonPath); const { description, version } = packageJson; // get connector sdk version const apiVersion = getInstalledPackageVersion( '@chili-publish/studio-connectors', - dir + projectDir ); return { diff --git a/src/connector-cli/src/commands/publish/steps/update-connector.ts b/src/connector-cli/src/commands/publish/steps/update-connector.ts index b91bde7..45ff770 100644 --- a/src/connector-cli/src/commands/publish/steps/update-connector.ts +++ b/src/connector-cli/src/commands/publish/steps/update-connector.ts @@ -1,5 +1,4 @@ -import * as readline from 'node:readline/promises'; -import { stdin as input, stdout as output } from 'node:process'; +import { selectAvailableConnector } from '../../../common/select-available-connector'; import { httpErrorHandler, info, success, verbose, warn } from '../../../core'; import { UpdateConnectorPayload } from '../types'; @@ -25,7 +24,7 @@ export async function updateExistingConnector( `Connector with id ${connectorId} doesn't exist or you don't have permission to update it` ); // When connector is not available we request the list and ask user to select connector for update - const id = await getConnectorForUpdate(connectorEndpointBaseUrl, token); + const id = await selectAvailableConnector(connectorEndpointBaseUrl, token); return updateExistingConnector( connectorEndpointBaseUrl, id, @@ -75,47 +74,3 @@ export async function updateExistingConnector( success(`Connector "${result.name}" is updated`, result); } - -async function getConnectorForUpdate( - connectorEndpointBaseUrl: string, - token: string -): Promise { - info(`Requesting the list of available connectors...`); - const res = await fetch(connectorEndpointBaseUrl, { - headers: { - Authorization: token, - }, - }); - - if (!res.ok) { - await httpErrorHandler(res); - } - - info( - `Received the list of available connectors. Please select the one you want to update:` - ); - const { data: connectors } = await res.json(); - console.table(connectors, ['id', 'name']); - - const rl = readline.createInterface({ input, output }); - - let connectorIndex; - - while (true) { - // Use the question method to get the user input - const index = Number( - await rl.question('Select the index of the connector to update ') - ); - // Use the validation function to check the input - if (isNaN(index) || !connectors[index]) { - warn(`Index should be a number between 0 and ${connectors.length - 1}`); - } else { - connectorIndex = index; - break; - } - } - - rl.close(); - - return connectors[connectorIndex].id; -} diff --git a/src/connector-cli/src/commands/set-auth/index.ts b/src/connector-cli/src/commands/set-auth/index.ts index 7d789a8..c98a886 100644 --- a/src/connector-cli/src/commands/set-auth/index.ts +++ b/src/connector-cli/src/commands/set-auth/index.ts @@ -1,23 +1,18 @@ +import { info, readConnectorConfig, startCommand, success } from '../../core'; +import { readAccessToken } from '../../core/read-access-token'; import { - startCommand, - validateInputConnectorPath, - success, - info, - readConnectorConfig, -} from '../../core'; + SupportedAuth as AuthenticationType, + ExecutionError, + Tenant, +} from '../../core/types'; +import { getConnectorProjectFileInfo } from '../../utils/connector-project'; import { extractAuthData, + getRequestUrl, setAuthentication, validateAuthType, - getRequestUrl, } from './steps'; -import { - Tenant, - ExecutionError, - SupportedAuth as AuthenticationType, -} from '../../core/types'; import { AuthenticationUsage } from './types'; -import { readAccessToken } from '../../core/read-access-token'; interface SetAuthenticationCommandOptions { tenant: Tenant; @@ -30,13 +25,12 @@ interface SetAuthenticationCommandOptions { } export async function runSetAuth( - connectorPath: string, + projectPath: string, options: SetAuthenticationCommandOptions ): Promise { - startCommand('set-auth', { connectorPath, options }); - if (!validateInputConnectorPath(connectorPath)) { - return; - } + startCommand('set-auth', { projectPath, options }); + + const { packageJson } = getConnectorProjectFileInfo(projectPath); const accessToken = await readAccessToken(options.tenant); @@ -44,7 +38,7 @@ export async function runSetAuth( const { baseUrl, environment, connectorId, usage, type, authDataFile } = options; - const connectorConfig = readConnectorConfig(connectorPath); + const connectorConfig = readConnectorConfig(packageJson); if (!connectorConfig.supportedAuth) { throw new ExecutionError( diff --git a/src/connector-cli/src/commands/stress.ts b/src/connector-cli/src/commands/stress.ts index a728a13..baff574 100644 --- a/src/connector-cli/src/commands/stress.ts +++ b/src/connector-cli/src/commands/stress.ts @@ -1,33 +1,25 @@ -import { initRuntime, evalAsync } from '../qjs/qjs'; import { compileToTempFile } from '../compiler/connectorCompiler'; -import { - startCommand, - validateInputConnectorFile, - errorNoColor, - success, - info, - warn, -} from '../core'; +import { info, startCommand, success, warn } from '../core'; +import { ExecutionError } from '../core/types'; +import { evalAsync, initRuntime } from '../qjs/qjs'; +import { getConnectorProjectFileInfo } from '../utils/connector-project'; export async function runStressTest( - connectorFile: string, + projectPath: string, options: any ): Promise { - startCommand('stress', { connectorFile, options }); + startCommand('stress', { projectPath, options }); - if (!validateInputConnectorFile(connectorFile)) { - return; - } + const { connectorFile } = getConnectorProjectFileInfo(projectPath); const compilation = await compileToTempFile(connectorFile); if (compilation.errors.length > 0) { - errorNoColor(compilation.formattedDiagnostics); - return; - } else { - success('Build succeeded -> ' + compilation.tempFile); + throw new ExecutionError(compilation.formattedDiagnostics); } + success('Build succeeded -> ' + compilation.tempFile); + const vm = await initRuntime(compilation.tempFile, {}); const iterations: number = options.iterations ? options.iterations : 1000; diff --git a/src/connector-cli/src/commands/test.ts b/src/connector-cli/src/commands/test.ts index 644ef48..524ddb7 100644 --- a/src/connector-cli/src/commands/test.ts +++ b/src/connector-cli/src/commands/test.ts @@ -1,46 +1,37 @@ +import { default as Chalk, default as chalk } from 'chalk'; +import fs from 'fs'; +import path from 'path'; import { compileToTempFile, introspectTsFile, } from '../compiler/connectorCompiler'; -import { initRuntime, runtimeConfig, evalAsync } from '../qjs/qjs'; +import { errorNoColor, info, startCommand, success } from '../core'; +import { ExecutionError } from '../core/types'; +import { evalAsync, initRuntime, runtimeConfig } from '../qjs/qjs'; import { assertResult } from '../tests/asserts'; import { TestModels } from '../tests/testConfiguration'; -import Chalk from 'chalk'; -import fs from 'fs'; -import path from 'path'; -import chalk from 'chalk'; -import { - validateInputConnectorFile, - error, - errorNoColor, - info, - startCommand, - success, -} from '../core'; +import { getConnectorProjectFileInfo } from '../utils/connector-project'; type DemoCommandOptions = unknown; export async function runDemo( - connectorFile: string, + projectPath: string, options: DemoCommandOptions ): Promise { - introspectTsFile(connectorFile); + startCommand('demo', { projectPath, options }); - startCommand('demo', { connectorFile, options }); + const { connectorFile } = getConnectorProjectFileInfo(projectPath); - if (!validateInputConnectorFile(connectorFile)) { - return; - } + introspectTsFile(connectorFile); const compilation = await compileToTempFile(connectorFile); if (compilation.errors.length > 0) { - errorNoColor(compilation.formattedDiagnostics); - return; - } else { - success('Build succeeded -> ' + compilation.tempFile); + throw new ExecutionError(compilation.formattedDiagnostics); } + success('Build succeeded -> ' + compilation.tempFile); + const vm = await initRuntime(compilation.tempFile, {}); let urlsUsed: string[] = []; @@ -132,31 +123,27 @@ interface TestsCommandOptions { } export async function runTests( - connectorFile: string, + projectPath: string, options: TestsCommandOptions ): Promise { - startCommand('test', { connectorFile, options }); + startCommand('test', { projectPath, options }); - if (!validateInputConnectorFile(connectorFile)) { - return; - } + const { connectorFile } = getConnectorProjectFileInfo(projectPath); const { testFile } = options; if (fs.existsSync(path.resolve(testFile)) === false) { - error('testFile is required'); - return; + throw new ExecutionError('Test file is required'); } const compilation = await compileToTempFile(connectorFile); if (compilation.errors.length > 0) { - errorNoColor(compilation.formattedDiagnostics); - return; - } else { - success('Build succeeded -> ' + compilation.tempFile); + throw new ExecutionError(compilation.formattedDiagnostics); } + success('Build succeeded -> ' + compilation.tempFile); + // parse the test file (its a json) const testConfig: TestModels.TestConfiguration = JSON.parse( fs.readFileSync(path.resolve(testFile), 'utf8') diff --git a/src/connector-cli/src/commands/publish/steps/get-request-url.ts b/src/connector-cli/src/common/build-request-url.ts similarity index 80% rename from src/connector-cli/src/commands/publish/steps/get-request-url.ts rename to src/connector-cli/src/common/build-request-url.ts index 90edace..00a0c8b 100644 --- a/src/connector-cli/src/commands/publish/steps/get-request-url.ts +++ b/src/connector-cli/src/common/build-request-url.ts @@ -1,4 +1,4 @@ -export function getRequestUrl(baseUrl: string, environment: string) { +export function buildRequestUrl(baseUrl: string, environment: string) { const connectorEndpointBaseUrl = new URL(baseUrl); if (!connectorEndpointBaseUrl.pathname.endsWith('/')) { connectorEndpointBaseUrl.pathname += '/'; diff --git a/src/connector-cli/src/common/select-available-connector.ts b/src/connector-cli/src/common/select-available-connector.ts new file mode 100644 index 0000000..4e3be48 --- /dev/null +++ b/src/connector-cli/src/common/select-available-connector.ts @@ -0,0 +1,47 @@ +import { stdin as input, stdout as output } from 'node:process'; +import * as readline from 'node:readline/promises'; +import { httpErrorHandler, info, warn } from '../core'; + +export async function selectAvailableConnector( + connectorEndpointBaseUrl: string, + token: string +): Promise { + info(`Requesting the list of available connectors...`); + const res = await fetch(connectorEndpointBaseUrl, { + headers: { + Authorization: token, + }, + }); + + if (!res.ok) { + await httpErrorHandler(res); + } + + info( + `Received the list of available connectors. Please select the one you want to make an action with:` + ); + const { data: connectors } = await res.json(); + console.table(connectors, ['id', 'name']); + + const rl = readline.createInterface({ input, output }); + + let connectorIndex; + + while (true) { + // Use the question method to get the user input + const index = Number( + await rl.question('Select the index of the connector to make an action') + ); + // Use the validation function to check the input + if (isNaN(index) || !connectors[index]) { + warn(`Index should be a number between 0 and ${connectors.length - 1}`); + } else { + connectorIndex = index; + break; + } + } + + rl.close(); + + return connectors[connectorIndex].id; +} diff --git a/src/connector-cli/src/core/connector-code-config.ts b/src/connector-cli/src/core/connector-code-config.ts new file mode 100644 index 0000000..dec152a --- /dev/null +++ b/src/connector-cli/src/core/connector-code-config.ts @@ -0,0 +1,30 @@ +import { Connector, Media } from '@chili-publish/studio-connectors'; +import { compileToTempFile } from '../compiler/connectorCompiler'; +import { evalSync, initRuntime } from '../qjs/qjs'; +import { ExecutionError } from './types'; + +export async function readConnectorCodeConfig(connectorFilePath: string) { + const compilation = await compileToTempFile(connectorFilePath); + + if (compilation.errors.length > 0) { + throw new ExecutionError(compilation.formattedDiagnostics); + } + + const vm = await initRuntime(compilation.tempFile, {}); + + const capabilities: Media.MediaConnectorCapabilities = evalSync( + vm, + 'loadedConnector.getCapabilities()' + ); + const configurationOptions: Connector.ConnectorConfigValue[] = evalSync( + vm, + 'loadedConnector.getConfigurationOptions();' + ); + + const properties = { + capabilities, + configurationOptions, + }; + + return properties; +} diff --git a/src/connector-cli/src/core/connector-config.ts b/src/connector-cli/src/core/connector-config.ts index 9cdb1d8..d4bf084 100644 --- a/src/connector-cli/src/core/connector-config.ts +++ b/src/connector-cli/src/core/connector-config.ts @@ -1,20 +1,7 @@ -import path from 'path'; -import fs from 'fs'; import { verbose } from './logger'; import { Convert, ExecutionError, SupportedAuth } from './types'; -export function readConnectorConfig(connectorDirectoryPathOrFile: string) { - let dir = connectorDirectoryPathOrFile; - if (connectorDirectoryPathOrFile.endsWith('.ts')) { - dir = path.dirname(path.resolve(connectorDirectoryPathOrFile)); - } - const packageJsonPath = path.join(path.resolve(dir), 'package.json'); - verbose(`Reading connector configuration from ${packageJsonPath}`); - if (!fs.existsSync(packageJsonPath)) { - throw new ExecutionError( - `Specified connector directory ${packageJsonPath} doesn't contain "package.json"` - ); - } +export function readConnectorConfig(packageJsonPath: string) { const packageJson = require(packageJsonPath); const { config } = packageJson; diff --git a/src/connector-cli/src/core/index.ts b/src/connector-cli/src/core/index.ts index cc3052f..2c77313 100644 --- a/src/connector-cli/src/core/index.ts +++ b/src/connector-cli/src/core/index.ts @@ -1,4 +1,5 @@ +export * from './connector-config'; export * from './error-handling'; export * from './logger'; +export * from './read-access-token'; export * from './validation'; -export * from './connector-config'; diff --git a/src/connector-cli/src/core/validation.ts b/src/connector-cli/src/core/validation.ts index 6cab053..a9ba80a 100644 --- a/src/connector-cli/src/core/validation.ts +++ b/src/connector-cli/src/core/validation.ts @@ -1,34 +1,5 @@ -import fs from 'fs'; -import path from 'path'; -import { error, verbose } from './logger'; import { ExecutionError } from './types'; -export function validateInputConnectorFile(connectorFile: string): boolean { - const pathToConnectorFile = path.resolve(connectorFile); - verbose(`Checking connector's file in path ${pathToConnectorFile}`); - if (fs.existsSync(pathToConnectorFile) === false) { - error('connectorFile is required'); - return false; - } - if (path.extname(connectorFile) !== '.ts') { - error('connectorFile must be a typescript file'); - return false; - } - return true; -} - -export function validateInputConnectorPath(connectorPath: string): boolean { - const connectorPckgJson = connectorPath + '/package.json'; - verbose( - `Checking connector's "package.json" in ${path.resolve(connectorPckgJson)}` - ); - if (fs.existsSync(path.resolve(connectorPckgJson)) === false) { - error('You need to specify a valid path to the connector'); - return false; - } - return true; -} - export function validateRuntimeOptions( inputs: Record | undefined, schema: Record @@ -57,7 +28,7 @@ export function validateRuntimeOptions( errMessages, null, 2 - )}.\n To see all available options execute 'connector-cli pathToConnector list-options --type="runtime-options"'` + )}.\n To view all available options, retrieve the connector's information using the command: "connector-cli [projectPath] info ..."` ); } } diff --git a/src/connector-cli/src/index.ts b/src/connector-cli/src/index.ts index a7196fa..7a209cd 100644 --- a/src/connector-cli/src/index.ts +++ b/src/connector-cli/src/index.ts @@ -1,19 +1,23 @@ -import { program, Option } from 'commander'; -import { runGetInfo } from './commands/info'; -import { runDemo, runTests } from './commands/test'; -import { runStressTest } from './commands/stress'; -import { runDebugger } from './commands/debug'; -import { runPublish } from './commands/publish'; +import { Option, program } from 'commander'; +import info from '../package.json'; import { runBuild } from './commands/build'; +import { runDebugger } from './commands/debug'; +import { runDelete } from './commands/delete'; +import { runGetInfo } from './commands/info'; import { runInit } from './commands/init'; -import info from '../package.json'; import { runLogin } from './commands/login'; -import { ListCommandTypeOption, runListOptions } from './commands/list-options'; +import { runPublish } from './commands/publish'; import { runSetAuth } from './commands/set-auth'; -import { withErrorHandlerAction } from './core'; -import { Tenant } from './core/types/types'; -import { SupportedAuth as AuthenticationType } from './core/types/gen-types'; import { AuthenticationUsage } from './commands/set-auth/types'; +import { runStressTest } from './commands/stress'; +import { runDemo, runTests } from './commands/test'; +import { withErrorHandlerAction } from './core'; +import { + SupportedAuth as AuthenticationType, + Type as ConnectorType, + Tenant, +} from './core/types'; +import { connectorProject } from './utils/connector-project'; function main() { program @@ -24,29 +28,30 @@ function main() { program .command('init') - .argument( - '[directory]', - 'Directory where the project will be created', - process.cwd() - ) - .requiredOption( - '-n, --name ', - 'Name of the connector. Will be used as package name' + .description("Instantiate current directory as connector's project") + .requiredOption('-n, --name ', 'Name of the connector') + .addOption( + new Option('-t, --type [type]', 'Type of the connector') + .choices(Object.values(ConnectorType)) + .default('media') ) + .action(withErrorHandlerAction(runInit)); + + program + .command('new') + .description("Instantiate a directory as connector's project") + .requiredOption('-n, --name ', 'Name of the connector') .addOption( new Option('-t, --type [type]', 'Type of the connector') - .choices(['media', 'fonts']) + .choices(Object.values(ConnectorType)) .default('media') ) - .action(runInit); + .action(withErrorHandlerAction(runInit)); program .command('publish') - .argument( - '[connectorFile]', - 'Path to connector file (with package.json) to publish to the environment', - './connector.ts' - ) + .description('Deploy your connector to defined environment') + .addArgument(connectorProject) .addOption( new Option( '-t, --tenant [tenant]', @@ -94,70 +99,53 @@ function main() { program .command('build') - .argument( - '[connectorFile]', - 'Connector file (ts) to publish to build', - './connector.ts' - ) - .option('-o, --outFolder ', 'Output folder') + .description('Build connector project') + .addArgument(connectorProject) .option('-w, --watch', 'Watch for changes') - .action(runBuild); + .action(withErrorHandlerAction(runBuild)); program .command('debug') - .argument( - '[connectorFile]', - 'Connector file (ts) to run debug server for', - './connector.ts' - ) + .description('Run connector project in debug mode for testing in browser') + .addArgument(connectorProject) .option('-p, --port [port]', 'Port to run debug application', '3300') .option( '-w, --watch', "Enable watch mode to reload connector's code when changed" ) - .action(runDebugger); + .action(withErrorHandlerAction(runDebugger)); program .command('info') - .argument( - '[connectorFile]', - 'Connector file (ts) to get info about', - './connector.ts' + .description( + 'Get connectors information, like capabilities, connector settings and etc.' ) + .addArgument(connectorProject) .option('-o, --out ', 'Output json file') - .action(runGetInfo); + .action(withErrorHandlerAction(runGetInfo)); program .command('test') - .argument( - '[connectorFile]', - 'Connector file (ts) to run test suite for', - './connector.ts' - ) + .addArgument(connectorProject) .requiredOption('-t, --testFile ') - .action(runTests); + .action(withErrorHandlerAction(runTests)); program .command('demo') - .argument( - '[connectorFile]', - 'Connector file (ts) to run demo for', - './connector.ts' - ) - .action(runDemo); + .addArgument(connectorProject) + .action(withErrorHandlerAction(runDemo)); program .command('stress') - .argument( - '[connectorFile]', - 'Connector file (compiled js) to run stress test suite for', - './connector.ts' - ) + .addArgument(connectorProject) .option('-i, --iterations ') - .action(runStressTest); + .action(withErrorHandlerAction(runStressTest)); program .command('login') + .description( + 'Authorize in the system to deploy and configure your connector in the environment' + ) .addOption( new Option('-t, --tenant [tenant]', 'Which authentication tenant to use') .choices(Object.values(Tenant)) @@ -165,27 +153,10 @@ function main() { ) .action(runLogin); - program - .command('list-options') - .argument( - '[connectorPath]', - 'Path to connector where "package.json" is located', - './' - ) - .addOption( - new Option('-t, --type ', 'Type of options that you want to list') - .makeOptionMandatory(true) - .choices(Object.values(ListCommandTypeOption)) - ) - .action(runListOptions); - program .command('set-auth') - .argument( - '[connectorPath]', - 'Path to connector where "package.json" is located', - './' - ) + .description('Configure authorization configuration of deployed connector') + .addArgument(connectorProject) .addOption( new Option( '-t, --tenant [tenant]', @@ -228,6 +199,31 @@ function main() { ) .action(withErrorHandlerAction(runSetAuth)); + program + .command('delete') + .description('Remove the published connector from environment') + .addOption( + new Option( + '-t, --tenant [tenant]', + 'Which authentication tenant to use. Important: if you target "baseUrl" to dev Environment API, you should specify "tenant" as dev' + ) + .choices(Object.values(Tenant)) + .default(Tenant.Prod) + ) + .requiredOption( + '-e, --environment ', + 'Environment name to use for operation, i.e. "cp-qeb-191"' + ) + .requiredOption( + '-b, --baseUrl ', + 'Environemnt API endpoint to use for operation, i.e. "https://main.cpstaging.online/grafx"' + ) + .requiredOption( + '--connectorId ', + 'Id of the connector to perform operation' + ) + .action(withErrorHandlerAction(runDelete)); + program.parse(process.argv); } diff --git a/src/connector-cli/src/reload.d.ts b/src/connector-cli/src/reload.d.ts new file mode 100644 index 0000000..ad4311a --- /dev/null +++ b/src/connector-cli/src/reload.d.ts @@ -0,0 +1,44 @@ +// @types/reload package has a bug with integrating of 'ws' module, so copied and updated types here to avoid compilation issue +declare module 'reload' { + declare function reload( + app: express.Express, + opts: OptionsWaitToStartWebSocketServer + ): Promise; + declare function reload( + app: express.Express, + opts?: Options + ): Promise; + + interface Options { + port?: number; + https?: { + p12?: { + p12Path: string; + }; + certAndKey?: { + key: string; + cert: string; + }; + passphrase?: string; + }; + forceWss?: boolean; + verbose?: boolean; + route?: string; + } + + interface OptionsWaitToStartWebSocketServer extends Options { + webSocketServerWaitStart: true; + } + + interface Reload { + reload(): void; + wss: ws.Server; + closeServer(): Promise; + } + + interface ReloadWithWebSocketServer extends Reload { + startWebSocketServer(): Promise; + } + + export = reload; +} diff --git a/src/connector-cli/src/utils/connector-project.ts b/src/connector-cli/src/utils/connector-project.ts new file mode 100644 index 0000000..a1c14f5 --- /dev/null +++ b/src/connector-cli/src/utils/connector-project.ts @@ -0,0 +1,46 @@ +import { Argument } from 'commander'; +import fs from 'node:fs'; +import path from 'node:path'; +import { verbose } from '../core'; +import { ExecutionError } from '../core/types'; + +export const connectorFileName = 'connector.ts'; +export const outputFilename = 'connector.js'; +export const outputDirectory = 'out'; + +export const connectorProject = new Argument( + '[connectorProject]', + 'Path to the connector project generated by "init" or "new" command' +).default('./'); + +export function getConnectorProjectFileInfo(projectPath: string) { + verbose('Retreiving project file information...'); + let dir = path.resolve(projectPath); + // For backward compatibility we treat it as path to directory or to connector file + if (projectPath.endsWith('.ts')) { + dir = path.resolve(path.dirname(projectPath)); + } + + verbose(`Checking if directory exists: ${dir}`); + if (!fs.existsSync(dir)) { + throw new ExecutionError(`Specified directory "${dir}" doesn't exist`); + } + + const connectorFile = path.join(dir, connectorFileName); + verbose(`Checking if connector file exists: ${connectorFile}`); + if (!fs.existsSync(connectorFile)) { + throw new ExecutionError(`Specified file "${connectorFile}" doesn't exist`); + } + + const packageJson = path.join(dir, 'package.json'); + verbose(`Checking if "package.json" exists: ${packageJson}`); + if (!fs.existsSync(packageJson)) { + throw new ExecutionError(`Specified file "${packageJson}" doesn't exist`); + } + + return { + projectDir: dir, + connectorFile, + packageJson, + }; +} diff --git a/src/connector-cli/src/utils/execution-util.ts b/src/connector-cli/src/utils/execution-util.ts deleted file mode 100644 index bcde8dc..0000000 --- a/src/connector-cli/src/utils/execution-util.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { TempFileCompilationResult } from '../compiler/connectorCompiler'; -import { evalSync, initRuntime } from '../qjs/qjs'; - -export async function getInfoInternal(compilation: TempFileCompilationResult) { - const vm = await initRuntime(compilation.tempFile, {}); - - const capabilities = evalSync(vm, 'loadedConnector.getCapabilities()'); - const configurationOptions = evalSync( - vm, - 'loadedConnector.getConfigurationOptions();' - ); - - const properties = { - capabilities, - configurationOptions, - }; - - return properties; -} diff --git a/yarn.lock b/yarn.lock index f4e3f23..78a580e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -33,7 +33,7 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz" integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== -"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.23.5": +"@babel/core@^7.23.5": version "7.23.9" resolved "https://registry.npmjs.org/@babel/core/-/core-7.23.9.tgz" integrity sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw== @@ -218,21 +218,6 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@chili-publish/connector-cli@^1.0.50", "@chili-publish/connector-cli@file:/home/runner/work/studio-connector-framework/studio-connector-framework/src/connector-cli": - version "1.3.0" - resolved "file:src/connector-cli" - dependencies: - "@chili-publish/studio-connectors" "^1" - chalk "^4" - commander "^12.0.0" - dot-object "^2.1.4" - express "^4.19.2" - js-yaml "^4.1.0" - open "^9.1.0" - prettier "^3.0.3" - quickjs-emscripten "^0.23.0" - typescript "^5.2.2" - "@chili-publish/studio-connectors@^1", "@chili-publish/studio-connectors@^1.10.1": version "1.10.1" resolved "https://registry.npmjs.org/@chili-publish/studio-connectors/-/studio-connectors-1.10.1.tgz" @@ -250,11 +235,121 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" +"@esbuild/aix-ppc64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz#a70f4ac11c6a1dfc18b8bbb13284155d933b9537" + integrity sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g== + +"@esbuild/android-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz#db1c9202a5bc92ea04c7b6840f1bbe09ebf9e6b9" + integrity sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg== + +"@esbuild/android-arm@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.20.2.tgz#3b488c49aee9d491c2c8f98a909b785870d6e995" + integrity sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w== + +"@esbuild/android-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.20.2.tgz#3b1628029e5576249d2b2d766696e50768449f98" + integrity sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg== + +"@esbuild/darwin-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz#6e8517a045ddd86ae30c6608c8475ebc0c4000bb" + integrity sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA== + +"@esbuild/darwin-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz#90ed098e1f9dd8a9381695b207e1cff45540a0d0" + integrity sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA== + +"@esbuild/freebsd-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz#d71502d1ee89a1130327e890364666c760a2a911" + integrity sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw== + +"@esbuild/freebsd-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz#aa5ea58d9c1dd9af688b8b6f63ef0d3d60cea53c" + integrity sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw== + +"@esbuild/linux-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz#055b63725df678379b0f6db9d0fa85463755b2e5" + integrity sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A== + +"@esbuild/linux-arm@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz#76b3b98cb1f87936fbc37f073efabad49dcd889c" + integrity sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg== + +"@esbuild/linux-ia32@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz#c0e5e787c285264e5dfc7a79f04b8b4eefdad7fa" + integrity sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig== + +"@esbuild/linux-loong64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz#a6184e62bd7cdc63e0c0448b83801001653219c5" + integrity sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ== + +"@esbuild/linux-mips64el@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz#d08e39ce86f45ef8fc88549d29c62b8acf5649aa" + integrity sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA== + +"@esbuild/linux-ppc64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz#8d252f0b7756ffd6d1cbde5ea67ff8fd20437f20" + integrity sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg== + +"@esbuild/linux-riscv64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz#19f6dcdb14409dae607f66ca1181dd4e9db81300" + integrity sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg== + +"@esbuild/linux-s390x@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz#3c830c90f1a5d7dd1473d5595ea4ebb920988685" + integrity sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ== + "@esbuild/linux-x64@0.20.2": version "0.20.2" resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz" integrity sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw== +"@esbuild/netbsd-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz#e771c8eb0e0f6e1877ffd4220036b98aed5915e6" + integrity sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ== + +"@esbuild/openbsd-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz#9a795ae4b4e37e674f0f4d716f3e226dd7c39baf" + integrity sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ== + +"@esbuild/sunos-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz#7df23b61a497b8ac189def6e25a95673caedb03f" + integrity sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w== + +"@esbuild/win32-arm64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz#f1ae5abf9ca052ae11c1bc806fb4c0f519bacf90" + integrity sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ== + +"@esbuild/win32-ia32@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz#241fe62c34d8e8461cd708277813e1d0ba55ce23" + integrity sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ== + +"@esbuild/win32-x64@0.20.2": + version "0.20.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz#9c907b21e30a52db959ba4f80bb01a0cc403d5cc" + integrity sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ== + "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" @@ -287,16 +382,16 @@ resolved "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz" integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A== -"@glideapps/ts-necessities@^2.1.2": - version "2.2.4" - resolved "https://registry.npmjs.org/@glideapps/ts-necessities/-/ts-necessities-2.2.4.tgz" - integrity sha512-CB3XZe+MlpxByzJR+oxsK6OY9ImGQC9lfAteG74XpNAV3e3SzntpHUuJ+lX6fLdSBtBI0L/6GzvHfjuPkArXug== - "@glideapps/ts-necessities@2.1.2": version "2.1.2" resolved "https://registry.npmjs.org/@glideapps/ts-necessities/-/ts-necessities-2.1.2.tgz" integrity sha512-tLjfhinr6doUBcWi7BWnkT2zT6G5UhiZftsiIH6xVvykeXE+FU7Wr0MyqwmqideWlDD5rG+VjVLptLviGo04CA== +"@glideapps/ts-necessities@^2.1.2": + version "2.2.4" + resolved "https://registry.npmjs.org/@glideapps/ts-necessities/-/ts-necessities-2.2.4.tgz" + integrity sha512-CB3XZe+MlpxByzJR+oxsK6OY9ImGQC9lfAteG74XpNAV3e3SzntpHUuJ+lX6fLdSBtBI0L/6GzvHfjuPkArXug== + "@humanwhocodes/config-array@^0.11.13": version "0.11.14" resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz" @@ -352,14 +447,6 @@ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.22" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz" - integrity sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - "@jridgewell/trace-mapping@0.3.9": version "0.3.9" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" @@ -368,6 +455,14 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.22" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz" + integrity sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@mark.probst/typescript-json-schema@0.55.0": version "0.55.0" resolved "https://registry.npmjs.org/@mark.probst/typescript-json-schema/-/typescript-json-schema-0.55.0.tgz" @@ -390,7 +485,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -408,6 +503,56 @@ resolved "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== +"@rollup/rollup-android-arm-eabi@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.0.tgz#57936f50d0335e2e7bfac496d209606fa516add4" + integrity sha512-jwXtxYbRt1V+CdQSy6Z+uZti7JF5irRKF8hlKfEnF/xJpcNGuuiZMBvuoYM+x9sr9iWGnzrlM0+9hvQ1kgkf1w== + +"@rollup/rollup-android-arm64@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.0.tgz#81bba83b37382a2d0e30ceced06c8d3d85138054" + integrity sha512-fI9nduZhCccjzlsA/OuAwtFGWocxA4gqXGTLvOyiF8d+8o0fZUeSztixkYjcGq1fGZY3Tkq4yRvHPFxU+jdZ9Q== + +"@rollup/rollup-darwin-arm64@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.0.tgz#a371bd723a5c4c4a33376da72abfc3938066842b" + integrity sha512-BcnSPRM76/cD2gQC+rQNGBN6GStBs2pl/FpweW8JYuz5J/IEa0Fr4AtrPv766DB/6b2MZ/AfSIOSGw3nEIP8SA== + +"@rollup/rollup-darwin-x64@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.0.tgz#8baf2fda277c9729125017c65651296282412886" + integrity sha512-LDyFB9GRolGN7XI6955aFeI3wCdCUszFWumWU0deHA8VpR3nWRrjG6GtGjBrQxQKFevnUTHKCfPR4IvrW3kCgQ== + +"@rollup/rollup-linux-arm-gnueabihf@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.0.tgz#822830a8f7388d5b81d04c69415408d3bab1079b" + integrity sha512-ygrGVhQP47mRh0AAD0zl6QqCbNsf0eTo+vgwkY6LunBcg0f2Jv365GXlDUECIyoXp1kKwL5WW6rsO429DBY/bA== + +"@rollup/rollup-linux-arm64-gnu@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.0.tgz#e20fbe1bd4414c7119f9e0bba8ad17a6666c8365" + integrity sha512-x+uJ6MAYRlHGe9wi4HQjxpaKHPM3d3JjqqCkeC5gpnnI6OWovLdXTpfa8trjxPLnWKyBsSi5kne+146GAxFt4A== + +"@rollup/rollup-linux-arm64-musl@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.0.tgz#13f475596a62e1924f13fe1c8cf2c40e09a99b47" + integrity sha512-nrRw8ZTQKg6+Lttwqo6a2VxR9tOroa2m91XbdQ2sUUzHoedXlsyvY1fN4xWdqz8PKmf4orDwejxXHjh7YBGUCA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.0.tgz#6a431c441420d1c510a205e08c6673355a0a2ea9" + integrity sha512-xV0d5jDb4aFu84XKr+lcUJ9y3qpIWhttO3Qev97z8DKLXR62LC3cXT/bMZXrjLF9X+P5oSmJTzAhqwUbY96PnA== + +"@rollup/rollup-linux-riscv64-gnu@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.0.tgz#53d9448962c3f9ed7a1672269655476ea2d67567" + integrity sha512-SDDhBQwZX6LPRoPYjAZWyL27LbcBo7WdBFWJi5PI9RPCzU8ijzkQn7tt8NXiXRiFMJCVpkuMkBf4OxSxVMizAw== + +"@rollup/rollup-linux-s390x-gnu@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.0.tgz#95f0c133b324da3e7e5c7d12855e0eb71d21a946" + integrity sha512-RxB/qez8zIDshNJDufYlTT0ZTVut5eCpAZ3bdXDU9yTxBzui3KhbGjROK2OYTTor7alM7XBhssgoO3CZ0XD3qA== + "@rollup/rollup-linux-x64-gnu@4.14.0": version "4.14.0" resolved "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.0.tgz" @@ -418,6 +563,21 @@ resolved "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.0.tgz" integrity sha512-i0QwbHYfnOMYsBEyjxcwGu5SMIi9sImDVjDg087hpzXqhBSosxkE7gyIYFHgfFl4mr7RrXksIBZ4DoLoP4FhJg== +"@rollup/rollup-win32-arm64-msvc@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.0.tgz#269023332297051d037a9593dcba92c10fef726b" + integrity sha512-Fq52EYb0riNHLBTAcL0cun+rRwyZ10S9vKzhGKKgeD+XbwunszSY0rVMco5KbOsTlwovP2rTOkiII/fQ4ih/zQ== + +"@rollup/rollup-win32-ia32-msvc@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.0.tgz#d7701438daf964011fd7ca33e3f13f3ff5129e7b" + integrity sha512-e/PBHxPdJ00O9p5Ui43+vixSgVf4NlLsmV6QneGERJ3lnjIua/kim6PRFe3iDueT1rQcgSkYP8ZBBXa/h4iPvw== + +"@rollup/rollup-win32-x64-msvc@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.0.tgz#0bb7ac3cd1c3292db1f39afdabfd03ccea3a3d34" + integrity sha512-aGg7iToJjdklmxlUlJh/PaPNa4PmqHfyRMLunbL3eaMO0gp656+q1zOKkpJ/CVe9CryJv6tAN1HDoR8cNGzkag== + "@tsconfig/node10@^1.0.7": version "1.0.9" resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz" @@ -548,7 +708,7 @@ resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz" integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== -"@types/node@*", "@types/node@^18.0.0 || >=20.0.0", "@types/node@^20.8.6": +"@types/node@*", "@types/node@^20.8.6": version "20.10.0" resolved "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz" integrity sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ== @@ -640,7 +800,7 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^6.0.0 || ^6.0.0-alpha", "@typescript-eslint/parser@^6.10.0": +"@typescript-eslint/parser@^6.10.0": version "6.21.0" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz" integrity sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ== @@ -750,22 +910,15 @@ acorn-walk@^8.1.1: resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz" integrity sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA== -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.9.0: - version "8.11.3" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== - acorn@^8.4.1: version "8.11.2" resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== -"acquia@file:/home/runner/work/studio-connector-framework/studio-connector-framework/src/connectors/acquia": - version "1.0.0" - resolved "file:src/connectors/acquia" - dependencies: - "@chili-publish/studio-connectors" "^1.11.0" - prettier "^3.0.3" +acorn@^8.9.0: + version "8.11.3" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== ajv@^6.12.4: version "6.12.6" @@ -839,12 +992,7 @@ array-back@^3.0.1, array-back@^3.1.0: resolved "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz" integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== -array-back@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz" - integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== - -array-back@^4.0.2: +array-back@^4.0.1, array-back@^4.0.2: version "4.0.2" resolved "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz" integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== @@ -943,7 +1091,7 @@ browser-or-node@^2.1.1: resolved "https://registry.npmjs.org/browser-or-node/-/browser-or-node-2.1.1.tgz" integrity sha512-8CVjaLJGuSKMVTxJ2DpBl5XnlNDiT4cQFeuCJJrvJmts9YrTZDizTX7PjC2s6W4x+MBGZeEY6dGMrF04/6Hgqg== -browserslist@^4.22.2, "browserslist@>= 4.21.0": +browserslist@^4.22.2: version "4.22.3" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz" integrity sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A== @@ -1006,23 +1154,7 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^4.0.0: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^4.1.2: +chalk@^4, chalk@^4.0.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1045,6 +1177,17 @@ chokidar@^3.5.3: optionalDependencies: fsevents "~2.3.2" +cli-color@~2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-2.0.4.tgz#d658080290968816b322248b7306fad2346fb2c8" + integrity sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA== + dependencies: + d "^1.0.1" + es5-ext "^0.10.64" + es6-iterator "^2.0.3" + memoizee "^0.4.15" + timers-ext "^0.1.7" + cliui@^7.0.2: version "7.0.4" resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" @@ -1082,16 +1225,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - color-name@1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + command-line-args@^5.2.1: version "5.2.1" resolved "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz" @@ -1122,6 +1265,11 @@ commander@^4.0.0: resolved "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== +commander@~9.4.0: + version "9.4.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" + integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" @@ -1203,19 +1351,13 @@ csstype@^3.0.2: resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz" integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== -"dall-e@file:/home/runner/work/studio-connector-framework/studio-connector-framework/src/connectors/dall-e": - version "1.0.0" - resolved "file:src/connectors/dall-e" - dependencies: - "@chili-publish/studio-connectors" "^1.10.1" - typescript "^5.2.2" - -debug@^4.1.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== +d@1, d@^1.0.1, d@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.2.tgz#2aefd554b81981e7dccf72d6842ae725cb17e5de" + integrity sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw== dependencies: - ms "2.1.2" + es5-ext "^0.10.64" + type "^2.7.2" debug@2.6.9: version "2.6.9" @@ -1224,6 +1366,13 @@ debug@2.6.9: dependencies: ms "2.0.0" +debug@^4.1.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + deep-extend@~0.6.0: version "0.6.0" resolved "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz" @@ -1261,6 +1410,11 @@ define-data-property@^1.1.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + define-lazy-prop@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz" @@ -1343,6 +1497,43 @@ encodeurl@~1.0.2: resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.62, es5-ext@^0.10.64, es5-ext@~0.10.14, es5-ext@~0.10.2: + version "0.10.64" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714" + integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + esniff "^2.0.1" + next-tick "^1.1.0" + +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.4" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.4.tgz#f4e7d28013770b4208ecbf3e0bf14d3bcb557b8c" + integrity sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg== + dependencies: + d "^1.0.2" + ext "^1.7.0" + +es6-weak-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + esbuild@^0.20.1: version "0.20.2" resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz" @@ -1415,7 +1606,7 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -"eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0", "eslint@^6.0.0 || ^7.0.0 || >=8.0.0", "eslint@^7.0.0 || ^8.0.0", eslint@^8.53.0, eslint@>=7: +eslint@^8.53.0: version "8.56.0" resolved "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz" integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ== @@ -1459,6 +1650,16 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 strip-ansi "^6.0.1" text-table "^0.2.0" +esniff@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308" + integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg== + dependencies: + d "^1.0.1" + es5-ext "^0.10.62" + event-emitter "^0.3.5" + type "^2.7.2" + espree@^9.6.0, espree@^9.6.1: version "9.6.1" resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" @@ -1497,6 +1698,14 @@ etag@~1.8.1: resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== + dependencies: + d "1" + es5-ext "~0.10.14" + event-target-shim@^5.0.0: version "5.0.1" resolved "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz" @@ -1574,6 +1783,13 @@ express@^4.19.2: utils-merge "1.0.1" vary "~1.1.2" +ext@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" @@ -1621,7 +1837,7 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" -finalhandler@1.2.0: +finalhandler@1.2.0, finalhandler@~1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz" integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== @@ -1691,6 +1907,11 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fsevents@~2.3.2, fsevents@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" @@ -1917,7 +2138,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3, inherits@2, inherits@2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -1941,7 +2162,7 @@ is-core-module@^2.13.0: dependencies: hasown "^2.0.0" -is-docker@^2.0.0: +is-docker@^2.0.0, is-docker@^2.1.1: version "2.2.1" resolved "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== @@ -1985,6 +2206,11 @@ is-path-inside@^3.0.3: resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== +is-promise@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== + is-stream@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" @@ -2007,16 +2233,16 @@ is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - isarray@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" @@ -2161,6 +2387,13 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" + integrity sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ== + dependencies: + es5-ext "~0.10.2" + make-error@^1.1.1: version "1.3.6" resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" @@ -2171,6 +2404,20 @@ media-typer@0.3.0: resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== +memoizee@^0.4.15: + version "0.4.17" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.17.tgz#942a5f8acee281fa6fb9c620bddc57e3b7382949" + integrity sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA== + dependencies: + d "^1.0.2" + es5-ext "^0.10.64" + es6-weak-map "^2.0.3" + event-emitter "^0.3.5" + is-promise "^2.2.2" + lru-queue "^0.1.0" + next-tick "^1.1.0" + timers-ext "^0.1.7" + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" @@ -2226,28 +2473,21 @@ mimic-fn@^4.0.0: resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== -minimatch@^3.0.3, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^9.0.1: +minimatch@9.0.3, minimatch@^9.0.1: version "9.0.3" resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz" integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== dependencies: brace-expansion "^2.0.1" -minimatch@9.0.3: - version "9.0.3" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== +minimatch@^3.0.3, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: - brace-expansion "^2.0.1" + brace-expansion "^1.1.7" -minimist@^1.2.5: +minimist@^1.2.5, minimist@~1.2.0: version "1.2.8" resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -2311,6 +2551,11 @@ neo-async@^2.6.2: resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== +next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + node-fetch@^2.6.12: version "2.7.0" resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz" @@ -2398,6 +2643,15 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" +open@^8.0.0: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + open@^9.1.0: version "9.1.0" resolved "https://registry.npmjs.org/open/-/open-9.1.0.tgz" @@ -2581,7 +2835,7 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0: resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.0.0, postcss@^8.1.0, postcss@^8.2.14, postcss@^8.4.21, postcss@^8.4.23, postcss@^8.4.31, postcss@>=8.0.9: +postcss@^8.4.23, postcss@^8.4.31: version "8.4.35" resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz" integrity sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA== @@ -2751,6 +3005,16 @@ read-cache@^1.0.0: dependencies: pify "^2.3.0" +readable-stream@4.3.0: + version "4.3.0" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-4.3.0.tgz" + integrity sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ== + dependencies: + abort-controller "^3.0.0" + buffer "^6.0.3" + events "^3.3.0" + process "^0.11.10" + readable-stream@^3.4.0: version "3.6.2" resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" @@ -2794,16 +3058,6 @@ readable-stream@~2.3.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-4.3.0.tgz" - integrity sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ== - dependencies: - abort-controller "^3.0.0" - buffer "^6.0.3" - events "^3.3.0" - process "^0.11.10" - readdirp@~3.6.0: version "3.6.0" resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" @@ -2816,6 +3070,20 @@ reduce-flatten@^2.0.0: resolved "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz" integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== +reload@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/reload/-/reload-3.2.1.tgz#42d43e33e327efe1348c723272c6835fe333349a" + integrity sha512-ZdM8ZSEeI72zkhh6heMEvJ0vHZoovZXcJI6Zae8CzS7o5vO/WjZsAMMr0y1+3I/fCN7y7ZxABoUwwCswcLHkjQ== + dependencies: + cli-color "~2.0.0" + commander "~9.4.0" + finalhandler "~1.2.0" + minimist "~1.2.0" + open "^8.0.0" + serve-static "~1.15.0" + supervisor "~0.12.0" + ws "~8.11.0" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" @@ -2892,16 +3160,16 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +safe-buffer@5.2.1, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@~5.2.0, safe-buffer@5.2.1: - version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - safe-stable-stringify@^2.2.0: version "2.4.3" resolved "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz" @@ -2950,7 +3218,7 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" -serve-static@1.15.0: +serve-static@1.15.0, serve-static@~1.15.0: version "1.15.0" resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz" integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== @@ -3043,25 +3311,6 @@ stream-json@1.7.5: dependencies: stream-chain "^2.2.5" -string_decoder@^1.1.1, string_decoder@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - string-to-stream@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/string-to-stream/-/string-to-stream-3.0.1.tgz" @@ -3096,6 +3345,25 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string_decoder@^1.1.1, string_decoder@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + "strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" @@ -3145,6 +3413,11 @@ sucrase@^3.32.0: pirates "^4.0.1" ts-interface-checker "^0.1.9" +supervisor@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/supervisor/-/supervisor-0.12.0.tgz#de7e6337015b291851c10f3538c4a7f04917ecc1" + integrity sha512-iBYeU5Or4WiiIa3+ns1DpHIiHjNNXSuYUiixKcznewwo4ImBJ8EobktaAo2csOcauhrz4SvKRTou8Z2C3W28+A== + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" @@ -3229,6 +3502,14 @@ through2@^2.0.1: readable-stream "~2.3.6" xtend "~4.0.1" +timers-ext@^0.1.7: + version "0.1.8" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.8.tgz#b4e442f10b7624a29dd2aa42c295e257150cf16c" + integrity sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww== + dependencies: + es5-ext "^0.10.64" + next-tick "^1.1.0" + tiny-inflate@^1.0.0: version "1.0.3" resolved "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz" @@ -3271,7 +3552,7 @@ ts-interface-checker@^0.1.9: resolved "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== -ts-node@^10.9.1, ts-node@>=9.0.0: +ts-node@^10.9.1: version "10.9.1" resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz" integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== @@ -3310,10 +3591,10 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -typescript@^5.2.2, typescript@>=2.7, typescript@>=4.2.0: - version "5.3.2" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz" - integrity sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ== +type@^2.7.2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.3.tgz#436981652129285cc3ba94f392886c2637ea0486" + integrity sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ== typescript@4.9.4: version "4.9.4" @@ -3325,6 +3606,11 @@ typescript@4.9.5: resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript@^5.2.2: + version "5.3.2" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz" + integrity sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ== + typical@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz" @@ -3361,7 +3647,7 @@ unicode-trie@^2.0.0: pako "^0.2.5" tiny-inflate "^1.0.0" -unpipe@~1.0.0, unpipe@1.0.0: +unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -3411,14 +3697,7 @@ vary@~1.1.2: resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== -"vite-react-typescript-starter@file:/home/runner/work/studio-connector-framework/studio-connector-framework/src/connector-cli/debugger": - version "0.0.0" - resolved "file:src/connector-cli/debugger" - dependencies: - react "^18.2.0" - react-dom "^18.2.0" - -"vite@^4.2.0 || ^5.0.0", vite@^5.1.7: +vite@^5.1.7: version "5.2.8" resolved "https://registry.npmjs.org/vite/-/vite-5.2.8.tgz" integrity sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA== @@ -3494,6 +3773,11 @@ wrappy@1: resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +ws@~8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== + xtend@~4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz"