@astrale-os/adapter-cloudflare 0.5.0-beta.52 → 0.5.0-beta.53
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/dist/adapter.js
CHANGED
|
@@ -92,6 +92,7 @@ export function cloudflareWithDependencies(environments, dependencies) {
|
|
|
92
92
|
remote: parameters.remote ?? false,
|
|
93
93
|
secrets,
|
|
94
94
|
autoPickPort: parameters.port === undefined,
|
|
95
|
+
pinLocalOrigin: parameters.host === undefined && parameters.remote !== true,
|
|
95
96
|
...(parameters.host === undefined ? {} : { ip: '0.0.0.0' }),
|
|
96
97
|
onReload: context.onReload,
|
|
97
98
|
});
|
|
@@ -9,6 +9,8 @@ export declare function runWranglerDev(args: {
|
|
|
9
9
|
remote: boolean;
|
|
10
10
|
readonly ip?: string;
|
|
11
11
|
readonly autoPickPort?: boolean;
|
|
12
|
+
/** Pin ordinary local requests to one stable issuer after the final port is selected. */
|
|
13
|
+
readonly pinLocalOrigin?: boolean;
|
|
12
14
|
readonly secrets: Readonly<Record<string, string>>;
|
|
13
15
|
readonly onReload: () => void;
|
|
14
16
|
readonly onLog?: (line: string) => void;
|
|
@@ -15,6 +15,7 @@ export async function runWranglerDev(args) {
|
|
|
15
15
|
}
|
|
16
16
|
const secretEnvironment = await createSecretEnvironment(args.secrets);
|
|
17
17
|
const redact = secretRedactor(args.secrets);
|
|
18
|
+
const fallbackUrl = `http://localhost:${args.port}`;
|
|
18
19
|
const wranglerArgs = [
|
|
19
20
|
...prefix,
|
|
20
21
|
'dev',
|
|
@@ -26,6 +27,7 @@ export async function runWranglerDev(args) {
|
|
|
26
27
|
'http',
|
|
27
28
|
'--ip',
|
|
28
29
|
args.ip ?? '127.0.0.1',
|
|
30
|
+
...(args.pinLocalOrigin ? ['--var', `WORKER_URL:${fallbackUrl}`] : []),
|
|
29
31
|
...(secretEnvironment === undefined ? [] : ['--env-file', secretEnvironment.path]),
|
|
30
32
|
...(args.remote ? ['--remote'] : []),
|
|
31
33
|
];
|
|
@@ -41,7 +43,6 @@ export async function runWranglerDev(args) {
|
|
|
41
43
|
await secretEnvironment?.remove();
|
|
42
44
|
throw cause;
|
|
43
45
|
}
|
|
44
|
-
const fallbackUrl = `http://localhost:${args.port}`;
|
|
45
46
|
let resolved = false;
|
|
46
47
|
let buildErrorTail = '';
|
|
47
48
|
let outputTail = '';
|
|
@@ -103,7 +104,7 @@ export async function runWranglerDev(args) {
|
|
|
103
104
|
throw cause;
|
|
104
105
|
}
|
|
105
106
|
return {
|
|
106
|
-
url,
|
|
107
|
+
url: args.pinLocalOrigin ? fallbackUrl : url,
|
|
107
108
|
async stop() {
|
|
108
109
|
try {
|
|
109
110
|
await stopChild(child);
|
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.53",
|
|
4
4
|
"description": "Deploy an Astrale application through Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adapter",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"hono": "^4.6.20",
|
|
46
46
|
"jose": "^6.1.3",
|
|
47
47
|
"wrangler": "4.123.0",
|
|
48
|
-
"@astrale-os/sdk": "0.5.0-beta.
|
|
48
|
+
"@astrale-os/sdk": "0.5.0-beta.50"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@astrale-os/ox": ">=0.1.0 <1.0.0",
|