@ruvyxa/adapter-cloudflare 1.0.5 → 1.0.7

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 CHANGED
@@ -11,8 +11,8 @@ npm install @ruvyxa/adapter-cloudflare
11
11
  ## Usage
12
12
 
13
13
  ```ts
14
- import { defineConfig } from "ruvyxa/config"
15
- import { cloudflareAdapter } from "@ruvyxa/adapter-cloudflare"
14
+ import { defineConfig } from 'ruvyxa/config'
15
+ import { cloudflareAdapter } from '@ruvyxa/adapter-cloudflare'
16
16
 
17
17
  export default defineConfig({
18
18
  adapter: cloudflareAdapter(),
@@ -28,6 +28,8 @@ export default defineConfig({
28
28
  "platform": "cloudflare",
29
29
  "entry": ".ruvyxa/server/app",
30
30
  "assetsDir": ".ruvyxa/assets",
31
+ "clientDir": ".ruvyxa/client",
32
+ "chunkManifest": ".ruvyxa/client/chunk-manifest.json",
31
33
  "configFiles": ["wrangler.toml"]
32
34
  }
33
35
  ```
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Adapter } from "@ruvyxa/core";
1
+ import type { Adapter } from '@ruvyxa/core';
2
2
  /**
3
3
  * Options for the Cloudflare Workers adapter.
4
4
  */
@@ -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,CA4BjF;AAED,eAAe,iBAAiB,CAAA"}
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,CA2BjF;AAED,eAAe,iBAAiB,CAAA"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { validateBuildContext } from "@ruvyxa/core";
1
+ import { clientBuildOutput, validateBuildContext } from '@ruvyxa/core';
2
2
  /**
3
3
  * Create a Cloudflare Workers deployment adapter for Ruvyxa.
4
4
  *
@@ -16,24 +16,25 @@ import { validateBuildContext } from "@ruvyxa/core";
16
16
  * ```
17
17
  */
18
18
  export function cloudflareAdapter(options = {}) {
19
- if (options.workerEntry !== undefined && typeof options.workerEntry !== "string") {
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: "cloudflare",
27
- target: "edge",
26
+ name: 'cloudflare',
27
+ target: 'edge',
28
28
  build(ctx) {
29
- validateBuildContext(ctx, "cloudflareAdapter");
29
+ validateBuildContext(ctx, 'cloudflareAdapter');
30
30
  return {
31
- name: "cloudflare",
32
- target: "edge",
33
- platform: "cloudflare",
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: ["wrangler.toml"],
36
+ ...clientBuildOutput(ctx),
37
+ configFiles: ['wrangler.toml'],
37
38
  };
38
39
  },
39
40
  };
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,CACb,wEAAwE,CACzE,CAAA;IACH,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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAUtE;;;;;;;;;;;;;;;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,GAAG,iBAAiB,CAAC,GAAG,CAAC;gBACzB,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.5",
3
+ "version": "1.0.7",
4
4
  "description": "Shape Ruvyxa builds for Cloudflare edge targets with typed worker and asset output metadata.",
5
- "license": "MIT",
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.5"
41
+ "@ruvyxa/core": "^1.0.7"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "tsc -p tsconfig.json",
45
- "check": "tsc -p tsconfig.json --noEmit",
45
+ "check": "tsc -p tsconfig.check.json",
46
46
  "test": "node --test \"../../../tests/packages/adapter-cloudflare/**/*.test.ts\"",
47
- "format": "tsc -p tsconfig.json --noEmit"
47
+ "format": "tsc -p tsconfig.check.json"
48
48
  }
49
49
  }