Skip to content

Commit

Permalink
add node sdk client package
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Aug 25, 2024
1 parent e5c46e9 commit 804c544
Show file tree
Hide file tree
Showing 7 changed files with 561 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/node-sdk/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import baseConfig, { requireJsSuffix } from "@ctrlplane/eslint-config/base";
/** @type {import('typescript-eslint').Config} */
export default [
{
ignores: ["dist/**"],
ignores: ["dist/**", "src/**"],
},
...requireJsSuffix,
...baseConfig,
Expand Down
1 change: 0 additions & 1 deletion packages/node-sdk/openapitools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"spaces": 2,
"generator-cli": {
"version": "7.7.0",

"generators": {
"v1": {
"generatorName": "typescript-fetch",
Expand Down
11 changes: 9 additions & 2 deletions packages/node-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"name": "@ctrlplane/node-sdk",
"private": true,
"private": false,
"version": "0.1.0",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"license": "MIT",
"files": [
"dist/**"
],
"scripts": {
"build": "tsc",
"build:tsup": "tsup",
"dev": "tsc --watch",
"clean": "rm -rf .turbo node_modules",
"format": "prettier --check . --ignore-path ../../.gitignore",
Expand All @@ -21,13 +23,18 @@
"node-fetch": "^3.3.2"
},
"devDependencies": {
"@openapitools/openapi-generator-cli": "^2.13.5",
"@ctrlplane/eslint-config": "workspace:*",
"@ctrlplane/prettier-config": "workspace:*",
"@ctrlplane/tsconfig": "workspace:*",
"@openapitools/openapi-generator-cli": "^2.13.5",
"@types/node": "^20.12.9",
"eslint": "catalog:",
"prettier": "catalog:",
"tsup": "^8.2.4",
"typescript": "^5.4.5"
},
"publishConfig": {
"access": "public"
},
"prettier": "@ctrlplane/prettier-config"
}
1 change: 0 additions & 1 deletion packages/node-sdk/src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.openapi-generator-ignore
apis/DefaultApi.ts
apis/index.ts
index.ts
Expand Down
6 changes: 4 additions & 2 deletions packages/node-sdk/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"extends": "@ctrlplane/tsconfig/internal-package.json",
"compilerOptions": {
"outDir": "dist",
"baseUrl": ".",
"lib": ["ES2015", "DOM"],
"outDir": "./dist",
"rootDir": "./src",
"types": ["node"],
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",
"noEmit": false
Expand Down
10 changes: 10 additions & 0 deletions packages/node-sdk/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from "tsup";

export default defineConfig({
entry: ["src/index.ts"],
format: ["cjs", "esm"], // Build for commonJS and ESmodules
dts: true, // Generate declaration file (.d.ts)
splitting: false,
sourcemap: true,
clean: true,
});
Loading

0 comments on commit 804c544

Please sign in to comment.