chore: create build script

This commit is contained in:
Patrick Erichsen 2025-05-01 18:25:03 -07:00
parent 5e454aae3c
commit d35f9d6e69
4 changed files with 22 additions and 11 deletions

View file

@ -0,0 +1,16 @@
#!/bin/bash
# Build the hub-api first
cd api && npm run build
cd ..
# Build the SDK
tsc
# Create the necessary directory structure in dist
mkdir -p dist/api/dist
# Copy the hub-api dist files to the SDK dist
cp -r api/dist/* dist/api/dist/
# Copy the package.json to ensure proper resolution
cp api/package.json dist/api/

View file

@ -1,15 +1,14 @@
{
"name": "@continuedev/sdk",
"version": "0.0.1",
"version": "0.0.7",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@continuedev/sdk",
"version": "0.0.1",
"version": "0.0.7",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/hub-api": "file:./api",
"openai": "^4.96.2"
},
"devDependencies": {
@ -23,6 +22,7 @@
"api": {
"name": "@continuedev/hub-api",
"version": "0.0.1",
"extraneous": true,
"devDependencies": {
"typescript": "^4.0 || ^5.0"
}
@ -527,10 +527,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/@continuedev/hub-api": {
"resolved": "api",
"link": true
},
"node_modules/@istanbuljs/load-nyc-config": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",

View file

@ -1,19 +1,18 @@
{
"name": "@continuedev/sdk",
"version": "0.0.1",
"version": "0.0.9",
"description": "SDK for Continue.dev",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"type": "module",
"scripts": {
"build": "tsc",
"build": "bash ./build.sh",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"test:watch": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watch"
},
"author": "Continue Dev, Inc.",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/hub-api": "file:./api",
"openai": "^4.96.2"
},
"devDependencies": {

View file

@ -1,6 +1,6 @@
import { decodePackageSlug } from "@continuedev/config-yaml";
import { Configuration, DefaultApi } from "@continuedev/hub-api";
import type { OpenAI } from "openai";
import { Configuration, DefaultApi } from "../api/dist/index.js";
import { Assistant } from "./Assistant.js";
import { createOpenAIClient } from "./createOpenAIClient.js";