From 73c1be32237974d1695c14083360dc21c69041e6 Mon Sep 17 00:00:00 2001 From: David Crespo Date: Wed, 27 Mar 2024 11:55:36 -0500 Subject: [PATCH] remove tsup packaging step for now --- README.md | 3 +- package-lock.json | 646 ++++----------------------------- package.json | 32 +- tests/validate-publish.test.ts | 49 --- 4 files changed, 76 insertions(+), 654 deletions(-) delete mode 100644 tests/validate-publish.test.ts diff --git a/README.md b/README.md index 2ca8be0..850f23a 100644 --- a/README.md +++ b/README.md @@ -56,8 +56,7 @@ npm i npm run gen ``` -The TypeScript client code will be written to [`client`](client/). Browser ready -code will be added to [`dist`](dist/). +The TypeScript client code will be written to [`client`](client/). ## Contributing diff --git a/package-lock.json b/package-lock.json index 1cbb659..7fa7812 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,6 @@ "swagger-parser": "^10.0.3", "ts-pattern": "^4.0.5", "tsafe": "^1.1.1", - "tsup": "^6.7.0", "type-fest": "^3.1.0", "typescript": "^5.2.2", "vitest": "^1.4.0", @@ -137,6 +136,7 @@ "os": [ "android" ], + "peer": true, "engines": { "node": ">=12" } @@ -153,6 +153,7 @@ "os": [ "android" ], + "peer": true, "engines": { "node": ">=12" } @@ -169,6 +170,7 @@ "os": [ "android" ], + "peer": true, "engines": { "node": ">=12" } @@ -185,6 +187,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=12" } @@ -201,6 +204,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=12" } @@ -217,6 +221,7 @@ "os": [ "freebsd" ], + "peer": true, "engines": { "node": ">=12" } @@ -233,6 +238,7 @@ "os": [ "freebsd" ], + "peer": true, "engines": { "node": ">=12" } @@ -249,6 +255,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=12" } @@ -265,6 +272,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=12" } @@ -281,6 +289,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=12" } @@ -297,6 +306,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=12" } @@ -313,6 +323,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=12" } @@ -329,6 +340,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=12" } @@ -345,6 +357,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=12" } @@ -361,6 +374,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=12" } @@ -377,6 +391,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=12" } @@ -393,6 +408,7 @@ "os": [ "netbsd" ], + "peer": true, "engines": { "node": ">=12" } @@ -409,6 +425,7 @@ "os": [ "openbsd" ], + "peer": true, "engines": { "node": ">=12" } @@ -425,6 +442,7 @@ "os": [ "sunos" ], + "peer": true, "engines": { "node": ">=12" } @@ -441,6 +459,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=12" } @@ -457,6 +476,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=12" } @@ -473,6 +493,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=12" } @@ -1328,11 +1349,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/any-promise": { - "version": "1.3.0", - "dev": true, - "license": "MIT" - }, "node_modules/anymatch": { "version": "3.1.2", "dev": true, @@ -1497,21 +1513,6 @@ "optional": true, "peer": true }, - "node_modules/bundle-require": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.0.1.tgz", - "integrity": "sha512-9NQkRHlNdNpDBGmLpngF3EFDcwodhMUuLz9PaWYciVcQF9SE4LFjM2DB/xV1Li5JiuDMv7ZUWuC3rGbqR0MAXQ==", - "dev": true, - "dependencies": { - "load-tsconfig": "^0.2.3" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "peerDependencies": { - "esbuild": ">=0.17" - } - }, "node_modules/cac": { "version": "6.7.14", "dev": true, @@ -1720,14 +1721,6 @@ "node": ">= 0.8" } }, - "node_modules/commander": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, "node_modules/concat-map": { "version": "0.0.1", "dev": true, @@ -1986,6 +1979,7 @@ "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==", "dev": true, "hasInstallScript": true, + "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -2304,28 +2298,6 @@ "node": ">=0.10.0" } }, - "node_modules/execa": { - "version": "5.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, "node_modules/external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -2550,17 +2522,6 @@ "node": ">=4" } }, - "node_modules/get-stream": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/glob": { "version": "7.1.6", "dev": true, @@ -2794,14 +2755,6 @@ "node": ">= 6" } }, - "node_modules/human-signals": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.17.0" - } - }, "node_modules/iconv-lite": { "version": "0.6.3", "dev": true, @@ -2996,17 +2949,6 @@ "optional": true, "peer": true }, - "node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -3031,14 +2973,6 @@ "dev": true, "license": "ISC" }, - "node_modules/joycon": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, "node_modules/js-levenshtein": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", @@ -3201,28 +3135,6 @@ "node": ">= 0.8.0" } }, - "node_modules/lilconfig": { - "version": "2.0.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "node_modules/load-tsconfig": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", - "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, "node_modules/local-pkg": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", @@ -3276,11 +3188,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/lodash.sortby": { - "version": "4.7.0", - "dev": true, - "license": "MIT" - }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -3480,16 +3387,6 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, - "node_modules/mz": { - "version": "2.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, "node_modules/nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", @@ -3543,17 +3440,6 @@ "node": ">=0.10.0" } }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/nwsapi": { "version": "2.2.2", "dev": true, @@ -3561,14 +3447,6 @@ "optional": true, "peer": true }, - "node_modules/object-assign": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { "version": "1.12.2", "dev": true, @@ -3821,14 +3699,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pirates": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, "node_modules/pkg-types": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", @@ -3868,34 +3738,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/postcss-load-config": { - "version": "3.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "lilconfig": "^2.0.5", - "yaml": "^1.10.2" - }, - "engines": { - "node": ">= 10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": ">=8.0.9", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, "node_modules/prelude-ls": { "version": "1.1.2", "dev": true, @@ -4068,14 +3910,6 @@ "optional": true, "peer": true }, - "node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -4113,22 +3947,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rollup": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.1.tgz", - "integrity": "sha512-tywOR+rwIt5m2ZAWSe5AIJcTat8vGlnPFAv15ycCrw33t6iFsXZ6mzHVFh2psSjxQPmI+xgzMZZizUAukBI4aQ==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, "node_modules/run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -4340,14 +4158,6 @@ "node": ">=8" } }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -4372,26 +4182,6 @@ "url": "https://github.com/sponsors/antfu" } }, - "node_modules/sucrase": { - "version": "3.27.0", - "dev": true, - "license": "MIT", - "dependencies": { - "commander": "^4.0.0", - "glob": "7.1.6", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "ts-interface-checker": "^0.1.9" - }, - "bin": { - "sucrase": "bin/sucrase", - "sucrase-node": "bin/sucrase-node" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -4483,25 +4273,6 @@ "optional": true, "peer": true }, - "node_modules/thenify": { - "version": "3.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -4579,14 +4350,6 @@ "optional": true, "peer": true }, - "node_modules/tree-kill": { - "version": "1.2.2", - "dev": true, - "license": "MIT", - "bin": { - "tree-kill": "cli.js" - } - }, "node_modules/ts-api-utils": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", @@ -4599,11 +4362,6 @@ "typescript": ">=4.2.0" } }, - "node_modules/ts-interface-checker": { - "version": "0.1.13", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/ts-pattern": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-4.0.5.tgz", @@ -4622,85 +4380,6 @@ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, - "node_modules/tsup": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-6.7.0.tgz", - "integrity": "sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==", - "dev": true, - "dependencies": { - "bundle-require": "^4.0.0", - "cac": "^6.7.12", - "chokidar": "^3.5.1", - "debug": "^4.3.1", - "esbuild": "^0.17.6", - "execa": "^5.0.0", - "globby": "^11.0.3", - "joycon": "^3.0.1", - "postcss-load-config": "^3.0.1", - "resolve-from": "^5.0.0", - "rollup": "^3.2.5", - "source-map": "0.8.0-beta.0", - "sucrase": "^3.20.3", - "tree-kill": "^1.2.2" - }, - "bin": { - "tsup": "dist/cli-default.js", - "tsup-node": "dist/cli-node.js" - }, - "engines": { - "node": ">=14.18" - }, - "peerDependencies": { - "@swc/core": "^1", - "postcss": "^8.4.12", - "typescript": ">=4.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "postcss": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "node_modules/tsup/node_modules/source-map": { - "version": "0.8.0-beta.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "whatwg-url": "^7.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/tsup/node_modules/tr46": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/tsup/node_modules/webidl-conversions": { - "version": "4.0.2", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/tsup/node_modules/whatwg-url": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, "node_modules/type-check": { "version": "0.3.2", "dev": true, @@ -5711,14 +5390,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/yaml": { - "version": "1.10.2", - "dev": true, - "license": "ISC", - "engines": { - "node": ">= 6" - } - }, "node_modules/yargs": { "version": "17.6.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.0.tgz", @@ -5869,154 +5540,176 @@ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/android-arm64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz", "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/android-x64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz", "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/darwin-arm64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz", "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/darwin-x64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz", "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/freebsd-arm64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz", "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/freebsd-x64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz", "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/linux-arm": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz", "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/linux-arm64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz", "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/linux-ia32": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz", "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/linux-loong64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz", "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/linux-mips64el": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz", "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/linux-ppc64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz", "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/linux-riscv64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz", "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/linux-s390x": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz", "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/linux-x64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/netbsd-x64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz", "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/openbsd-x64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz", "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/sunos-x64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz", "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/win32-arm64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz", "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/win32-ia32": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz", "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@esbuild/win32-x64": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz", "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "@eslint-community/eslint-utils": { "version": "4.4.0", @@ -6583,10 +6276,6 @@ "color-convert": "^2.0.1" } }, - "any-promise": { - "version": "1.3.0", - "dev": true - }, "anymatch": { "version": "3.1.2", "dev": true, @@ -6696,15 +6385,6 @@ "optional": true, "peer": true }, - "bundle-require": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.0.1.tgz", - "integrity": "sha512-9NQkRHlNdNpDBGmLpngF3EFDcwodhMUuLz9PaWYciVcQF9SE4LFjM2DB/xV1Li5JiuDMv7ZUWuC3rGbqR0MAXQ==", - "dev": true, - "requires": { - "load-tsconfig": "^0.2.3" - } - }, "cac": { "version": "6.7.14", "dev": true @@ -6851,10 +6531,6 @@ "delayed-stream": "~1.0.0" } }, - "commander": { - "version": "4.1.1", - "dev": true - }, "concat-map": { "version": "0.0.1", "dev": true @@ -7042,6 +6718,7 @@ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz", "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==", "dev": true, + "peer": true, "requires": { "@esbuild/android-arm": "0.17.18", "@esbuild/android-arm64": "0.17.18", @@ -7267,21 +6944,6 @@ "version": "2.0.3", "dev": true }, - "execa": { - "version": "5.1.1", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, "external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -7447,10 +7109,6 @@ "optional": true, "peer": true }, - "get-stream": { - "version": "6.0.1", - "dev": true - }, "glob": { "version": "7.1.6", "dev": true, @@ -7618,10 +7276,6 @@ "debug": "4" } }, - "human-signals": { - "version": "2.1.0", - "dev": true - }, "iconv-lite": { "version": "0.6.3", "dev": true, @@ -7754,10 +7408,6 @@ "optional": true, "peer": true }, - "is-stream": { - "version": "2.0.1", - "dev": true - }, "is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -7774,10 +7424,6 @@ "version": "2.0.0", "dev": true }, - "joycon": { - "version": "3.1.1", - "dev": true - }, "js-levenshtein": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", @@ -7907,20 +7553,6 @@ "type-check": "~0.3.2" } }, - "lilconfig": { - "version": "2.0.6", - "dev": true - }, - "lines-and-columns": { - "version": "1.2.4", - "dev": true - }, - "load-tsconfig": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", - "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", - "dev": true - }, "local-pkg": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", @@ -7960,10 +7592,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "lodash.sortby": { - "version": "4.7.0", - "dev": true - }, "log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -8102,15 +7730,6 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, - "mz": { - "version": "2.7.0", - "dev": true, - "requires": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, "nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", @@ -8136,23 +7755,12 @@ "version": "3.0.0", "dev": true }, - "npm-run-path": { - "version": "4.0.1", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, "nwsapi": { "version": "2.2.2", "dev": true, "optional": true, "peer": true }, - "object-assign": { - "version": "4.1.1", - "dev": true - }, "object-inspect": { "version": "1.12.2", "dev": true, @@ -8325,10 +7933,6 @@ "version": "2.3.1", "dev": true }, - "pirates": { - "version": "4.0.5", - "dev": true - }, "pkg-types": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", @@ -8351,14 +7955,6 @@ "source-map-js": "^1.1.0" } }, - "postcss-load-config": { - "version": "3.1.4", - "dev": true, - "requires": { - "lilconfig": "^2.0.5", - "yaml": "^1.10.2" - } - }, "prelude-ls": { "version": "1.1.2", "dev": true, @@ -8472,10 +8068,6 @@ "optional": true, "peer": true }, - "resolve-from": { - "version": "5.0.0", - "dev": true - }, "restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -8499,15 +8091,6 @@ "glob": "^7.1.3" } }, - "rollup": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.1.tgz", - "integrity": "sha512-tywOR+rwIt5m2ZAWSe5AIJcTat8vGlnPFAv15ycCrw33t6iFsXZ6mzHVFh2psSjxQPmI+xgzMZZizUAukBI4aQ==", - "dev": true, - "requires": { - "fsevents": "~2.3.2" - } - }, "run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -8655,10 +8238,6 @@ "ansi-regex": "^5.0.1" } }, - "strip-final-newline": { - "version": "2.0.0", - "dev": true - }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -8674,18 +8253,6 @@ "js-tokens": "^8.0.2" } }, - "sucrase": { - "version": "3.27.0", - "dev": true, - "requires": { - "commander": "^4.0.0", - "glob": "7.1.6", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "ts-interface-checker": "^0.1.9" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -8761,20 +8328,6 @@ } } }, - "thenify": { - "version": "3.3.1", - "dev": true, - "requires": { - "any-promise": "^1.0.0" - } - }, - "thenify-all": { - "version": "1.6.0", - "dev": true, - "requires": { - "thenify": ">= 3.1.0 < 4" - } - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -8835,10 +8388,6 @@ "optional": true, "peer": true }, - "tree-kill": { - "version": "1.2.2", - "dev": true - }, "ts-api-utils": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", @@ -8846,10 +8395,6 @@ "dev": true, "requires": {} }, - "ts-interface-checker": { - "version": "0.1.13", - "dev": true - }, "ts-pattern": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-4.0.5.tgz", @@ -8868,57 +8413,6 @@ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, - "tsup": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-6.7.0.tgz", - "integrity": "sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==", - "dev": true, - "requires": { - "bundle-require": "^4.0.0", - "cac": "^6.7.12", - "chokidar": "^3.5.1", - "debug": "^4.3.1", - "esbuild": "^0.17.6", - "execa": "^5.0.0", - "globby": "^11.0.3", - "joycon": "^3.0.1", - "postcss-load-config": "^3.0.1", - "resolve-from": "^5.0.0", - "rollup": "^3.2.5", - "source-map": "0.8.0-beta.0", - "sucrase": "^3.20.3", - "tree-kill": "^1.2.2" - }, - "dependencies": { - "source-map": { - "version": "0.8.0-beta.0", - "dev": true, - "requires": { - "whatwg-url": "^7.0.0" - } - }, - "tr46": { - "version": "1.0.1", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "webidl-conversions": { - "version": "4.0.2", - "dev": true - }, - "whatwg-url": { - "version": "7.1.0", - "dev": true, - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - } - } - }, "type-check": { "version": "0.3.2", "dev": true, @@ -9476,10 +8970,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "yaml": { - "version": "1.10.2", - "dev": true - }, "yargs": { "version": "17.6.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.0.tgz", diff --git a/package.json b/package.json index ea1b709..83298c7 100644 --- a/package.json +++ b/package.json @@ -2,34 +2,17 @@ "name": "@oxide/api", "version": "0.0.1", "description": "The official JavaScript and TypeScript client SDK for interacting with the Oxide API", - "keywords": ["oxide", "oxide.ts", "oxide computer", "oxide sdk"], + "keywords": [ + "oxide", + "oxide.ts", + "oxide computer", + "oxide sdk" + ], "engines": { "node": ">=18" }, - "main": "./dist/Api.js", - "module": "./dist/Api.mjs", - "types": "./dist/Api.d.ts", - "exports": { - ".": { - "require": "./dist/Api.js", - "import": "./dist/Api.mjs", - "types": "./dist/Api.d.ts" - }, - "./validate": { - "require": "./dist/validate.js", - "import": "./dist/validate.mjs", - "types": "./dist/validate.d.ts" - }, - "./msw-handlers": { - "require": "./dist/msw-handlers.js", - "import": "./dist/msw-handlers.mjs", - "types": "./dist/msw-handlers.d.ts" - } - }, - "files": ["client", "!client/type-test.ts", "dist"], "scripts": { - "build": "tsup client/Api.ts client/validate.ts client/msw-handlers.ts --format cjs,esm --dts --clean --no-splitting", - "gen": "./tools/gen.sh $(cat ./OMICRON_VERSION) ./client && npm run build", + "gen": "./tools/gen.sh $(cat ./OMICRON_VERSION) ./client", "gen-from": "./tools/gen.sh", "lint": "eslint .", "postgen": "prettier --parser typescript --write ./client", @@ -56,7 +39,6 @@ "swagger-parser": "^10.0.3", "ts-pattern": "^4.0.5", "tsafe": "^1.1.1", - "tsup": "^6.7.0", "type-fest": "^3.1.0", "typescript": "^5.2.2", "vitest": "^1.4.0", diff --git a/tests/validate-publish.test.ts b/tests/validate-publish.test.ts deleted file mode 100644 index d64a14e..0000000 --- a/tests/validate-publish.test.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * Copyright Oxide Computer Company - */ - -import { test, expect } from "vitest"; -import { exec as execCb } from "child_process"; -import { promisify } from "util"; - -const exec = promisify(execCb); - -test("ensure only desired files are published", async () => { - const { stderr } = await exec("npm publish --dry-run"); - const packageLog = stderr - .split("\n") - .map((l) => l.replace("npm notice", "").trim()) - .filter((l) => l.match(/^\d+/)) - .map((l) => l.match(/.*\s+(.*)/)?.[1]) - .sort((a, b) => a!.localeCompare(b!)); - - // This list includes all the files that should be included in the publish. - // If this test fails and you've added a new file you should update this list - // if it should be included in the npm package or update the .npmignore file - // to exclude it. - expect(packageLog).toMatchInlineSnapshot(` - [ - "client/Api.ts", - "client/http-client.ts", - "client/msw-handlers.ts", - "client/util.ts", - "client/validate.ts", - "dist/Api.d.ts", - "dist/Api.js", - "dist/Api.mjs", - "dist/msw-handlers.d.ts", - "dist/msw-handlers.js", - "dist/msw-handlers.mjs", - "dist/validate.d.ts", - "dist/validate.js", - "dist/validate.mjs", - "LICENSE", - "package.json", - "README.md", - ] - `); -});