@prisma/composer-prisma-cloud 0.1.0-dev.1
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/LICENSE +201 -0
- package/dist/control.d.mts +53 -0
- package/dist/control.mjs +2031 -0
- package/dist/control.mjs.map +1 -0
- package/dist/cron/index.d.mts +99 -0
- package/dist/cron/index.mjs +392 -0
- package/dist/cron/index.mjs.map +1 -0
- package/dist/cron/scheduler-entrypoint.mjs +7769 -0
- package/dist/cron/scheduler-entrypoint.mjs.map +1 -0
- package/dist/cron/scheduler-service.mjs +318 -0
- package/dist/cron/scheduler-service.mjs.map +1 -0
- package/dist/index.d.mts +205 -0
- package/dist/index.mjs +182 -0
- package/dist/index.mjs.map +1 -0
- package/dist/param-DB0B8m15-IvzNq9BM.mjs +92 -0
- package/dist/param-DB0B8m15-IvzNq9BM.mjs.map +1 -0
- package/dist/prisma-next-COrwlg3N.mjs +176 -0
- package/dist/prisma-next-COrwlg3N.mjs.map +1 -0
- package/dist/prisma-next.d.mts +71 -0
- package/dist/prisma-next.mjs +2 -0
- package/dist/serializer-DAEWRfnm-D3GW9dOZ.mjs +235 -0
- package/dist/serializer-DAEWRfnm-D3GW9dOZ.mjs.map +1 -0
- package/dist/storage/index.d.mts +55 -0
- package/dist/storage/index.mjs +411 -0
- package/dist/storage/index.mjs.map +1 -0
- package/dist/storage/storage-entrypoint.mjs +1173 -0
- package/dist/storage/storage-entrypoint.mjs.map +1 -0
- package/dist/storage/storage-service.mjs +377 -0
- package/dist/storage/storage-service.mjs.map +1 -0
- package/dist/storage/testing.d.mts +85 -0
- package/dist/storage/testing.mjs +531 -0
- package/dist/storage/testing.mjs.map +1 -0
- package/dist/streams/index.d.mts +47 -0
- package/dist/streams/index.mjs +450 -0
- package/dist/streams/index.mjs.map +1 -0
- package/dist/streams/streams-entrypoint.mjs +40575 -0
- package/dist/streams/streams-entrypoint.mjs.map +1 -0
- package/dist/streams/streams-service.mjs +424 -0
- package/dist/streams/streams-service.mjs.map +1 -0
- package/dist/streams/testing.d.mts +33 -0
- package/dist/streams/testing.mjs +31335 -0
- package/dist/streams/testing.mjs.map +1 -0
- package/dist/testing.d.mts +25 -0
- package/dist/testing.mjs +32 -0
- package/dist/testing.mjs.map +1 -0
- package/package.json +74 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Config, Deps, Expose, Params, RunnableServiceNode } from "@prisma/composer";
|
|
2
|
+
//#region ../../1-prisma-cloud/1-extensions/target/dist/testing.d.mts
|
|
3
|
+
//#region src/testing.d.ts
|
|
4
|
+
/** What `bootstrapService` hands back: a live, driveable instance of the booted entry. */
|
|
5
|
+
interface BootstrappedService {
|
|
6
|
+
readonly url: string;
|
|
7
|
+
readonly fetch: typeof fetch;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Boots `service`'s real entry against `config`, in-process. By default the
|
|
11
|
+
* entry is `service.build.entry` resolved against `service.build.module` —
|
|
12
|
+
* exactly how the printed deploy bootstrap imports it (see `@internal/lowering`'s
|
|
13
|
+
* artifact.ts) — which fits a build adapter whose `entry` is a plain
|
|
14
|
+
* module-relative path (`@prisma/composer/node`'s). A build adapter whose bootable
|
|
15
|
+
* path isn't module-relative (`@prisma/composer/nextjs`'s standalone output)
|
|
16
|
+
* supplies its own `boot` thunk; the target owns that resolution.
|
|
17
|
+
*
|
|
18
|
+
* `config.service.port` must be concrete — the entry self-listens and never
|
|
19
|
+
* reports an OS-assigned port back. No `close()`: teardown rides bun-test's
|
|
20
|
+
* per-file process isolation (H3's resolved decision).
|
|
21
|
+
*/
|
|
22
|
+
declare function bootstrapService<D extends Deps, P extends Params, E extends Expose>(service: RunnableServiceNode<D, P, E>, config: Config, boot?: () => Promise<void>): Promise<BootstrappedService>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { BootstrappedService, bootstrapService };
|
|
25
|
+
//# sourceMappingURL=testing.d.mts.map
|
package/dist/testing.mjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { u as stash } from "./serializer-DAEWRfnm-D3GW9dOZ.mjs";
|
|
2
|
+
//#region ../../1-prisma-cloud/1-extensions/target/dist/testing.mjs
|
|
3
|
+
/**
|
|
4
|
+
* Boots `service`'s real entry against `config`, in-process. By default the
|
|
5
|
+
* entry is `service.build.entry` resolved against `service.build.module` —
|
|
6
|
+
* exactly how the printed deploy bootstrap imports it (see `@internal/lowering`'s
|
|
7
|
+
* artifact.ts) — which fits a build adapter whose `entry` is a plain
|
|
8
|
+
* module-relative path (`@prisma/composer/node`'s). A build adapter whose bootable
|
|
9
|
+
* path isn't module-relative (`@prisma/composer/nextjs`'s standalone output)
|
|
10
|
+
* supplies its own `boot` thunk; the target owns that resolution.
|
|
11
|
+
*
|
|
12
|
+
* `config.service.port` must be concrete — the entry self-listens and never
|
|
13
|
+
* reports an OS-assigned port back. No `close()`: teardown rides bun-test's
|
|
14
|
+
* per-file process isolation (H3's resolved decision).
|
|
15
|
+
*/
|
|
16
|
+
async function bootstrapService(service, config, boot) {
|
|
17
|
+
const port = config.service["port"];
|
|
18
|
+
if (typeof port !== "number") throw new Error("bootstrapService(): config.service.port must be a concrete port number — the booted entry self-listens with no way to report an OS-assigned one back to the caller.");
|
|
19
|
+
const bootEntry = boot ?? (async () => {
|
|
20
|
+
await import(new URL(service.build.entry, service.build.module).href);
|
|
21
|
+
});
|
|
22
|
+
stash(service, config);
|
|
23
|
+
await bootEntry();
|
|
24
|
+
return {
|
|
25
|
+
url: `http://localhost:${port}/`,
|
|
26
|
+
fetch
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { bootstrapService };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=testing.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.mjs","names":[],"sources":["../../../1-prisma-cloud/1-extensions/target/dist/testing.mjs"],"sourcesContent":["import { c as stash } from \"./serializer-DAEWRfnm.mjs\";\n//#region src/testing.ts\n/**\n* Boots `service`'s real entry against `config`, in-process. By default the\n* entry is `service.build.entry` resolved against `service.build.module` —\n* exactly how the printed deploy bootstrap imports it (see `@internal/lowering`'s\n* artifact.ts) — which fits a build adapter whose `entry` is a plain\n* module-relative path (`@prisma/composer/node`'s). A build adapter whose bootable\n* path isn't module-relative (`@prisma/composer/nextjs`'s standalone output)\n* supplies its own `boot` thunk; the target owns that resolution.\n*\n* `config.service.port` must be concrete — the entry self-listens and never\n* reports an OS-assigned port back. No `close()`: teardown rides bun-test's\n* per-file process isolation (H3's resolved decision).\n*/\nasync function bootstrapService(service, config, boot) {\n\tconst port = config.service[\"port\"];\n\tif (typeof port !== \"number\") throw new Error(\"bootstrapService(): config.service.port must be a concrete port number — the booted entry self-listens with no way to report an OS-assigned one back to the caller.\");\n\tconst bootEntry = boot ?? (async () => {\n\t\tawait import(new URL(service.build.entry, service.build.module).href);\n\t});\n\tstash(service, config);\n\tawait bootEntry();\n\treturn {\n\t\turl: `http://localhost:${port}/`,\n\t\tfetch\n\t};\n}\n//#endregion\nexport { bootstrapService };\n\n//# sourceMappingURL=testing.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,eAAe,iBAAiB,SAAS,QAAQ,MAAM;CACtD,MAAM,OAAO,OAAO,QAAQ;CAC5B,IAAI,OAAO,SAAS,UAAU,MAAM,IAAI,MAAM,qKAAqK;CACnN,MAAM,YAAY,SAAS,YAAY;EACtC,MAAM,OAAO,IAAI,IAAI,QAAQ,MAAM,OAAO,QAAQ,MAAM,MAAM,CAAC,CAAC;CACjE;CACA,MAAM,SAAS,MAAM;CACrB,MAAM,UAAU;CAChB,OAAO;EACN,KAAK,oBAAoB,KAAK;EAC9B;CACD;AACD"}
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@prisma/composer-prisma-cloud",
|
|
3
|
+
"version": "0.1.0-dev.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "The Prisma Cloud target for Prisma Composer: compute(), postgres(), the target extension, and first-party modules realized on Prisma Cloud (cron).",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./dist/index.mjs",
|
|
8
|
+
"./control": "./dist/control.mjs",
|
|
9
|
+
"./prisma-next": "./dist/prisma-next.mjs",
|
|
10
|
+
"./testing": "./dist/testing.mjs",
|
|
11
|
+
"./cron": "./dist/cron/index.mjs",
|
|
12
|
+
"./cron/scheduler-entrypoint": "./dist/cron/scheduler-entrypoint.mjs",
|
|
13
|
+
"./storage": "./dist/storage/index.mjs",
|
|
14
|
+
"./storage/storage-entrypoint": "./dist/storage/storage-entrypoint.mjs",
|
|
15
|
+
"./storage/testing": "./dist/storage/testing.mjs",
|
|
16
|
+
"./streams": "./dist/streams/index.mjs",
|
|
17
|
+
"./streams/streams-entrypoint": "./dist/streams/streams-entrypoint.mjs",
|
|
18
|
+
"./streams/testing": "./dist/streams/testing.mjs",
|
|
19
|
+
"./package.json": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@prisma-next/cli": "0.15.0",
|
|
26
|
+
"@prisma-next/config-loader": "0.15.0",
|
|
27
|
+
"@prisma-next/contract": "0.15.0",
|
|
28
|
+
"@prisma-next/migration-tools": "0.15.0",
|
|
29
|
+
"@prisma-next/postgres": "0.15.0",
|
|
30
|
+
"@prisma-next/sql-contract": "0.15.0",
|
|
31
|
+
"@prisma/composer": "0.1.0-dev.1",
|
|
32
|
+
"@prisma/management-api-sdk": "^1.47.0",
|
|
33
|
+
"@standard-schema/spec": "^1.1.0",
|
|
34
|
+
"alchemy": "2.0.0-beta.59",
|
|
35
|
+
"arktype": "^2.2.3",
|
|
36
|
+
"effect": "4.0.0-beta.93",
|
|
37
|
+
"pathe": "^2.0.3",
|
|
38
|
+
"pg": "8.22.0",
|
|
39
|
+
"postgres": "^3.4.9",
|
|
40
|
+
"tsdown": "^0.22.4"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@internal/core": "0.1.0-dev.1",
|
|
44
|
+
"@internal/cron": "0.1.0-dev.1",
|
|
45
|
+
"@internal/foundation": "0.1.0-dev.1",
|
|
46
|
+
"@internal/lowering": "0.1.0-dev.1",
|
|
47
|
+
"@internal/nextjs": "0.1.0-dev.1",
|
|
48
|
+
"@internal/node": "0.1.0-dev.1",
|
|
49
|
+
"@internal/prisma-cloud": "0.1.0-dev.1",
|
|
50
|
+
"@internal/rpc": "0.1.0-dev.1",
|
|
51
|
+
"@internal/storage": "0.1.0-dev.1",
|
|
52
|
+
"@internal/streams": "0.1.0-dev.1",
|
|
53
|
+
"@internal/tsdown-config": "0.1.0-dev.1",
|
|
54
|
+
"@types/node": "^25.9.3",
|
|
55
|
+
"typescript": "^6.0.3"
|
|
56
|
+
},
|
|
57
|
+
"license": "Apache-2.0",
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "https://github.com/prisma/composer.git",
|
|
61
|
+
"directory": "packages/9-public/composer-prisma-cloud"
|
|
62
|
+
},
|
|
63
|
+
"engines": {
|
|
64
|
+
"node": ">=24"
|
|
65
|
+
},
|
|
66
|
+
"publishConfig": {
|
|
67
|
+
"access": "public"
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"build": "tsdown && node scripts/rewrite-internal-dts.mjs",
|
|
71
|
+
"clean": "rm -rf dist",
|
|
72
|
+
"typecheck": "tsc --noEmit"
|
|
73
|
+
}
|
|
74
|
+
}
|