@zubyjs/share 1.0.78 → 1.0.80

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.
Files changed (3) hide show
  1. package/index.d.ts +1 -1
  2. package/index.js +4 -1
  3. package/package.json +44 -43
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ZubyInternalConfig, ZubyPlugin } from 'zuby/types.js';
1
+ import type { ZubyInternalConfig, ZubyPlugin } from 'zuby/types.js';
2
2
  /**
3
3
  * Zuby.js plugin that allows you to easily
4
4
  * share your local server with anyone over the internet
package/index.js CHANGED
@@ -20,14 +20,17 @@ export async function createTunnel({ config }) {
20
20
  const port = server?.port;
21
21
  if (!hostname || !port)
22
22
  return;
23
+ logger?.startSpinner('┃ Starting tunnel for sharing...');
23
24
  const tunnel = await startTunnel({
24
25
  hostname,
25
26
  port,
26
27
  verifyTLS: false,
27
28
  });
28
29
  if (!tunnel) {
29
- return logger.error(' ┃ Share Failed to start the tunnel');
30
+ logger?.stopSpinner('');
31
+ return logger.error(' ┃ Share ❌ Failed to start the tunnel');
30
32
  }
31
33
  const tunnelUrl = await tunnel.getURL();
34
+ logger?.stopSpinner('');
32
35
  logger?.info(` ┃ Share ${chalk.gray(tunnelUrl)}\r\n`);
33
36
  }
package/package.json CHANGED
@@ -1,45 +1,46 @@
1
1
  {
2
- "name": "@zubyjs/share",
3
- "version": "1.0.78",
4
- "description": "Zuby.js share plugin",
5
- "type": "module",
6
- "main": "index.js",
7
- "scripts": {
8
- "release": "cd ./dist && npm publish --access public && cd ..",
9
- "bump-version": "npm version patch",
10
- "build": "rm -rf dist/ stage/ && mkdir dist && tsc && cp -rf package.json README.md stage/share/src/* dist/ && rm -rf stage/",
11
- "push-build": "npm run build && cd dist && yalc push --force && cd ..",
12
- "test": "exit 0"
13
- },
14
- "publishConfig": {
15
- "directory": "dist",
16
- "linkDirectory": true
17
- },
18
- "peerDependencies": {
19
- "zuby": "^1.0.0"
20
- },
21
- "dependencies": {
22
- "chalk": "^5.3.0",
23
- "untun": "0.1.3"
24
- },
25
- "bugs": {
26
- "url": "https://gitlab.com/futrou/zuby.js/-/issues",
27
- "email": "zuby@futrou.com"
28
- },
29
- "license": "MIT",
30
- "repository": {
31
- "type": "git",
32
- "url": "git+https://gitlab.com/futrou/zuby.js.git"
33
- },
34
- "homepage": "https://zubyjs.com",
35
- "keywords": [
36
- "zuby-plugin",
37
- "zuby",
38
- "share",
39
- "tunnel",
40
- "cloudflare"
41
- ],
42
- "engines": {
43
- "node": ">=18"
44
- }
2
+ "name": "@zubyjs/share",
3
+ "version": "1.0.80",
4
+ "description": "Zuby.js share plugin",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "scripts": {
8
+ "release": "cd ./dist && npm publish --access public && cd ..",
9
+ "bump-version": "npm version patch",
10
+ "build": "rm -rf dist/ stage/ && mkdir dist && tsc && cp -rf package.json README.md stage/share/src/* dist/ && rm -rf stage/",
11
+ "push-build": "npm run build && cd dist && yalc push --force && cd ..",
12
+ "test": "vitest run",
13
+ "test:coverage": "vitest run --coverage"
14
+ },
15
+ "publishConfig": {
16
+ "directory": "dist",
17
+ "linkDirectory": true
18
+ },
19
+ "peerDependencies": {
20
+ "zuby": "^1.0.0"
21
+ },
22
+ "dependencies": {
23
+ "chalk": "5.3.0",
24
+ "untun": "0.1.3"
25
+ },
26
+ "bugs": {
27
+ "url": "https://gitlab.com/futrou/zuby.js/-/issues",
28
+ "email": "zuby@futrou.com"
29
+ },
30
+ "license": "MIT",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://gitlab.com/futrou/zuby.js.git"
34
+ },
35
+ "homepage": "https://zubyjs.com",
36
+ "keywords": [
37
+ "zuby-plugin",
38
+ "zuby",
39
+ "share",
40
+ "tunnel",
41
+ "cloudflare"
42
+ ],
43
+ "engines": {
44
+ "node": ">=18"
45
+ }
45
46
  }