rayrun 0.0.0-development → 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/LICENSE CHANGED
@@ -1,24 +1,9 @@
1
- Copyright (c) 2022, Punkpeye (https://punkpeye.com/)
2
- All rights reserved.
1
+ MIT License
3
2
 
4
- Redistribution and use in source and binary forms, with or without
5
- modification, are permitted provided that the following conditions are met:
6
- * Redistributions of source code must retain the above copyright
7
- notice, this list of conditions and the following disclaimer.
8
- * Redistributions in binary form must reproduce the above copyright
9
- notice, this list of conditions and the following disclaimer in the
10
- documentation and/or other materials provided with the distribution.
11
- * Neither the name of the Punkpeye (https://punkpeye.com/) nor the
12
- names of its contributors may be used to endorse or promote products
13
- derived from this software without specific prior written permission.
3
+ Copyright (c) 2026 Rayrun
14
4
 
15
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
- DISCLAIMED. IN NO EVENT SHALL PUNKPEYE BE LIABLE FOR ANY
19
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,33 +1,14 @@
1
- # Playwright Utilities
1
+ # Rayrun CLI
2
2
 
3
- Utilities for working with [`@playwright/test`](https://playwright.dev/).
3
+ Connect supported MCP clients to a Rayrun workspace endpoint without copying configuration by
4
+ hand.
4
5
 
5
- ## Utilities
6
-
7
- - [`createDataTransfer`](#createDataTransfer)
8
-
9
- ### `createDataTransfer`
10
-
11
- Used to create a [DataTransfer](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer). Useful when you want to perform drag and drop operations.
12
-
13
- ```ts
14
- createDataTransfer = (args: {
15
- page: Page;
16
- filePath: string;
17
- fileName: string;
18
- fileType: string;
19
- }): Promise<DataTransfer>;
6
+ ```sh
7
+ npx rayrun setup https://copy-the-endpoint-from-rayrun.example/mcp
20
8
  ```
21
9
 
22
- Usage:
23
-
24
- ```ts
25
- import { createDataTransfer } from "playwright-utilities";
26
- import { resolve } from "node:path";
10
+ This package is the short command for [`@rayrun/cli`](https://www.npmjs.com/package/@rayrun/cli).
11
+ Both names run the same version of the same CLI.
27
12
 
28
- await createDataTransfer({
29
- filePath: resolve(__dirname, "foo.png"),
30
- fileName: "foo.png",
31
- fileType: "image/png",
32
- });
33
- ```
13
+ See the [CLI documentation](https://ray.run/docs/cli) for client selection, dry runs, project
14
+ configuration, login behavior, and rollback.
package/index.js ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ await import('@rayrun/cli/index.js');
package/index.test.js ADDED
@@ -0,0 +1,29 @@
1
+ import assert from 'node:assert/strict';
2
+ import { execFile } from 'node:child_process';
3
+ import { readFile } from 'node:fs/promises';
4
+ import test from 'node:test';
5
+ import { promisify } from 'node:util';
6
+
7
+ const execFileAsync = promisify(execFile);
8
+ const launcherPackage = JSON.parse(
9
+ await readFile(new URL('./package.json', import.meta.url), 'utf8'),
10
+ );
11
+ const cliPackage = JSON.parse(
12
+ await readFile(new URL(import.meta.resolve('@rayrun/cli/package.json')), 'utf8'),
13
+ );
14
+
15
+ test('pins and launches the matching CLI release', async () => {
16
+ assert.equal(launcherPackage.version, cliPackage.version);
17
+ assert.equal(
18
+ launcherPackage.dependencies['@rayrun/cli'].replace(/^workspace:/u, ''),
19
+ cliPackage.version,
20
+ );
21
+
22
+ const { stderr, stdout } = await execFileAsync(process.execPath, [
23
+ new URL('./index.js', import.meta.url).pathname,
24
+ '--version',
25
+ ]);
26
+
27
+ assert.equal(stderr, '');
28
+ assert.equal(stdout, `${cliPackage.version}\n`);
29
+ });
package/package.json CHANGED
@@ -1,45 +1,33 @@
1
1
  {
2
2
  "name": "rayrun",
3
- "version": "0.0.0-development",
4
- "description": "Playwright utilities",
5
- "keywords": [
6
- "playwright",
7
- "utilities"
8
- ],
3
+ "version": "0.1.0",
4
+ "description": "Safely connect local MCP clients to Rayrun",
5
+ "license": "MIT",
9
6
  "repository": {
10
7
  "type": "git",
11
- "url": "https://github.com/punkpeye/playwright-utilities"
8
+ "url": "git+https://github.com/rayrundev/rayrun.git",
9
+ "directory": "packages/rayrun"
12
10
  },
13
- "license": "BSD-3-Clause",
14
- "main": "./dist/utilities.js",
15
- "types": "./dist/utilities.d.ts",
16
- "scripts": {
17
- "test": "playwright test",
18
- "start": "tsx server.ts",
19
- "build": "rm -fr ./dist && tsc",
20
- "lint": "eslint . && prettier --check . && tsc --noEmit"
11
+ "bin": {
12
+ "rayrun": "index.js"
21
13
  },
22
14
  "files": [
23
- "dist",
15
+ "index.js",
16
+ "index.test.js",
17
+ "README.md",
24
18
  "LICENSE"
25
19
  ],
26
- "devDependencies": {
27
- "@fastify/static": "^6.5.0",
28
- "@playwright/test": "^1.25.1",
29
- "@semantic-release/commit-analyzer": "^9.0.2",
30
- "@semantic-release/github": "^8.0.5",
31
- "@semantic-release/npm": "^9.0.1",
32
- "@types/jest": "^28.1.8",
33
- "@types/node": "^18.7.13",
34
- "@typescript-eslint/eslint-plugin": "^5.35.1",
35
- "eslint": "^8.22.0",
36
- "fastify": "^4.5.2",
37
- "husky": "^8.0.1",
38
- "prettier": "^2.7.1",
39
- "tsx": "^3.8.2",
40
- "typescript": "^4.7.4"
20
+ "type": "module",
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "scripts": {
25
+ "test": "node --test index.test.js"
26
+ },
27
+ "dependencies": {
28
+ "@rayrun/cli": "workspace:0.1.0"
41
29
  },
42
30
  "engines": {
43
- "node": ">=18.0"
31
+ "node": ">=20"
44
32
  }
45
33
  }
@@ -1,7 +0,0 @@
1
- import { type Page } from "@playwright/test";
2
- export declare const createDataTransfer: ({ page, filePath, fileName, fileType, }: {
3
- page: Page;
4
- filePath: string;
5
- fileName: string;
6
- fileType: string;
7
- }) => Promise<import("playwright-core").JSHandle<DataTransfer>>;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createDataTransfer = void 0;
4
- const promises_1 = require("node:fs/promises");
5
- const createDataTransfer = async ({ page, filePath, fileName, fileType, }) => {
6
- return await page.evaluateHandle(async ({ fileHex, localFileName, localFileType }) => {
7
- const dataTransfer = new DataTransfer();
8
- dataTransfer.items.add(new File([fileHex], localFileName, { type: localFileType }));
9
- return dataTransfer;
10
- }, {
11
- fileHex: (await (0, promises_1.readFile)(filePath)).toString("hex"),
12
- localFileName: fileName,
13
- localFileType: fileType,
14
- });
15
- };
16
- exports.createDataTransfer = createDataTransfer;
@@ -1 +0,0 @@
1
- export { createDataTransfer } from './createDataTransfer';
package/dist/utilities.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createDataTransfer = void 0;
4
- var createDataTransfer_1 = require("./createDataTransfer");
5
- Object.defineProperty(exports, "createDataTransfer", { enumerable: true, get: function () { return createDataTransfer_1.createDataTransfer; } });