@collective-intelligence/external-apps-server-sdk 0.1.36 → 0.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +120 -11
- package/dist/chunks/index-zrrnrqkm.js +17 -0
- package/dist/effect.d.ts +1352 -0
- package/dist/effect.js +1 -0
- package/dist/express.d.ts +66 -500
- package/dist/gateway/contracts.d.ts +67 -500
- package/dist/gateway.d.ts +76 -503
- package/dist/gateway.js +1 -2
- package/dist/index.d.ts +89 -53
- package/dist/index.js +1 -16
- package/dist/knowledge-sources/payload.d.ts +31 -187
- package/dist/knowledge-sources/strapi.d.ts +31 -187
- package/dist/next.d.ts +358 -0
- package/dist/next.js +1 -0
- package/dist/persistence/drizzle-effect.d.ts +23 -4
- package/dist/persistence/drizzle.d.ts +51 -196
- package/dist/persistence/drizzle.js +1 -9
- package/dist/resources.d.ts +45 -274
- package/dist/resources.js +4 -11
- package/dist/runtime/effect.d.ts +141 -787
- package/dist/runtime/express.d.ts +66 -500
- package/dist/runtime/nestjs.d.ts +82 -599
- package/dist/runtime/nestjs.js +1 -8
- package/dist/runtime/next.d.ts +130 -606
- package/dist/runtime/web.d.ts +78 -505
- package/dist/runtime/web.js +1 -8
- package/dist/tools/ai-sdk.d.ts +19 -110
- package/dist/tools/ai-sdk.js +1 -2
- package/package.json +26 -14
- package/dist/persistence/drizzle-effect.js +0 -1
- package/dist/runtime/effect.js +0 -16
- package/dist/runtime/next.js +0 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@collective-intelligence/external-apps-server-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.38",
|
|
4
4
|
"description": "Server-side client and proxy adapters for Collective Intelligence external applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -17,6 +17,18 @@
|
|
|
17
17
|
"import": "./dist/index.js",
|
|
18
18
|
"default": "./dist/index.js"
|
|
19
19
|
},
|
|
20
|
+
"./effect": {
|
|
21
|
+
"ci-source": "./src/entrypoints/effect.ts",
|
|
22
|
+
"types": "./dist/effect.d.ts",
|
|
23
|
+
"import": "./dist/effect.js",
|
|
24
|
+
"default": "./dist/effect.js"
|
|
25
|
+
},
|
|
26
|
+
"./next": {
|
|
27
|
+
"ci-source": "./src/entrypoints/next.ts",
|
|
28
|
+
"types": "./dist/next.d.ts",
|
|
29
|
+
"import": "./dist/next.js",
|
|
30
|
+
"default": "./dist/next.js"
|
|
31
|
+
},
|
|
20
32
|
"./admin": {
|
|
21
33
|
"ci-source": "./src/entrypoints/admin.ts",
|
|
22
34
|
"types": "./dist/admin.d.ts",
|
|
@@ -56,8 +68,8 @@
|
|
|
56
68
|
"./persistence/drizzle/effect": {
|
|
57
69
|
"ci-source": "./src/entrypoints/persistence/drizzle-effect.ts",
|
|
58
70
|
"types": "./dist/persistence/drizzle-effect.d.ts",
|
|
59
|
-
"import": "./dist/
|
|
60
|
-
"default": "./dist/
|
|
71
|
+
"import": "./dist/effect.js",
|
|
72
|
+
"default": "./dist/effect.js"
|
|
61
73
|
},
|
|
62
74
|
"./knowledge-sources/payload": {
|
|
63
75
|
"ci-source": "./src/entrypoints/knowledge-sources/payload.ts",
|
|
@@ -92,14 +104,14 @@
|
|
|
92
104
|
"./runtime/next": {
|
|
93
105
|
"ci-source": "./src/entrypoints/runtime/next.ts",
|
|
94
106
|
"types": "./dist/runtime/next.d.ts",
|
|
95
|
-
"import": "./dist/
|
|
96
|
-
"default": "./dist/
|
|
107
|
+
"import": "./dist/next.js",
|
|
108
|
+
"default": "./dist/next.js"
|
|
97
109
|
},
|
|
98
110
|
"./runtime/effect": {
|
|
99
111
|
"ci-source": "./src/entrypoints/runtime/effect.ts",
|
|
100
112
|
"types": "./dist/runtime/effect.d.ts",
|
|
101
|
-
"import": "./dist/
|
|
102
|
-
"default": "./dist/
|
|
113
|
+
"import": "./dist/effect.js",
|
|
114
|
+
"default": "./dist/effect.js"
|
|
103
115
|
},
|
|
104
116
|
"./gateway/contracts": {
|
|
105
117
|
"ci-source": "./src/entrypoints/gateway/contracts.ts",
|
|
@@ -130,16 +142,19 @@
|
|
|
130
142
|
"test": "bun tools/test-postgres.ts && bun tools/test-pack.ts",
|
|
131
143
|
"test:pack": "bun tools/test-pack.ts",
|
|
132
144
|
"test:unit": "bun tools/test-postgres.ts",
|
|
145
|
+
"test:properties": "vitest run --config vitest.config.ts",
|
|
133
146
|
"format": "oxfmt --write .",
|
|
134
147
|
"format:check": "oxfmt --check .",
|
|
135
148
|
"format:check:staged": "oxfmt --check",
|
|
136
149
|
"lint": "node \"../../../.agents/scripts/managed-lint-runner.mjs\" --scope \"packages/public/external-apps-server-sdk\"",
|
|
137
150
|
"lint:staged": "oxlint --no-error-on-unmatched-pattern",
|
|
138
151
|
"prepack": "bun run build",
|
|
139
|
-
"type-check": "bun check",
|
|
152
|
+
"type-check": "bun check && bun check -p tsconfig.type-tests.json",
|
|
140
153
|
"test:postgres": "bun tools/test-postgres.ts src/adapters/persistence/drizzle"
|
|
141
154
|
},
|
|
142
155
|
"dependencies": {
|
|
156
|
+
"@collective-intelligence/extensions-sdk": "0.1.31",
|
|
157
|
+
"@collective-intelligence/external-apps-client-sdk": "0.1.37",
|
|
143
158
|
"ajv": "8.20.0",
|
|
144
159
|
"ajv-formats": "3.0.1",
|
|
145
160
|
"jose": "6.2.9"
|
|
@@ -172,9 +187,6 @@
|
|
|
172
187
|
"drizzle-orm": {
|
|
173
188
|
"optional": true
|
|
174
189
|
},
|
|
175
|
-
"effect": {
|
|
176
|
-
"optional": true
|
|
177
|
-
},
|
|
178
190
|
"express": {
|
|
179
191
|
"optional": true
|
|
180
192
|
},
|
|
@@ -205,9 +217,8 @@
|
|
|
205
217
|
},
|
|
206
218
|
"devDependencies": {
|
|
207
219
|
"@ai-sdk/provider-utils": "5.0.54",
|
|
208
|
-
"@collective-intelligence/extensions-sdk": "0.1.29",
|
|
209
|
-
"@collective-intelligence/external-apps-client-sdk": "0.1.35",
|
|
210
220
|
"@effect/eslint-plugin": "latest",
|
|
221
|
+
"@effect/vitest": "4.1.0",
|
|
211
222
|
"@nestjs/common": "11.2.4",
|
|
212
223
|
"@nestjs/core": "11.2.4",
|
|
213
224
|
"@nestjs/platform-express": "11.2.4",
|
|
@@ -239,7 +250,8 @@
|
|
|
239
250
|
"rxjs": "7.8.2",
|
|
240
251
|
"typescript": "5.9.3",
|
|
241
252
|
"ultracite": "7.10.7",
|
|
253
|
+
"vitest": "5.0.2",
|
|
242
254
|
"zod": "4.4.3"
|
|
243
255
|
},
|
|
244
|
-
"gitHead": "
|
|
256
|
+
"gitHead": "b46c00d8ce76db49b810e7a3f25933ace4f2252f"
|
|
245
257
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __defProp=Object.defineProperty;var __returnValue=(v)=>v;function __exportSetter(name,newValue){this[name]=__returnValue.bind(null,newValue)}var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true,configurable:true,set:__exportSetter.bind(all,name)})};var exports_drizzle_effect={};__export(exports_drizzle_effect,{DrizzlePostgres:()=>DrizzlePostgres,DrizzlePostgresInitializationError:()=>DrizzlePostgresInitializationError,layerFromDatabase:()=>layerFromDatabase,layerNodePostgres:()=>layerNodePostgres});import{drizzle}from"drizzle-orm/node-postgres";import*as Context from"effect/Context";import*as Effect from"effect/Effect";import*as Layer from"effect/Layer";import{Pool}from"pg";import*as Schema from"effect/Schema";class DrizzlePostgresInitializationError extends Schema.TaggedError()("DrizzlePostgresInitializationError",{cause:Schema.Defect()}){}var makeDatabase=(pool)=>drizzle({client:pool});class DrizzlePostgres extends Context.Service()("@collective-intelligence/external-apps-server-sdk/DrizzlePostgres"){}var layerFromDatabase=(value)=>Layer.succeed(DrizzlePostgres,value);var layerNodePostgres=(options)=>Layer.effect(DrizzlePostgres,Effect.acquireRelease(Effect.sync(()=>new Pool(options.connection)),(pool)=>Effect.promise(async()=>{await pool.end()})).pipe(Effect.flatMap((pool)=>{const value=DrizzlePostgres.of({database:makeDatabase(pool),pool});const{migrate}=options;return migrate===undefined?Effect.succeed(value):Effect.tryPromise({catch:(cause)=>new DrizzlePostgresInitializationError({cause}),try:migrate.bind(undefined,value)}).pipe(Effect.as(value))})));var{DrizzlePostgres:DrizzlePostgres2,DrizzlePostgresInitializationError:DrizzlePostgresInitializationError2,layerFromDatabase:layerFromDatabase2,layerNodePostgres:layerNodePostgres2}=exports_drizzle_effect;export{DrizzlePostgres2 as DrizzlePostgres,DrizzlePostgresInitializationError2 as DrizzlePostgresInitializationError,layerFromDatabase2 as layerFromDatabase,layerNodePostgres2 as layerNodePostgres};
|