@stacksjs/tunnel 0.58.19

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/README.md +53 -0
  2. package/dist/index.js +10 -0
  3. package/package.json +57 -0
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # Stacks Tunnel
2
+
3
+ ## โ˜˜๏ธ Features
4
+
5
+ - easily expose localhost ports
6
+
7
+ ## ๐Ÿค– Usage
8
+
9
+ ```bash
10
+ bun install -d @stacksjs/tunnel
11
+ ```
12
+
13
+ Now, you can use it in your project:
14
+
15
+ ```js
16
+ import { createLocalTunnel } from '@stacksjs/tunnel'
17
+
18
+ const url = await createLocalTunnel(3333)
19
+
20
+ console.log('publicly sharable URL of your localhost', url)
21
+ ```
22
+
23
+ Learn more in the docs.
24
+
25
+ ## ๐Ÿงช Testing
26
+
27
+ ```bash
28
+ bun test
29
+ ```
30
+
31
+ ## ๐Ÿ“ˆ Changelog
32
+
33
+ Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
34
+
35
+ ## ๐Ÿšœ Contributing
36
+
37
+ Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
38
+
39
+ ## ๐Ÿ Community
40
+
41
+ For help, discussion about best practices, or any other conversation that would benefit from being searchable:
42
+
43
+ [Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)
44
+
45
+ For casual chit-chat with others using this package:
46
+
47
+ [Join the Stacks Discord tunnel](https://discord.gg/stacksjs)
48
+
49
+ ## ๐Ÿ“„ License
50
+
51
+ The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
52
+
53
+ Made with ๐Ÿ’™
package/dist/index.js ADDED
@@ -0,0 +1,10 @@
1
+ // @bun
2
+ // src/index.ts
3
+ import localtunnel from "localtunnel";
4
+ async function createLocalTunnel(port) {
5
+ const tunnel = await localtunnel({ port });
6
+ return tunnel.url;
7
+ }
8
+ export {
9
+ createLocalTunnel
10
+ };
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@stacksjs/tunnel",
3
+ "type": "module",
4
+ "version": "0.58.19",
5
+ "description": "Local development tunnel.",
6
+ "author": "Chris Breuer",
7
+ "license": "MIT",
8
+ "funding": "https://github.com/sponsors/chrisbbreuer",
9
+ "homepage": "https://github.com/stacksjs/stacks/tree/main/storage/framework/core/src/tunnel#readme",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/stacksjs/stacks.git",
13
+ "directory": "./storage/framework/core/src/tunnel"
14
+ },
15
+ "bugs": {
16
+ "url": "https://github.com/stacksjs/stacks/issues"
17
+ },
18
+ "keywords": [
19
+ "tunnel",
20
+ "localtunnel",
21
+ "stacks"
22
+ ],
23
+ "exports": {
24
+ ".": {
25
+ "bun": "./src/index.ts",
26
+ "import": "./dist/index.js"
27
+ },
28
+ "./*": {
29
+ "bun": "./src/*",
30
+ "import": "./dist/*"
31
+ }
32
+ },
33
+ "module": "dist/index.js",
34
+ "types": "dist/index.d.ts",
35
+ "contributors": [
36
+ "Chris Breuer <chris@stacksjs.org>"
37
+ ],
38
+ "files": [
39
+ "README.md",
40
+ "dist"
41
+ ],
42
+ "scripts": {
43
+ "build": "bun --bun build.ts",
44
+ "typecheck": "bun --bun tsc --noEmit",
45
+ "prepublishOnly": "bun --bun run build"
46
+ },
47
+ "peerDependencies": {
48
+ "localtunnel": "^2.0.2"
49
+ },
50
+ "dependencies": {
51
+ "localtunnel": "^2.0.2"
52
+ },
53
+ "devDependencies": {
54
+ "@stacksjs/development": "workspace:*",
55
+ "@types/localtunnel": "^2.0.4"
56
+ }
57
+ }