@ngrok/ngrok 0.1.0 → 0.2.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.
Files changed (118) hide show
  1. package/.prettierrc.json +3 -0
  2. package/CHANGELOG.md +10 -0
  3. package/Cargo.toml +2 -2
  4. package/README.md +35 -1
  5. package/RELEASE.md +4 -3
  6. package/docs/assets/style.css +4 -5
  7. package/docs/classes/NgrokHttpTunnel.html +9 -9
  8. package/docs/classes/NgrokHttpTunnelBuilder.html +21 -21
  9. package/docs/classes/NgrokLabeledTunnel.html +8 -8
  10. package/docs/classes/NgrokLabeledTunnelBuilder.html +4 -4
  11. package/docs/classes/NgrokSession.html +7 -7
  12. package/docs/classes/NgrokSessionBuilder.html +15 -15
  13. package/docs/classes/NgrokTcpTunnel.html +9 -9
  14. package/docs/classes/NgrokTcpTunnelBuilder.html +8 -8
  15. package/docs/classes/NgrokTlsTunnel.html +9 -9
  16. package/docs/classes/NgrokTlsTunnelBuilder.html +10 -10
  17. package/docs/classes/UpdateRequest.html +3 -3
  18. package/docs/functions/consoleLog.html +1 -1
  19. package/docs/functions/listen.html +1 -1
  20. package/docs/functions/listenable.html +1 -1
  21. package/docs/functions/loggingCallback.html +1 -1
  22. package/docs/index.html +40 -2
  23. package/examples/express/ngrok-express-quickstart.js +11 -0
  24. package/examples/express/ngrok-express.js +28 -0
  25. package/examples/express/package.json +7 -0
  26. package/examples/fastify/ngrok-fastify.js +26 -0
  27. package/examples/fastify/package.json +7 -0
  28. package/examples/hapi/ngrok-hapi.js +35 -0
  29. package/examples/hapi/package.json +7 -0
  30. package/examples/koa/ngrok-koa.js +12 -0
  31. package/examples/koa/package.json +7 -0
  32. package/examples/nestjs/.eslintrc.js +25 -0
  33. package/examples/nestjs/.prettierrc +4 -0
  34. package/examples/nestjs/README.md +73 -0
  35. package/examples/nestjs/nest-cli.json +8 -0
  36. package/examples/nestjs/package-lock.json +12138 -0
  37. package/examples/nestjs/package.json +70 -0
  38. package/examples/nestjs/src/app.controller.spec.ts +22 -0
  39. package/examples/nestjs/src/app.controller.ts +12 -0
  40. package/examples/nestjs/src/app.module.ts +10 -0
  41. package/examples/nestjs/src/app.service.ts +8 -0
  42. package/examples/nestjs/src/main.ts +17 -0
  43. package/examples/nestjs/test/app.e2e-spec.ts +24 -0
  44. package/examples/nestjs/test/jest-e2e.json +9 -0
  45. package/examples/nestjs/tsconfig.build.json +4 -0
  46. package/examples/nestjs/tsconfig.json +21 -0
  47. package/examples/nextjs/next.config.js +12 -0
  48. package/examples/nextjs/ngrok.config.js +23 -0
  49. package/examples/nextjs/package.json +6 -0
  50. package/examples/nextjs/pages/index.js +5 -0
  51. package/examples/ngrok-http-full.js +28 -20
  52. package/examples/ngrok-http-minimum.js +21 -13
  53. package/examples/ngrok-labeled.js +21 -17
  54. package/examples/ngrok-listen.js +5 -6
  55. package/examples/ngrok-tcp.js +21 -17
  56. package/examples/ngrok-tls.js +22 -19
  57. package/examples/ngrok-typescript.ts +31 -26
  58. package/examples/ngrok-windows-pipe.js +22 -14
  59. package/examples/ngrok-winston.js +9 -9
  60. package/examples/package.json +11 -0
  61. package/examples/remix/.eslintrc.js +4 -0
  62. package/examples/remix/README.md +53 -0
  63. package/examples/remix/app/entry.client.tsx +18 -0
  64. package/examples/remix/app/entry.server.tsx +101 -0
  65. package/examples/remix/app/root.tsx +20 -0
  66. package/examples/remix/app/routes/_index.tsx +30 -0
  67. package/examples/remix/ngrok.config.js +16 -0
  68. package/examples/remix/package.json +30 -0
  69. package/examples/remix/public/favicon.ico +0 -0
  70. package/examples/remix/remix.config.js +16 -0
  71. package/examples/remix/remix.env.d.ts +2 -0
  72. package/examples/remix/tsconfig.json +22 -0
  73. package/examples/svelte/README.md +38 -0
  74. package/examples/svelte/jsconfig.json +17 -0
  75. package/examples/svelte/ngrok.config.cjs +18 -0
  76. package/examples/svelte/package.json +22 -0
  77. package/examples/svelte/src/app.d.ts +12 -0
  78. package/examples/svelte/src/app.html +12 -0
  79. package/examples/svelte/src/routes/+page.svelte +2 -0
  80. package/examples/svelte/static/favicon.png +0 -0
  81. package/examples/svelte/svelte.config.js +14 -0
  82. package/examples/svelte/vite.config.js +6 -0
  83. package/examples/vue/.vscode/extensions.json +3 -0
  84. package/examples/vue/README.md +40 -0
  85. package/examples/vue/env.d.ts +1 -0
  86. package/examples/vue/index.html +13 -0
  87. package/examples/vue/ngrok.config.ts +18 -0
  88. package/examples/vue/package.json +25 -0
  89. package/examples/vue/public/favicon.ico +0 -0
  90. package/examples/vue/src/App.vue +47 -0
  91. package/examples/vue/src/assets/base.css +74 -0
  92. package/examples/vue/src/assets/logo.svg +1 -0
  93. package/examples/vue/src/assets/main.css +35 -0
  94. package/examples/vue/src/components/HelloWorld.vue +40 -0
  95. package/examples/vue/src/components/TheWelcome.vue +86 -0
  96. package/examples/vue/src/components/WelcomeItem.vue +86 -0
  97. package/examples/vue/src/components/icons/IconCommunity.vue +7 -0
  98. package/examples/vue/src/components/icons/IconDocumentation.vue +7 -0
  99. package/examples/vue/src/components/icons/IconEcosystem.vue +7 -0
  100. package/examples/vue/src/components/icons/IconSupport.vue +7 -0
  101. package/examples/vue/src/components/icons/IconTooling.vue +19 -0
  102. package/examples/vue/src/main.ts +6 -0
  103. package/examples/vue/tsconfig.json +16 -0
  104. package/examples/vue/tsconfig.node.json +8 -0
  105. package/examples/vue/vite.config.ts +15 -0
  106. package/flake.nix +1 -1
  107. package/index.d.ts +9 -4
  108. package/index.js +27 -26
  109. package/package.json +19 -20
  110. package/post-build.js +18 -11
  111. package/scripts/gc-node-drop.js +38 -31
  112. package/scripts/gc-rust-drop.js +44 -38
  113. package/src/session.rs +3 -26
  114. package/src/tunnel.rs +1 -0
  115. package/trailer.d.ts +9 -4
  116. package/trailer.js +27 -26
  117. package/examples/ngrok-express-quickstart.js +0 -11
  118. package/examples/ngrok-express.js +0 -26
@@ -0,0 +1,40 @@
1
+ # vue
2
+
3
+ This template should help get you started developing with Vue 3 in Vite.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8
+
9
+ ## Type Support for `.vue` Imports in TS
10
+
11
+ TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
12
+
13
+ If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14
+
15
+ 1. Disable the built-in TypeScript Extension
16
+ 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17
+ 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18
+ 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
19
+
20
+ ## Customize configuration
21
+
22
+ See [Vite Configuration Reference](https://vitejs.dev/config/).
23
+
24
+ ## Project Setup
25
+
26
+ ```sh
27
+ npm install
28
+ ```
29
+
30
+ ### Compile and Hot-Reload for Development
31
+
32
+ ```sh
33
+ npm run dev
34
+ ```
35
+
36
+ ### Type-Check, Compile and Minify for Production
37
+
38
+ ```sh
39
+ npm run build
40
+ ```
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <link rel="icon" href="/favicon.ico">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Vite App</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,18 @@
1
+ const ngrok = require("@ngrok/ngrok");
2
+
3
+ // setup ngrok ingress in the parent process
4
+ var host = "localhost";
5
+ var port = "5173";
6
+ process.argv.forEach((item, index) => {
7
+ if (item == "--host") host = process.argv[index + 1];
8
+ if (item == "--port") port = process.argv[index + 1];
9
+ });
10
+
11
+ async function setup() {
12
+ const session = await new ngrok.NgrokSessionBuilder().authtokenFromEnv().connect();
13
+ const tunnel = await session.httpEndpoint().listen();
14
+ console.log(`Forwarding to: ${host}:${port} from ingress at: ${tunnel.url()}`);
15
+ tunnel.forwardTcp(`${host}:${port}`);
16
+ }
17
+
18
+ setup();
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "vue",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "vite",
7
+ "build": "run-p type-check build-only",
8
+ "preview": "vite preview",
9
+ "build-only": "vite build",
10
+ "type-check": "vue-tsc --noEmit"
11
+ },
12
+ "dependencies": {
13
+ "@ngrok/ngrok": "^0.2.0",
14
+ "vue": "^3.2.47"
15
+ },
16
+ "devDependencies": {
17
+ "@types/node": "^18.14.2",
18
+ "@vitejs/plugin-vue": "^4.0.0",
19
+ "@vue/tsconfig": "^0.1.3",
20
+ "npm-run-all": "^4.1.5",
21
+ "typescript": "~4.8.4",
22
+ "vite": "^4.1.4",
23
+ "vue-tsc": "^1.2.0"
24
+ }
25
+ }
Binary file
@@ -0,0 +1,47 @@
1
+ <script setup lang="ts">
2
+ import HelloWorld from './components/HelloWorld.vue'
3
+ import TheWelcome from './components/TheWelcome.vue'
4
+ </script>
5
+
6
+ <template>
7
+ <header>
8
+ <img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" />
9
+
10
+ <div class="wrapper">
11
+ <HelloWorld msg="You did it!" />
12
+ </div>
13
+ </header>
14
+
15
+ <main>
16
+ <TheWelcome />
17
+ </main>
18
+ </template>
19
+
20
+ <style scoped>
21
+ header {
22
+ line-height: 1.5;
23
+ }
24
+
25
+ .logo {
26
+ display: block;
27
+ margin: 0 auto 2rem;
28
+ }
29
+
30
+ @media (min-width: 1024px) {
31
+ header {
32
+ display: flex;
33
+ place-items: center;
34
+ padding-right: calc(var(--section-gap) / 2);
35
+ }
36
+
37
+ .logo {
38
+ margin: 0 2rem 0 0;
39
+ }
40
+
41
+ header .wrapper {
42
+ display: flex;
43
+ place-items: flex-start;
44
+ flex-wrap: wrap;
45
+ }
46
+ }
47
+ </style>
@@ -0,0 +1,74 @@
1
+ /* color palette from <https://github.com/vuejs/theme> */
2
+ :root {
3
+ --vt-c-white: #ffffff;
4
+ --vt-c-white-soft: #f8f8f8;
5
+ --vt-c-white-mute: #f2f2f2;
6
+
7
+ --vt-c-black: #181818;
8
+ --vt-c-black-soft: #222222;
9
+ --vt-c-black-mute: #282828;
10
+
11
+ --vt-c-indigo: #2c3e50;
12
+
13
+ --vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
14
+ --vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
15
+ --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
16
+ --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
17
+
18
+ --vt-c-text-light-1: var(--vt-c-indigo);
19
+ --vt-c-text-light-2: rgba(60, 60, 60, 0.66);
20
+ --vt-c-text-dark-1: var(--vt-c-white);
21
+ --vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
22
+ }
23
+
24
+ /* semantic color variables for this project */
25
+ :root {
26
+ --color-background: var(--vt-c-white);
27
+ --color-background-soft: var(--vt-c-white-soft);
28
+ --color-background-mute: var(--vt-c-white-mute);
29
+
30
+ --color-border: var(--vt-c-divider-light-2);
31
+ --color-border-hover: var(--vt-c-divider-light-1);
32
+
33
+ --color-heading: var(--vt-c-text-light-1);
34
+ --color-text: var(--vt-c-text-light-1);
35
+
36
+ --section-gap: 160px;
37
+ }
38
+
39
+ @media (prefers-color-scheme: dark) {
40
+ :root {
41
+ --color-background: var(--vt-c-black);
42
+ --color-background-soft: var(--vt-c-black-soft);
43
+ --color-background-mute: var(--vt-c-black-mute);
44
+
45
+ --color-border: var(--vt-c-divider-dark-2);
46
+ --color-border-hover: var(--vt-c-divider-dark-1);
47
+
48
+ --color-heading: var(--vt-c-text-dark-1);
49
+ --color-text: var(--vt-c-text-dark-2);
50
+ }
51
+ }
52
+
53
+ *,
54
+ *::before,
55
+ *::after {
56
+ box-sizing: border-box;
57
+ margin: 0;
58
+ position: relative;
59
+ font-weight: normal;
60
+ }
61
+
62
+ body {
63
+ min-height: 100vh;
64
+ color: var(--color-text);
65
+ background: var(--color-background);
66
+ transition: color 0.5s, background-color 0.5s;
67
+ line-height: 1.6;
68
+ font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
69
+ Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
70
+ font-size: 15px;
71
+ text-rendering: optimizeLegibility;
72
+ -webkit-font-smoothing: antialiased;
73
+ -moz-osx-font-smoothing: grayscale;
74
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>
@@ -0,0 +1,35 @@
1
+ @import './base.css';
2
+
3
+ #app {
4
+ max-width: 1280px;
5
+ margin: 0 auto;
6
+ padding: 2rem;
7
+
8
+ font-weight: normal;
9
+ }
10
+
11
+ a,
12
+ .green {
13
+ text-decoration: none;
14
+ color: hsla(160, 100%, 37%, 1);
15
+ transition: 0.4s;
16
+ }
17
+
18
+ @media (hover: hover) {
19
+ a:hover {
20
+ background-color: hsla(160, 100%, 37%, 0.2);
21
+ }
22
+ }
23
+
24
+ @media (min-width: 1024px) {
25
+ body {
26
+ display: flex;
27
+ place-items: center;
28
+ }
29
+
30
+ #app {
31
+ display: grid;
32
+ grid-template-columns: 1fr 1fr;
33
+ padding: 0 2rem;
34
+ }
35
+ }
@@ -0,0 +1,40 @@
1
+ <script setup lang="ts">
2
+ defineProps<{
3
+ msg: string
4
+ }>()
5
+ </script>
6
+
7
+ <template>
8
+ <div class="greetings">
9
+ <h1 class="green">{{ msg }}</h1>
10
+ <h3>
11
+ You’ve successfully created a project with
12
+ <a href="https://vitejs.dev/" target="_blank" rel="noopener">Vite</a> +
13
+ <a href="https://vuejs.org/" target="_blank" rel="noopener">Vue 3</a>.
14
+ </h3>
15
+ </div>
16
+ </template>
17
+
18
+ <style scoped>
19
+ h1 {
20
+ font-weight: 500;
21
+ font-size: 2.6rem;
22
+ top: -10px;
23
+ }
24
+
25
+ h3 {
26
+ font-size: 1.2rem;
27
+ }
28
+
29
+ .greetings h1,
30
+ .greetings h3 {
31
+ text-align: center;
32
+ }
33
+
34
+ @media (min-width: 1024px) {
35
+ .greetings h1,
36
+ .greetings h3 {
37
+ text-align: left;
38
+ }
39
+ }
40
+ </style>
@@ -0,0 +1,86 @@
1
+ <script setup lang="ts">
2
+ import WelcomeItem from './WelcomeItem.vue'
3
+ import DocumentationIcon from './icons/IconDocumentation.vue'
4
+ import ToolingIcon from './icons/IconTooling.vue'
5
+ import EcosystemIcon from './icons/IconEcosystem.vue'
6
+ import CommunityIcon from './icons/IconCommunity.vue'
7
+ import SupportIcon from './icons/IconSupport.vue'
8
+ </script>
9
+
10
+ <template>
11
+ <WelcomeItem>
12
+ <template #icon>
13
+ <DocumentationIcon />
14
+ </template>
15
+ <template #heading>Documentation</template>
16
+
17
+ Vue’s
18
+ <a href="https://vuejs.org/" target="_blank" rel="noopener">official documentation</a>
19
+ provides you with all information you need to get started.
20
+ </WelcomeItem>
21
+
22
+ <WelcomeItem>
23
+ <template #icon>
24
+ <ToolingIcon />
25
+ </template>
26
+ <template #heading>Tooling</template>
27
+
28
+ This project is served and bundled with
29
+ <a href="https://vitejs.dev/guide/features.html" target="_blank" rel="noopener">Vite</a>. The
30
+ recommended IDE setup is
31
+ <a href="https://code.visualstudio.com/" target="_blank" rel="noopener">VSCode</a> +
32
+ <a href="https://github.com/johnsoncodehk/volar" target="_blank" rel="noopener">Volar</a>. If
33
+ you need to test your components and web pages, check out
34
+ <a href="https://www.cypress.io/" target="_blank" rel="noopener">Cypress</a> and
35
+ <a href="https://on.cypress.io/component" target="_blank">Cypress Component Testing</a>.
36
+
37
+ <br />
38
+
39
+ More instructions are available in <code>README.md</code>.
40
+ </WelcomeItem>
41
+
42
+ <WelcomeItem>
43
+ <template #icon>
44
+ <EcosystemIcon />
45
+ </template>
46
+ <template #heading>Ecosystem</template>
47
+
48
+ Get official tools and libraries for your project:
49
+ <a href="https://pinia.vuejs.org/" target="_blank" rel="noopener">Pinia</a>,
50
+ <a href="https://router.vuejs.org/" target="_blank" rel="noopener">Vue Router</a>,
51
+ <a href="https://test-utils.vuejs.org/" target="_blank" rel="noopener">Vue Test Utils</a>, and
52
+ <a href="https://github.com/vuejs/devtools" target="_blank" rel="noopener">Vue Dev Tools</a>. If
53
+ you need more resources, we suggest paying
54
+ <a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">Awesome Vue</a>
55
+ a visit.
56
+ </WelcomeItem>
57
+
58
+ <WelcomeItem>
59
+ <template #icon>
60
+ <CommunityIcon />
61
+ </template>
62
+ <template #heading>Community</template>
63
+
64
+ Got stuck? Ask your question on
65
+ <a href="https://chat.vuejs.org" target="_blank" rel="noopener">Vue Land</a>, our official
66
+ Discord server, or
67
+ <a href="https://stackoverflow.com/questions/tagged/vue.js" target="_blank" rel="noopener"
68
+ >StackOverflow</a
69
+ >. You should also subscribe to
70
+ <a href="https://news.vuejs.org" target="_blank" rel="noopener">our mailing list</a> and follow
71
+ the official
72
+ <a href="https://twitter.com/vuejs" target="_blank" rel="noopener">@vuejs</a>
73
+ twitter account for latest news in the Vue world.
74
+ </WelcomeItem>
75
+
76
+ <WelcomeItem>
77
+ <template #icon>
78
+ <SupportIcon />
79
+ </template>
80
+ <template #heading>Support Vue</template>
81
+
82
+ As an independent project, Vue relies on community backing for its sustainability. You can help
83
+ us by
84
+ <a href="https://vuejs.org/sponsor/" target="_blank" rel="noopener">becoming a sponsor</a>.
85
+ </WelcomeItem>
86
+ </template>
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <div class="item">
3
+ <i>
4
+ <slot name="icon"></slot>
5
+ </i>
6
+ <div class="details">
7
+ <h3>
8
+ <slot name="heading"></slot>
9
+ </h3>
10
+ <slot></slot>
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <style scoped>
16
+ .item {
17
+ margin-top: 2rem;
18
+ display: flex;
19
+ }
20
+
21
+ .details {
22
+ flex: 1;
23
+ margin-left: 1rem;
24
+ }
25
+
26
+ i {
27
+ display: flex;
28
+ place-items: center;
29
+ place-content: center;
30
+ width: 32px;
31
+ height: 32px;
32
+
33
+ color: var(--color-text);
34
+ }
35
+
36
+ h3 {
37
+ font-size: 1.2rem;
38
+ font-weight: 500;
39
+ margin-bottom: 0.4rem;
40
+ color: var(--color-heading);
41
+ }
42
+
43
+ @media (min-width: 1024px) {
44
+ .item {
45
+ margin-top: 0;
46
+ padding: 0.4rem 0 1rem calc(var(--section-gap) / 2);
47
+ }
48
+
49
+ i {
50
+ top: calc(50% - 25px);
51
+ left: -26px;
52
+ position: absolute;
53
+ border: 1px solid var(--color-border);
54
+ background: var(--color-background);
55
+ border-radius: 8px;
56
+ width: 50px;
57
+ height: 50px;
58
+ }
59
+
60
+ .item:before {
61
+ content: ' ';
62
+ border-left: 1px solid var(--color-border);
63
+ position: absolute;
64
+ left: 0;
65
+ bottom: calc(50% + 25px);
66
+ height: calc(50% - 25px);
67
+ }
68
+
69
+ .item:after {
70
+ content: ' ';
71
+ border-left: 1px solid var(--color-border);
72
+ position: absolute;
73
+ left: 0;
74
+ top: calc(50% + 25px);
75
+ height: calc(50% - 25px);
76
+ }
77
+
78
+ .item:first-of-type:before {
79
+ display: none;
80
+ }
81
+
82
+ .item:last-of-type:after {
83
+ display: none;
84
+ }
85
+ }
86
+ </style>
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
3
+ <path
4
+ d="M15 4a1 1 0 1 0 0 2V4zm0 11v-1a1 1 0 0 0-1 1h1zm0 4l-.707.707A1 1 0 0 0 16 19h-1zm-4-4l.707-.707A1 1 0 0 0 11 14v1zm-4.707-1.293a1 1 0 0 0-1.414 1.414l1.414-1.414zm-.707.707l-.707-.707.707.707zM9 11v-1a1 1 0 0 0-.707.293L9 11zm-4 0h1a1 1 0 0 0-1-1v1zm0 4H4a1 1 0 0 0 1.707.707L5 15zm10-9h2V4h-2v2zm2 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2zm1 1v6h2V7h-2zm0 6a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2zm-1 1h-2v2h2v-2zm-3 1v4h2v-4h-2zm1.707 3.293l-4-4-1.414 1.414 4 4 1.414-1.414zM11 14H7v2h4v-2zm-4 0c-.276 0-.525-.111-.707-.293l-1.414 1.414C5.42 15.663 6.172 16 7 16v-2zm-.707 1.121l3.414-3.414-1.414-1.414-3.414 3.414 1.414 1.414zM9 12h4v-2H9v2zm4 0a3 3 0 0 0 3-3h-2a1 1 0 0 1-1 1v2zm3-3V3h-2v6h2zm0-6a3 3 0 0 0-3-3v2a1 1 0 0 1 1 1h2zm-3-3H3v2h10V0zM3 0a3 3 0 0 0-3 3h2a1 1 0 0 1 1-1V0zM0 3v6h2V3H0zm0 6a3 3 0 0 0 3 3v-2a1 1 0 0 1-1-1H0zm3 3h2v-2H3v2zm1-1v4h2v-4H4zm1.707 4.707l.586-.586-1.414-1.414-.586.586 1.414 1.414z"
5
+ />
6
+ </svg>
7
+ </template>
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" fill="currentColor">
3
+ <path
4
+ d="M11 2.253a1 1 0 1 0-2 0h2zm-2 13a1 1 0 1 0 2 0H9zm.447-12.167a1 1 0 1 0 1.107-1.666L9.447 3.086zM1 2.253L.447 1.42A1 1 0 0 0 0 2.253h1zm0 13H0a1 1 0 0 0 1.553.833L1 15.253zm8.447.833a1 1 0 1 0 1.107-1.666l-1.107 1.666zm0-14.666a1 1 0 1 0 1.107 1.666L9.447 1.42zM19 2.253h1a1 1 0 0 0-.447-.833L19 2.253zm0 13l-.553.833A1 1 0 0 0 20 15.253h-1zm-9.553-.833a1 1 0 1 0 1.107 1.666L9.447 14.42zM9 2.253v13h2v-13H9zm1.553-.833C9.203.523 7.42 0 5.5 0v2c1.572 0 2.961.431 3.947 1.086l1.107-1.666zM5.5 0C3.58 0 1.797.523.447 1.42l1.107 1.666C2.539 2.431 3.928 2 5.5 2V0zM0 2.253v13h2v-13H0zm1.553 13.833C2.539 15.431 3.928 15 5.5 15v-2c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM5.5 15c1.572 0 2.961.431 3.947 1.086l1.107-1.666C9.203 13.523 7.42 13 5.5 13v2zm5.053-11.914C11.539 2.431 12.928 2 14.5 2V0c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM14.5 2c1.573 0 2.961.431 3.947 1.086l1.107-1.666C18.203.523 16.421 0 14.5 0v2zm3.5.253v13h2v-13h-2zm1.553 12.167C18.203 13.523 16.421 13 14.5 13v2c1.573 0 2.961.431 3.947 1.086l1.107-1.666zM14.5 13c-1.92 0-3.703.523-5.053 1.42l1.107 1.666C11.539 15.431 12.928 15 14.5 15v-2z"
5
+ />
6
+ </svg>
7
+ </template>
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" fill="currentColor">
3
+ <path
4
+ d="M11.447 8.894a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm0 1.789a1 1 0 1 0 .894-1.789l-.894 1.789zM7.447 7.106a1 1 0 1 0-.894 1.789l.894-1.789zM10 9a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0H8zm9.447-5.606a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm2 .789a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zM18 5a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0h-2zm-5.447-4.606a1 1 0 1 0 .894-1.789l-.894 1.789zM9 1l.447-.894a1 1 0 0 0-.894 0L9 1zm-2.447.106a1 1 0 1 0 .894 1.789l-.894-1.789zm-6 3a1 1 0 1 0 .894 1.789L.553 4.106zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zm-2-.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 2.789a1 1 0 1 0 .894-1.789l-.894 1.789zM2 5a1 1 0 1 0-2 0h2zM0 7.5a1 1 0 1 0 2 0H0zm8.553 12.394a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 1a1 1 0 1 0 .894 1.789l-.894-1.789zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zM8 19a1 1 0 1 0 2 0H8zm2-2.5a1 1 0 1 0-2 0h2zm-7.447.394a1 1 0 1 0 .894-1.789l-.894 1.789zM1 15H0a1 1 0 0 0 .553.894L1 15zm1-2.5a1 1 0 1 0-2 0h2zm12.553 2.606a1 1 0 1 0 .894 1.789l-.894-1.789zM17 15l.447.894A1 1 0 0 0 18 15h-1zm1-2.5a1 1 0 1 0-2 0h2zm-7.447-5.394l-2 1 .894 1.789 2-1-.894-1.789zm-1.106 1l-2-1-.894 1.789 2 1 .894-1.789zM8 9v2.5h2V9H8zm8.553-4.894l-2 1 .894 1.789 2-1-.894-1.789zm.894 0l-2-1-.894 1.789 2 1 .894-1.789zM16 5v2.5h2V5h-2zm-4.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zm-2.894-1l-2 1 .894 1.789 2-1L8.553.106zM1.447 5.894l2-1-.894-1.789-2 1 .894 1.789zm-.894 0l2 1 .894-1.789-2-1-.894 1.789zM0 5v2.5h2V5H0zm9.447 13.106l-2-1-.894 1.789 2 1 .894-1.789zm0 1.789l2-1-.894-1.789-2 1 .894 1.789zM10 19v-2.5H8V19h2zm-6.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zM2 15v-2.5H0V15h2zm13.447 1.894l2-1-.894-1.789-2 1 .894 1.789zM18 15v-2.5h-2V15h2z"
5
+ />
6
+ </svg>
7
+ </template>
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
3
+ <path
4
+ d="M10 3.22l-.61-.6a5.5 5.5 0 0 0-7.666.105 5.5 5.5 0 0 0-.114 7.665L10 18.78l8.39-8.4a5.5 5.5 0 0 0-.114-7.665 5.5 5.5 0 0 0-7.666-.105l-.61.61z"
5
+ />
6
+ </svg>
7
+ </template>
@@ -0,0 +1,19 @@
1
+ <!-- This icon is from <https://github.com/Templarian/MaterialDesign>, distributed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0) license-->
2
+ <template>
3
+ <svg
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ xmlns:xlink="http://www.w3.org/1999/xlink"
6
+ aria-hidden="true"
7
+ role="img"
8
+ class="iconify iconify--mdi"
9
+ width="24"
10
+ height="24"
11
+ preserveAspectRatio="xMidYMid meet"
12
+ viewBox="0 0 24 24"
13
+ >
14
+ <path
15
+ d="M20 18v-4h-3v1h-2v-1H9v1H7v-1H4v4h16M6.33 8l-1.74 4H7v-1h2v1h6v-1h2v1h2.41l-1.74-4H6.33M9 5v1h6V5H9m12.84 7.61c.1.22.16.48.16.8V18c0 .53-.21 1-.6 1.41c-.4.4-.85.59-1.4.59H4c-.55 0-1-.19-1.4-.59C2.21 19 2 18.53 2 18v-4.59c0-.32.06-.58.16-.8L4.5 7.22C4.84 6.41 5.45 6 6.33 6H7V5c0-.55.18-1 .57-1.41C7.96 3.2 8.44 3 9 3h6c.56 0 1.04.2 1.43.59c.39.41.57.86.57 1.41v1h.67c.88 0 1.49.41 1.83 1.22l2.34 5.39z"
16
+ fill="currentColor"
17
+ ></path>
18
+ </svg>
19
+ </template>
@@ -0,0 +1,6 @@
1
+ import { createApp } from "vue";
2
+ import App from "./App.vue";
3
+
4
+ import "./assets/main.css";
5
+
6
+ createApp(App).mount("#app");
@@ -0,0 +1,16 @@
1
+ {
2
+ "extends": "@vue/tsconfig/tsconfig.web.json",
3
+ "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
4
+ "compilerOptions": {
5
+ "baseUrl": ".",
6
+ "paths": {
7
+ "@/*": ["./src/*"]
8
+ }
9
+ },
10
+
11
+ "references": [
12
+ {
13
+ "path": "./tsconfig.node.json"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "@vue/tsconfig/tsconfig.node.json",
3
+ "include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
4
+ "compilerOptions": {
5
+ "composite": true,
6
+ "types": ["node"]
7
+ }
8
+ }
@@ -0,0 +1,15 @@
1
+ import { fileURLToPath, URL } from "node:url";
2
+
3
+ import { defineConfig } from "vite";
4
+ import vue from "@vitejs/plugin-vue";
5
+ import "./ngrok.config.ts";
6
+
7
+ // https://vitejs.dev/config/
8
+ export default defineConfig({
9
+ plugins: [vue()],
10
+ resolve: {
11
+ alias: {
12
+ "@": fileURLToPath(new URL("./src", import.meta.url)),
13
+ },
14
+ },
15
+ });
package/flake.nix CHANGED
@@ -93,7 +93,7 @@
93
93
  OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib";
94
94
  OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include";
95
95
  shellHook = ''
96
- export PATH="$PATH:node_modules/.bin"
96
+ export PATH="$PATH:node_modules/.bin:`pwd`/node_modules/.bin"
97
97
  '';
98
98
  buildInputs = with pkgs; [
99
99
  toolchain
package/index.d.ts CHANGED
@@ -434,11 +434,16 @@ export class NgrokLabeledTunnelBuilder {
434
434
  label(label: string, value: string): this
435
435
  }
436
436
  /** Generate, or convert a given tunnel, into one that can be passed into net.Server.listen(). */
437
- export function listenable(tunnel?: (NgrokHttpTunnel|NgrokTcpTunnel|NgrokTlsTunnel|NgrokLabeledTunnel)): (NgrokHttpTunnel|NgrokTcpTunnel|NgrokTlsTunnel|NgrokLabeledTunnel)
437
+ export function listenable(
438
+ tunnel?: NgrokHttpTunnel | NgrokTcpTunnel | NgrokTlsTunnel | NgrokLabeledTunnel
439
+ ): NgrokHttpTunnel | NgrokTcpTunnel | NgrokTlsTunnel | NgrokLabeledTunnel;
438
440
  /** Start the given net.Server listening to a generated, or passed in, tunnel. */
439
- export function listen(server: import("net").Server, tunnel?: (NgrokHttpTunnel|NgrokTcpTunnel|NgrokTlsTunnel|NgrokLabeledTunnel)): (NgrokHttpTunnel|NgrokTcpTunnel|NgrokTlsTunnel|NgrokLabeledTunnel)
440
- /**
441
+ export function listen(
442
+ server: import("net").Server,
443
+ tunnel?: NgrokHttpTunnel | NgrokTcpTunnel | NgrokTlsTunnel | NgrokLabeledTunnel
444
+ ): NgrokHttpTunnel | NgrokTcpTunnel | NgrokTlsTunnel | NgrokLabeledTunnel;
445
+ /**
441
446
  * Register a console.log callback for ngrok INFO logging.
442
447
  * Optionally set the logging level to one of ERROR, WARN, INFO, DEBUG, or TRACE.
443
448
  */
444
- export function consoleLog(level?: String)
449
+ export function consoleLog(level?: String);