@emdash-cms/cloudflare 0.0.2 → 0.1.0
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/cache/runtime.mjs
CHANGED
|
@@ -71,7 +71,9 @@ function normalizeCacheKey(url) {
|
|
|
71
71
|
*/
|
|
72
72
|
function resolveEnvValue(explicit, envVarName) {
|
|
73
73
|
if (explicit) return explicit;
|
|
74
|
-
return
|
|
74
|
+
if (!(envVarName in env)) return void 0;
|
|
75
|
+
const value = Reflect.get(env, envVarName);
|
|
76
|
+
return typeof value === "string" ? value : void 0;
|
|
75
77
|
}
|
|
76
78
|
/**
|
|
77
79
|
* Strip internal tracking headers from a response before returning to client.
|
|
@@ -40,7 +40,7 @@ function renderPlaygroundToolbar(config) {
|
|
|
40
40
|
<svg class="ec-pg-icon" id="ec-pg-reset-icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"/></svg>
|
|
41
41
|
</button>
|
|
42
42
|
|
|
43
|
-
<a class="ec-pg-btn ec-pg-btn--deploy" href="https://
|
|
43
|
+
<a class="ec-pg-btn ec-pg-btn--deploy" href="https://github.com/emdash-cms/emdash" target="_blank" rel="noopener">
|
|
44
44
|
Deploy your own
|
|
45
45
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg>
|
|
46
46
|
</a>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emdash-cms/cloudflare",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Cloudflare adapters for EmDash - D1, R2, Access, and Worker Loader sandbox",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"jose": "^6.1.3",
|
|
67
67
|
"kysely-d1": "^0.4.0",
|
|
68
68
|
"ulidx": "^2.4.1",
|
|
69
|
-
"emdash": "0.0
|
|
69
|
+
"emdash": "0.1.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@cloudflare/workers-types": ">=4.0.0",
|
package/src/cache/runtime.ts
CHANGED
|
@@ -134,7 +134,9 @@ function normalizeCacheKey(url: URL): string {
|
|
|
134
134
|
*/
|
|
135
135
|
function resolveEnvValue(explicit: string | undefined, envVarName: string): string | undefined {
|
|
136
136
|
if (explicit) return explicit;
|
|
137
|
-
|
|
137
|
+
if (!(envVarName in env)) return undefined;
|
|
138
|
+
const value: unknown = Reflect.get(env, envVarName);
|
|
139
|
+
return typeof value === "string" ? value : undefined;
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
/**
|
|
@@ -53,7 +53,7 @@ export function renderPlaygroundToolbar(config: PlaygroundToolbarConfig): string
|
|
|
53
53
|
<svg class="ec-pg-icon" id="ec-pg-reset-icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"/></svg>
|
|
54
54
|
</button>
|
|
55
55
|
|
|
56
|
-
<a class="ec-pg-btn ec-pg-btn--deploy" href="https://
|
|
56
|
+
<a class="ec-pg-btn ec-pg-btn--deploy" href="https://github.com/emdash-cms/emdash" target="_blank" rel="noopener">
|
|
57
57
|
Deploy your own
|
|
58
58
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg>
|
|
59
59
|
</a>
|