kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
feat: transpile public packages using tsup
rodzic
0a546de69b
commit
cc28811595
|
@ -17,6 +17,8 @@
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "tsup",
|
||||||
|
"clean": "del dist",
|
||||||
"test": "run-s test:*",
|
"test": "run-s test:*",
|
||||||
"test:typecheck": "tsc --noEmit"
|
"test:typecheck": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
@ -29,6 +31,17 @@
|
||||||
"type-fest": "catalog:"
|
"type-fest": "catalog:"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public",
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"exports": {
|
||||||
|
"types": "./dist/index.ts",
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"import": "./dist/index.js",
|
||||||
|
"default": "./dist/index.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "tsup",
|
||||||
|
"clean": "del dist",
|
||||||
"test": "run-s test:*",
|
"test": "run-s test:*",
|
||||||
"test:typecheck": "tsc --noEmit"
|
"test:typecheck": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
import { AgenticApiClient } from '@agentic/platform-api-client'
|
import { AgenticApiClient } from '@agentic/platform-api-client'
|
||||||
import { Command } from 'commander'
|
import { Command } from 'commander'
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { defineConfig } from 'tsup'
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
{
|
||||||
|
entry: ['src/cli.ts'],
|
||||||
|
outDir: 'dist',
|
||||||
|
target: 'node18',
|
||||||
|
platform: 'node',
|
||||||
|
format: ['esm'],
|
||||||
|
splitting: false,
|
||||||
|
sourcemap: true,
|
||||||
|
minify: false,
|
||||||
|
shims: true,
|
||||||
|
dts: true
|
||||||
|
}
|
||||||
|
])
|
|
@ -17,6 +17,8 @@
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "tsup",
|
||||||
|
"clean": "del dist",
|
||||||
"test": "run-s test:*",
|
"test": "run-s test:*",
|
||||||
"test:typecheck": "tsc --noEmit",
|
"test:typecheck": "tsc --noEmit",
|
||||||
"test:unit": "vitest run"
|
"test:unit": "vitest run"
|
||||||
|
@ -31,6 +33,17 @@
|
||||||
"zod-validation-error": "catalog:"
|
"zod-validation-error": "catalog:"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public",
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"exports": {
|
||||||
|
"types": "./dist/index.ts",
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"import": "./dist/index.js",
|
||||||
|
"default": "./dist/index.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,8 @@ export function getRateLimitHeaders(
|
||||||
const remainingString = remaining.toString()
|
const remainingString = remaining.toString()
|
||||||
const resetTimeString = resetTimeSeconds.toString()
|
const resetTimeString = resetTimeSeconds.toString()
|
||||||
|
|
||||||
// NOTE: Cloudflare and/or origin servers like to set the x- headers, which
|
// NOTE: Cloudflare and/or origin servers may set the x- headers, which can
|
||||||
// can be pretty confusing since the end user gets both ratelimit headers.
|
// be pretty confusing since the end user gets both ratelimit headers.
|
||||||
// I'm hesitant to remove any extra origin headers, since they're a nice
|
// I'm hesitant to remove any extra origin headers, since they're a nice
|
||||||
// escape hatch for sending extra metadata, and the origin may in fact have
|
// escape hatch for sending extra metadata, and the origin may in fact have
|
||||||
// its own separate rate-limiting policy, which we don't necessarily want to
|
// its own separate rate-limiting policy, which we don't necessarily want to
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@agentic/platform-emails",
|
"name": "@agentic/platform-emails",
|
||||||
|
"private": true,
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "Email templates for the Agentic platform.",
|
"description": "Email templates for the Agentic platform.",
|
||||||
"author": "Travis Fischer <travis@transitivebullsh.it>",
|
"author": "Travis Fischer <travis@transitivebullsh.it>",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@agentic/platform-hono",
|
"name": "@agentic/platform-hono",
|
||||||
|
"private": true,
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "Shared Hono utilities for the Agentic platform.",
|
"description": "Shared Hono utilities for the Agentic platform.",
|
||||||
"author": "Travis Fischer <travis@transitivebullsh.it>",
|
"author": "Travis Fischer <travis@transitivebullsh.it>",
|
||||||
|
|
|
@ -2,16 +2,6 @@
|
||||||
"name": "@agentic/json-schema",
|
"name": "@agentic/json-schema",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "A JSON schema validator that will run on Cloudflare workers. Supports drafts 4, 7, 2019-09, and 2020-12.",
|
"description": "A JSON schema validator that will run on Cloudflare workers. Supports drafts 4, 7, 2019-09, and 2020-12.",
|
||||||
"keywords": [
|
|
||||||
"json-schema",
|
|
||||||
"jsonschema",
|
|
||||||
"json",
|
|
||||||
"schema",
|
|
||||||
"cloudflare",
|
|
||||||
"worker",
|
|
||||||
"workers",
|
|
||||||
"service-worker"
|
|
||||||
],
|
|
||||||
"authors": [
|
"authors": [
|
||||||
"Jeremy Danyow <jdanyow@gmail.com>",
|
"Jeremy Danyow <jdanyow@gmail.com>",
|
||||||
"Travis Fischer <travis@transitivebullsh.it>"
|
"Travis Fischer <travis@transitivebullsh.it>"
|
||||||
|
@ -30,6 +20,8 @@
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "tsup",
|
||||||
|
"clean": "del dist",
|
||||||
"test": "run-s test:*",
|
"test": "run-s test:*",
|
||||||
"test:typecheck": "tsc --noEmit",
|
"test:typecheck": "tsc --noEmit",
|
||||||
"test:unit": "vitest run"
|
"test:unit": "vitest run"
|
||||||
|
@ -38,6 +30,27 @@
|
||||||
"json-schema-test-suite": "github:json-schema-org/JSON-Schema-Test-Suite#76b529f"
|
"json-schema-test-suite": "github:json-schema-org/JSON-Schema-Test-Suite#76b529f"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public",
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"exports": {
|
||||||
|
"types": "./dist/index.ts",
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"import": "./dist/index.js",
|
||||||
|
"default": "./dist/index.js"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"json-schema",
|
||||||
|
"jsonschema",
|
||||||
|
"json",
|
||||||
|
"schema",
|
||||||
|
"cloudflare",
|
||||||
|
"worker",
|
||||||
|
"workers",
|
||||||
|
"service-worker"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "tsup",
|
||||||
|
"clean": "del dist",
|
||||||
"test": "run-s test:*",
|
"test": "run-s test:*",
|
||||||
"test:typecheck": "tsc --noEmit",
|
"test:typecheck": "tsc --noEmit",
|
||||||
"test:unit": "vitest run"
|
"test:unit": "vitest run"
|
||||||
|
@ -33,11 +35,22 @@
|
||||||
"fast-uri": "catalog:",
|
"fast-uri": "catalog:",
|
||||||
"plur": "catalog:"
|
"plur": "catalog:"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@hono/node-server": "catalog:",
|
"@hono/node-server": "catalog:",
|
||||||
"hono": "catalog:"
|
"hono": "catalog:"
|
||||||
|
},
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public",
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"exports": {
|
||||||
|
"types": "./dist/index.ts",
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"import": "./dist/index.js",
|
||||||
|
"default": "./dist/index.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "tsup",
|
||||||
|
"clean": "del dist",
|
||||||
"test": "run-s test:*",
|
"test": "run-s test:*",
|
||||||
"test:typecheck": "tsc --noEmit",
|
"test:typecheck": "tsc --noEmit",
|
||||||
"test:unit": "vitest run"
|
"test:unit": "vitest run"
|
||||||
|
@ -35,6 +37,17 @@
|
||||||
"@types/semver": "catalog:"
|
"@types/semver": "catalog:"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public",
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"exports": {
|
||||||
|
"types": "./dist/index.ts",
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"import": "./dist/index.js",
|
||||||
|
"default": "./dist/index.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "tsup",
|
||||||
|
"clean": "del dist",
|
||||||
"test": "run-s test:*",
|
"test": "run-s test:*",
|
||||||
"test:typecheck": "tsc --noEmit"
|
"test:typecheck": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
@ -27,5 +29,19 @@
|
||||||
"@agentic/platform-types": "workspace:*",
|
"@agentic/platform-types": "workspace:*",
|
||||||
"@agentic/platform-validators": "workspace:*",
|
"@agentic/platform-validators": "workspace:*",
|
||||||
"ky": "catalog:"
|
"ky": "catalog:"
|
||||||
|
},
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public",
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"exports": {
|
||||||
|
"types": "./dist/index.ts",
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"import": "./dist/index.js",
|
||||||
|
"default": "./dist/index.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"generate": "openapi-typescript http://localhost:3001/docs --output ./src/openapi.d.ts",
|
"generate": "openapi-typescript http://localhost:3001/docs --output ./src/openapi.d.ts",
|
||||||
|
"build": "tsup",
|
||||||
|
"clean": "del dist",
|
||||||
"test": "run-s test:*",
|
"test": "run-s test:*",
|
||||||
"test:typecheck": "tsc --noEmit",
|
"test:typecheck": "tsc --noEmit",
|
||||||
"test:unit": "vitest run"
|
"test:unit": "vitest run"
|
||||||
|
@ -36,6 +38,17 @@
|
||||||
"zod-to-json-schema": "catalog:"
|
"zod-to-json-schema": "catalog:"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public",
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"exports": {
|
||||||
|
"types": "./dist/index.ts",
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"import": "./dist/index.js",
|
||||||
|
"default": "./dist/index.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "tsup",
|
||||||
|
"clean": "del dist",
|
||||||
"test": "run-s test:*",
|
"test": "run-s test:*",
|
||||||
"test:typecheck": "tsc --noEmit",
|
"test:typecheck": "tsc --noEmit",
|
||||||
"test:unit": "vitest run"
|
"test:unit": "vitest run"
|
||||||
|
@ -26,5 +28,19 @@
|
||||||
"@paralleldrive/cuid2": "catalog:",
|
"@paralleldrive/cuid2": "catalog:",
|
||||||
"email-validator": "catalog:",
|
"email-validator": "catalog:",
|
||||||
"type-fest": "catalog:"
|
"type-fest": "catalog:"
|
||||||
|
},
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public",
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"exports": {
|
||||||
|
"types": "./dist/index.ts",
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"import": "./dist/index.js",
|
||||||
|
"default": "./dist/index.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
- may need to update our `drizzle-orm` fork
|
- may need to update our `drizzle-orm` fork
|
||||||
- simplify `AgenticToolClient` and only require one package per TS LLM SDK
|
- simplify `AgenticToolClient` and only require one package per TS LLM SDK
|
||||||
- `createAISDKToolsFromIdentifier(projectIdentifier)`
|
- `createAISDKToolsFromIdentifier(projectIdentifier)`
|
||||||
|
- how to have internal packages reference TS source and publish to npm with compiled JS?
|
||||||
|
- also publish to JSR?
|
||||||
|
|
||||||
## TODO: Post-MVP
|
## TODO: Post-MVP
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"extends": "@fisch0920/config/tsconfig-node",
|
||||||
|
"include": ["*.config.ts"],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { defineConfig } from 'tsup'
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
{
|
||||||
|
entry: ['src/index.ts'],
|
||||||
|
outDir: 'dist',
|
||||||
|
target: 'node18',
|
||||||
|
platform: 'node',
|
||||||
|
format: ['esm'],
|
||||||
|
splitting: false,
|
||||||
|
sourcemap: true,
|
||||||
|
minify: false,
|
||||||
|
shims: true,
|
||||||
|
dts: true
|
||||||
|
}
|
||||||
|
])
|
Ładowanie…
Reference in New Issue