mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-19 21:00:40 +08:00
configure shared backend package for npm publishing
This commit is contained in:
parent
47b9a3a431
commit
ff0c5cf6f4
@ -1,19 +1,39 @@
|
||||
{
|
||||
"name": "@hexclave/shared-backend",
|
||||
"version": "1.0.17",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"repository": "https://github.com/hexclave/hexclave",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./config-agent": "./src/config-agent.ts"
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"require": {
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"default": "./dist/esm/index.js"
|
||||
},
|
||||
"./config-agent": {
|
||||
"types": "./dist/config-agent.d.ts",
|
||||
"require": {
|
||||
"default": "./dist/config-agent.js"
|
||||
},
|
||||
"default": "./dist/esm/config-agent.js"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rimraf dist && tsdown",
|
||||
"clean": "rimraf dist && rimraf node_modules",
|
||||
"dev": "tsdown --watch",
|
||||
"lint": "eslint --ext .tsx,.ts .",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"src",
|
||||
"CHANGELOG.md",
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@anthropic-ai/claude-agent-sdk": "^0.2.73",
|
||||
"@hexclave/shared": "workspace:*",
|
||||
|
||||
@ -330,11 +330,7 @@ function getRelativeImportSpecifiers(content: string): string[] {
|
||||
const importPattern = /\bimport\b(?:[^'"]*?\bfrom\s*)?["'](\.{1,2}\/[^"']+)["']/g;
|
||||
let match: RegExpExecArray | null;
|
||||
while ((match = importPattern.exec(content)) !== null) {
|
||||
const specifier = match[1];
|
||||
if (specifier == null) {
|
||||
throw new Error("Import specifier regex matched without a capture group.");
|
||||
}
|
||||
specifiers.push(specifier);
|
||||
specifiers.push(match[1]);
|
||||
}
|
||||
return specifiers;
|
||||
}
|
||||
|
||||
3
packages/shared-backend/tsdown.config.ts
Normal file
3
packages/shared-backend/tsdown.config.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import createJsLibraryTsupConfig from '../../configs/tsdown/js-library.ts';
|
||||
|
||||
export default createJsLibraryTsupConfig({});
|
||||
Loading…
Reference in New Issue
Block a user