@stacksjs/tunnel 0.64.6 → 0.65.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/dist/index.d.ts +3 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +4 -4
- package/dist/tunnel.d.ts +2 -0
- package/package.json +7 -18
- package/src/index.ts +2 -2
- package/src/tunnel.ts +7 -2
package/dist/index.d.ts
ADDED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
async function r
|
|
2
|
+
async function a(r){if(!r?.port)r={port:3000};return console.log("Creating local tunnel",r.port),"localTunnel"}async function l(r){return await a({port:r})}export{a as localTunnel,l as createLocalTunnel};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=DA8CF3995797566764756E2164756E21
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/tunnel.ts", "../src/index.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"
|
|
6
|
-
"import { localTunnel } from './tunnel'\n\nexport async function createLocalTunnel(port: number) {\n return await localTunnel({ port })\n}\n\nexport { localTunnel }\n"
|
|
5
|
+
"// wip\nexport type LocalTunnel = string\n\nexport async function localTunnel(options?: { port: number }): Promise<LocalTunnel> {\n const port = 3000\n\n if (!options?.port)\n options = { port }\n\n // eslint-disable-next-line no-console\n console.log('Creating local tunnel', options.port)\n\n return 'localTunnel'\n}\n",
|
|
6
|
+
"import { type LocalTunnel, localTunnel } from './tunnel'\n\nexport async function createLocalTunnel(port: number): Promise<LocalTunnel> {\n return await localTunnel({ port })\n}\n\nexport { localTunnel }\n"
|
|
7
7
|
],
|
|
8
|
-
"mappings": ";
|
|
9
|
-
"debugId": "
|
|
8
|
+
"mappings": ";AAGA,eAAsB,CAAW,CAAC,EAAkD,CAGlF,IAAK,GAAS,KACZ,EAAU,CAAE,KAHD,IAGM,EAKnB,OAFA,QAAQ,IAAI,wBAAyB,EAAQ,IAAI,EAE1C,cCVT,eAAsB,CAAiB,CAAC,EAAoC,CAC1E,OAAO,MAAM,EAAY,CAAE,MAAK,CAAC",
|
|
9
|
+
"debugId": "DA8CF3995797566764756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
package/dist/tunnel.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/tunnel",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.65.0",
|
|
5
5
|
"description": "Local development tunnel.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
|
+
"contributors": ["Chris Breuer <chris@stacksjs.org>"],
|
|
7
8
|
"license": "MIT",
|
|
8
9
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
|
9
10
|
"homepage": "https://github.com/stacksjs/stacks/tree/main/storage/framework/core/tunnel#readme",
|
|
@@ -15,12 +16,7 @@
|
|
|
15
16
|
"bugs": {
|
|
16
17
|
"url": "https://github.com/stacksjs/stacks/issues"
|
|
17
18
|
},
|
|
18
|
-
"keywords": [
|
|
19
|
-
"tunnel",
|
|
20
|
-
"local",
|
|
21
|
-
"bun",
|
|
22
|
-
"stacks"
|
|
23
|
-
],
|
|
19
|
+
"keywords": ["tunnel", "local", "bun", "stacks"],
|
|
24
20
|
"exports": {
|
|
25
21
|
".": {
|
|
26
22
|
"bun": "./src/index.ts",
|
|
@@ -33,20 +29,13 @@
|
|
|
33
29
|
},
|
|
34
30
|
"module": "dist/index.js",
|
|
35
31
|
"types": "dist/index.d.ts",
|
|
36
|
-
"
|
|
37
|
-
"Chris Breuer <chris@stacksjs.org>"
|
|
38
|
-
],
|
|
39
|
-
"files": [
|
|
40
|
-
"README.md",
|
|
41
|
-
"dist",
|
|
42
|
-
"src"
|
|
43
|
-
],
|
|
32
|
+
"files": ["README.md", "dist", "src"],
|
|
44
33
|
"scripts": {
|
|
45
|
-
"build": "bun
|
|
46
|
-
"typecheck": "bun
|
|
34
|
+
"build": "bun build.ts",
|
|
35
|
+
"typecheck": "bun tsc --noEmit",
|
|
47
36
|
"prepublishOnly": "bun run build"
|
|
48
37
|
},
|
|
49
38
|
"devDependencies": {
|
|
50
|
-
"@stacksjs/development": "
|
|
39
|
+
"@stacksjs/development": "0.64.6"
|
|
51
40
|
}
|
|
52
41
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { localTunnel } from './tunnel'
|
|
1
|
+
import { type LocalTunnel, localTunnel } from './tunnel'
|
|
2
2
|
|
|
3
|
-
export async function createLocalTunnel(port: number) {
|
|
3
|
+
export async function createLocalTunnel(port: number): Promise<LocalTunnel> {
|
|
4
4
|
return await localTunnel({ port })
|
|
5
5
|
}
|
|
6
6
|
|
package/src/tunnel.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
// wip
|
|
2
|
+
export type LocalTunnel = string
|
|
3
|
+
|
|
4
|
+
export async function localTunnel(options?: { port: number }): Promise<LocalTunnel> {
|
|
2
5
|
const port = 3000
|
|
3
6
|
|
|
4
|
-
if (!options?.port)
|
|
7
|
+
if (!options?.port)
|
|
8
|
+
options = { port }
|
|
5
9
|
|
|
10
|
+
// eslint-disable-next-line no-console
|
|
6
11
|
console.log('Creating local tunnel', options.port)
|
|
7
12
|
|
|
8
13
|
return 'localTunnel'
|