@astrale-os/adapter-cloudflare 0.5.0-beta.87 → 0.5.0-beta.89
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/CHANGELOG.md +28 -0
- package/dist/build/worker/codegen/service.d.ts +2 -0
- package/dist/build/worker/codegen/service.js +1 -0
- package/dist/build/worker/execution.prepare.js +3 -0
- package/dist/development/develop.js +3 -0
- package/dist/params.d.ts +7 -0
- package/dist/worker/entry.d.ts +2 -1
- package/dist/worker/entry.js +3 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.0-beta.89](https://github.com/astrale-os/sdk/compare/adapter-cloudflare-v0.5.0-beta.88...adapter-cloudflare-v0.5.0-beta.89) (2026-08-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* support trusted Domain token-exchange authority ([#352](https://github.com/astrale-os/sdk/issues/352)) ([8bec391](https://github.com/astrale-os/sdk/commit/8bec3915afad8aef6fab66d6e8906ea89ca8ad39))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @astrale-os/sdk bumped to 0.5.0-beta.86
|
|
16
|
+
|
|
17
|
+
## [0.5.0-beta.88](https://github.com/astrale-os/sdk/compare/adapter-cloudflare-v0.5.0-beta.87...adapter-cloudflare-v0.5.0-beta.88) (2026-08-30)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **dev:** accept file-backed operator credentials ([#350](https://github.com/astrale-os/sdk/issues/350)) ([8575644](https://github.com/astrale-os/sdk/commit/8575644124ae21014aafcbafd98a8465da980e83))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* dependencies
|
|
29
|
+
* @astrale-os/sdk bumped to 0.5.0-beta.85
|
|
30
|
+
|
|
3
31
|
## [0.5.0-beta.87](https://github.com/astrale-os/sdk/compare/adapter-cloudflare-v0.5.0-beta.86...adapter-cloudflare-v0.5.0-beta.87) (2026-08-30)
|
|
4
32
|
|
|
5
33
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Build } from '@astrale-os/sdk/deployment/build';
|
|
2
|
+
import type { ExchangeOptions } from '@astrale-os/sdk/execution';
|
|
2
3
|
export interface ExecutionCodegenOptions {
|
|
3
4
|
readonly origin: string;
|
|
4
5
|
readonly runtimeSpecifier: string;
|
|
@@ -7,6 +8,7 @@ export interface ExecutionCodegenOptions {
|
|
|
7
8
|
readonly maximumRequestBytes?: number;
|
|
8
9
|
readonly invocationTimeoutMs?: number;
|
|
9
10
|
readonly providerAssignedWorker?: string;
|
|
11
|
+
readonly tokenExchange?: ExchangeOptions | false;
|
|
10
12
|
readonly router?: {
|
|
11
13
|
readonly binding: string;
|
|
12
14
|
readonly hostSuffix: string;
|
|
@@ -46,6 +46,7 @@ ${frontend} load: async () => ({
|
|
|
46
46
|
${options.maximumRequestBytes === undefined ? '' : `maximumRequestBytes: ${options.maximumRequestBytes},`}
|
|
47
47
|
${options.invocationTimeoutMs === undefined ? '' : `invocationTimeoutMs: ${options.invocationTimeoutMs},`}
|
|
48
48
|
${options.providerAssignedWorker === undefined ? '' : `providerAssignedWorker: ${JSON.stringify(options.providerAssignedWorker)},`}
|
|
49
|
+
${options.tokenExchange === undefined ? '' : `tokenExchange: ${JSON.stringify(options.tokenExchange)} as const,`}
|
|
49
50
|
selfBinding: (env) => env.SELF,${routeSubrequest}
|
|
50
51
|
})
|
|
51
52
|
`;
|
|
@@ -23,6 +23,9 @@ export async function prepareExecution(input) {
|
|
|
23
23
|
build: input.context.build,
|
|
24
24
|
...(maximumRequestBytes === undefined ? {} : { maximumRequestBytes }),
|
|
25
25
|
...(invocationTimeoutMs === undefined ? {} : { invocationTimeoutMs }),
|
|
26
|
+
...(input.params.tokenExchange === undefined
|
|
27
|
+
? {}
|
|
28
|
+
: { tokenExchange: input.params.tokenExchange }),
|
|
26
29
|
...(input.configuredIssuer === undefined && input.direct
|
|
27
30
|
? { providerAssignedWorker: input.name }
|
|
28
31
|
: {}),
|
|
@@ -19,6 +19,9 @@ export async function developCloudflare(parameters, context, dependencies = {
|
|
|
19
19
|
allocatePort,
|
|
20
20
|
verify: verifyDevelopmentRelease,
|
|
21
21
|
}) {
|
|
22
|
+
if (context.overrides.credentialFile !== undefined) {
|
|
23
|
+
throw new TypeError('Cloudflare development does not own Kernel credentials.');
|
|
24
|
+
}
|
|
22
25
|
const hostSource = context.overrides.publicUrl ?? parameters.host;
|
|
23
26
|
const host = hostSource === undefined ? undefined : admitHost(hostSource);
|
|
24
27
|
const configuredPort = context.overrides.localPort ?? parameters.port;
|
package/dist/params.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ExchangeOptions } from '@astrale-os/sdk/execution';
|
|
1
2
|
/**
|
|
2
3
|
* `CloudflareParams` — the provider-typed config for the Cloudflare adapter.
|
|
3
4
|
*
|
|
@@ -62,6 +63,12 @@ export interface CloudflareParams {
|
|
|
62
63
|
* long provider orchestration while retaining a finite application budget.
|
|
63
64
|
*/
|
|
64
65
|
readonly invocationTimeoutMs?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Configure the Domain issuer's token exchange. Ordinary Domains retain the
|
|
68
|
+
* authenticated caller by default. Trusted platform Domains may deliberately
|
|
69
|
+
* select `grantMode: 'union'` to add their installed-Domain principal.
|
|
70
|
+
*/
|
|
71
|
+
readonly tokenExchange?: ExchangeOptions | false;
|
|
65
72
|
/**
|
|
66
73
|
* Escape hatch: raw wrangler config deep-merged over the generated base. Use
|
|
67
74
|
* it to declare extra bindings the adapter has no typed field for — KV, R2,
|
package/dist/worker/entry.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JsonWebKey } from '@astrale-os/sdk/auth';
|
|
2
2
|
import type { BuildMaterial, GeneratedBuildMaterial } from '@astrale-os/sdk/deployment/build/material';
|
|
3
|
-
import type { ExecutionContext } from '@astrale-os/sdk/execution';
|
|
3
|
+
import type { ExchangeOptions, ExecutionContext } from '@astrale-os/sdk/execution';
|
|
4
4
|
import type { Runtime } from '@astrale-os/sdk/runtime';
|
|
5
5
|
export interface Fetcher {
|
|
6
6
|
fetch(request: Request): Response | Promise<Response>;
|
|
@@ -29,6 +29,7 @@ export interface CloudflareWorkerConfig<RuntimeValue extends Runtime, Bindings e
|
|
|
29
29
|
readonly routeSubrequest?: (url: URL, bindings: Bindings) => Fetcher | null | undefined;
|
|
30
30
|
readonly invocationTimeoutMs?: number;
|
|
31
31
|
readonly maximumRequestBytes?: number;
|
|
32
|
+
readonly tokenExchange?: ExchangeOptions | false;
|
|
32
33
|
}
|
|
33
34
|
export interface CloudflareWorkerSource<RuntimeValue extends Runtime, Material = BuildMaterial> {
|
|
34
35
|
readonly runtime: RuntimeValue;
|
package/dist/worker/entry.js
CHANGED
|
@@ -44,6 +44,9 @@ function createCloudflareWorkerEntry(restore) {
|
|
|
44
44
|
...(new URL(environment.issuer).protocol === 'http:'
|
|
45
45
|
? { allowInsecureHttp: true }
|
|
46
46
|
: {}),
|
|
47
|
+
...(config.tokenExchange === undefined
|
|
48
|
+
? {}
|
|
49
|
+
: { tokenExchange: config.tokenExchange }),
|
|
47
50
|
});
|
|
48
51
|
},
|
|
49
52
|
server: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-os/adapter-cloudflare",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.89",
|
|
4
4
|
"description": "Deploy an Astrale application through Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adapter",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"registry": "https://registry.npmjs.org/"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@astrale-os/sdk": "0.5.0-beta.
|
|
56
|
+
"@astrale-os/sdk": "0.5.0-beta.86",
|
|
57
57
|
"@noble/hashes": "2.3.0",
|
|
58
58
|
"hono": "^4.6.20",
|
|
59
59
|
"jose": "^6.1.3",
|