@ruvyxa/adapter-cloudflare 1.0.5 → 1.0.6
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 +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -11,8 +11,8 @@ npm install @ruvyxa/adapter-cloudflare
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
|
-
import { defineConfig } from
|
|
15
|
-
import { cloudflareAdapter } from
|
|
14
|
+
import { defineConfig } from 'ruvyxa/config'
|
|
15
|
+
import { cloudflareAdapter } from '@ruvyxa/adapter-cloudflare'
|
|
16
16
|
|
|
17
17
|
export default defineConfig({
|
|
18
18
|
adapter: cloudflareAdapter(),
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAA+B,MAAM,cAAc,CAAA;AAGxE;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,wBAA6B,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAA+B,MAAM,cAAc,CAAA;AAGxE;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,wBAA6B,GAAG,OAAO,CA0BjF;AAED,eAAe,iBAAiB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { validateBuildContext } from
|
|
1
|
+
import { validateBuildContext } from '@ruvyxa/core';
|
|
2
2
|
/**
|
|
3
3
|
* Create a Cloudflare Workers deployment adapter for Ruvyxa.
|
|
4
4
|
*
|
|
@@ -16,24 +16,24 @@ import { validateBuildContext } from "@ruvyxa/core";
|
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
18
|
export function cloudflareAdapter(options = {}) {
|
|
19
|
-
if (options.workerEntry !== undefined && typeof options.workerEntry !==
|
|
19
|
+
if (options.workerEntry !== undefined && typeof options.workerEntry !== 'string') {
|
|
20
20
|
throw new Error(`[RUV2001] cloudflareAdapter: "workerEntry" must be a string, got ${typeof options.workerEntry}`);
|
|
21
21
|
}
|
|
22
|
-
if (options.workerEntry !== undefined && options.workerEntry.trim() ===
|
|
22
|
+
if (options.workerEntry !== undefined && options.workerEntry.trim() === '') {
|
|
23
23
|
throw new Error(`[RUV2001] cloudflareAdapter: "workerEntry" must not be an empty string`);
|
|
24
24
|
}
|
|
25
25
|
return {
|
|
26
|
-
name:
|
|
27
|
-
target:
|
|
26
|
+
name: 'cloudflare',
|
|
27
|
+
target: 'edge',
|
|
28
28
|
build(ctx) {
|
|
29
|
-
validateBuildContext(ctx,
|
|
29
|
+
validateBuildContext(ctx, 'cloudflareAdapter');
|
|
30
30
|
return {
|
|
31
|
-
name:
|
|
32
|
-
target:
|
|
33
|
-
platform:
|
|
31
|
+
name: 'cloudflare',
|
|
32
|
+
target: 'edge',
|
|
33
|
+
platform: 'cloudflare',
|
|
34
34
|
entry: options.workerEntry ?? `${ctx.outDir}/server/app`,
|
|
35
35
|
assetsDir: `${ctx.outDir}/assets`,
|
|
36
|
-
configFiles: [
|
|
36
|
+
configFiles: ['wrangler.toml'],
|
|
37
37
|
};
|
|
38
38
|
},
|
|
39
39
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAUnD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAoC,EAAE;IACtE,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,IAAI,OAAO,OAAO,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;QACjF,MAAM,IAAI,KAAK,CACb,oEAAoE,OAAO,OAAO,CAAC,WAAW,EAAE,CACjG,CAAA;IACH,CAAC;IAED,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,IAAI,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAC3E,MAAM,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAUnD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAoC,EAAE;IACtE,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,IAAI,OAAO,OAAO,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;QACjF,MAAM,IAAI,KAAK,CACb,oEAAoE,OAAO,OAAO,CAAC,WAAW,EAAE,CACjG,CAAA;IACH,CAAC;IAED,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,IAAI,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAC3E,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAA;IAC3F,CAAC;IAED,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,MAAM;QACd,KAAK,CAAC,GAAiB;YACrB,oBAAoB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAA;YAC9C,OAAO;gBACL,IAAI,EAAE,YAAY;gBAClB,MAAM,EAAE,MAAM;gBACd,QAAQ,EAAE,YAAY;gBACtB,KAAK,EAAE,OAAO,CAAC,WAAW,IAAI,GAAG,GAAG,CAAC,MAAM,aAAa;gBACxD,SAAS,EAAE,GAAG,GAAG,CAAC,MAAM,SAAS;gBACjC,WAAW,EAAE,CAAC,eAAe,CAAC;aAC/B,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC;AAED,eAAe,iBAAiB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ruvyxa/adapter-cloudflare",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Shape Ruvyxa builds for Cloudflare edge targets with typed worker and asset output metadata.",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@ruvyxa/core": "^1.0.
|
|
41
|
+
"@ruvyxa/core": "^1.0.6"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "tsc -p tsconfig.json",
|
|
45
|
-
"check": "tsc -p tsconfig.json
|
|
45
|
+
"check": "tsc -p tsconfig.check.json",
|
|
46
46
|
"test": "node --test \"../../../tests/packages/adapter-cloudflare/**/*.test.ts\"",
|
|
47
|
-
"format": "tsc -p tsconfig.json
|
|
47
|
+
"format": "tsc -p tsconfig.check.json"
|
|
48
48
|
}
|
|
49
49
|
}
|