@ngrok/ngrok 0.8.0 → 0.9.1

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 (146) hide show
  1. package/CHANGELOG.md +12 -2
  2. package/CONTRIBUTING.md +4 -4
  3. package/README.md +179 -147
  4. package/index.d.ts +71 -16
  5. package/index.js +8 -6
  6. package/package.json +37 -16
  7. package/.envrc +0 -1
  8. package/.gitattributes +0 -3
  9. package/.prettierrc.json +0 -3
  10. package/.yarnrc.yml +0 -3
  11. package/Cargo.toml +0 -34
  12. package/RELEASE.md +0 -26
  13. package/build.rs +0 -5
  14. package/docs/.nojekyll +0 -1
  15. package/docs/assets/highlight.css +0 -85
  16. package/docs/assets/main.js +0 -58
  17. package/docs/assets/search.js +0 -1
  18. package/docs/assets/style.css +0 -1367
  19. package/docs/classes/HttpListenerBuilder.html +0 -594
  20. package/docs/classes/LabeledListenerBuilder.html +0 -206
  21. package/docs/classes/Listener.html +0 -241
  22. package/docs/classes/Session.html +0 -207
  23. package/docs/classes/SessionBuilder.html +0 -465
  24. package/docs/classes/TcpListenerBuilder.html +0 -281
  25. package/docs/classes/TlsListenerBuilder.html +0 -322
  26. package/docs/classes/UpdateRequest.html +0 -131
  27. package/docs/functions/authtoken.html +0 -89
  28. package/docs/functions/connect.html +0 -89
  29. package/docs/functions/consoleLog.html +0 -90
  30. package/docs/functions/disconnect.html +0 -89
  31. package/docs/functions/getListener.html +0 -89
  32. package/docs/functions/getListenerByUrl.html +0 -89
  33. package/docs/functions/kill.html +0 -84
  34. package/docs/functions/listen.html +0 -92
  35. package/docs/functions/listenable.html +0 -85
  36. package/docs/functions/listeners.html +0 -84
  37. package/docs/functions/loggingCallback.html +0 -108
  38. package/docs/index.html +0 -292
  39. package/docs/interfaces/Config.html +0 -734
  40. package/docs/modules.html +0 -106
  41. package/examples/domain.crt +0 -18
  42. package/examples/domain.key +0 -27
  43. package/examples/express/ngrok-express-quickstart.js +0 -11
  44. package/examples/express/ngrok-express.js +0 -28
  45. package/examples/express/package.json +0 -7
  46. package/examples/fastify/ngrok-fastify.js +0 -26
  47. package/examples/fastify/package.json +0 -7
  48. package/examples/hapi/ngrok-hapi.js +0 -35
  49. package/examples/hapi/package.json +0 -7
  50. package/examples/koa/ngrok-koa.js +0 -12
  51. package/examples/koa/package.json +0 -7
  52. package/examples/nestjs/.eslintrc.js +0 -25
  53. package/examples/nestjs/.prettierrc +0 -4
  54. package/examples/nestjs/README.md +0 -73
  55. package/examples/nestjs/nest-cli.json +0 -8
  56. package/examples/nestjs/package.json +0 -70
  57. package/examples/nestjs/src/app.controller.spec.ts +0 -22
  58. package/examples/nestjs/src/app.controller.ts +0 -12
  59. package/examples/nestjs/src/app.module.ts +0 -10
  60. package/examples/nestjs/src/app.service.ts +0 -8
  61. package/examples/nestjs/src/main.ts +0 -17
  62. package/examples/nestjs/test/app.e2e-spec.ts +0 -24
  63. package/examples/nestjs/test/jest-e2e.json +0 -9
  64. package/examples/nestjs/tsconfig.build.json +0 -4
  65. package/examples/nestjs/tsconfig.json +0 -21
  66. package/examples/nextjs/README.md +0 -3
  67. package/examples/nextjs/next.config.js +0 -12
  68. package/examples/nextjs/ngrok.config.js +0 -23
  69. package/examples/nextjs/package.json +0 -6
  70. package/examples/nextjs/pages/index.js +0 -5
  71. package/examples/ngrok-connect-full.js +0 -67
  72. package/examples/ngrok-connect-minimal.js +0 -17
  73. package/examples/ngrok-http-full.js +0 -81
  74. package/examples/ngrok-http-minimum.js +0 -18
  75. package/examples/ngrok-labeled.js +0 -43
  76. package/examples/ngrok-listen.js +0 -11
  77. package/examples/ngrok-tcp.js +0 -37
  78. package/examples/ngrok-tls.js +0 -40
  79. package/examples/ngrok-typescript.ts +0 -69
  80. package/examples/ngrok-windows-pipe.js +0 -25
  81. package/examples/ngrok-winston.js +0 -24
  82. package/examples/package.json +0 -15
  83. package/examples/remix/.eslintrc.js +0 -4
  84. package/examples/remix/README.md +0 -53
  85. package/examples/remix/app/entry.client.tsx +0 -18
  86. package/examples/remix/app/entry.server.tsx +0 -101
  87. package/examples/remix/app/root.tsx +0 -20
  88. package/examples/remix/app/routes/_index.tsx +0 -30
  89. package/examples/remix/ngrok.config.js +0 -16
  90. package/examples/remix/package.json +0 -30
  91. package/examples/remix/public/favicon.ico +0 -0
  92. package/examples/remix/remix.config.js +0 -16
  93. package/examples/remix/remix.env.d.ts +0 -2
  94. package/examples/remix/tsconfig.json +0 -22
  95. package/examples/svelte/README.md +0 -38
  96. package/examples/svelte/jsconfig.json +0 -17
  97. package/examples/svelte/ngrok.config.cjs +0 -20
  98. package/examples/svelte/package.json +0 -22
  99. package/examples/svelte/src/app.d.ts +0 -12
  100. package/examples/svelte/src/app.html +0 -12
  101. package/examples/svelte/src/routes/+page.svelte +0 -2
  102. package/examples/svelte/static/favicon.png +0 -0
  103. package/examples/svelte/svelte.config.js +0 -14
  104. package/examples/svelte/vite.config.js +0 -6
  105. package/examples/vue/.vscode/extensions.json +0 -3
  106. package/examples/vue/README.md +0 -40
  107. package/examples/vue/env.d.ts +0 -1
  108. package/examples/vue/index.html +0 -13
  109. package/examples/vue/ngrok.config.ts +0 -18
  110. package/examples/vue/package.json +0 -25
  111. package/examples/vue/public/favicon.ico +0 -0
  112. package/examples/vue/src/App.vue +0 -47
  113. package/examples/vue/src/assets/base.css +0 -74
  114. package/examples/vue/src/assets/logo.svg +0 -1
  115. package/examples/vue/src/assets/main.css +0 -35
  116. package/examples/vue/src/components/HelloWorld.vue +0 -40
  117. package/examples/vue/src/components/TheWelcome.vue +0 -86
  118. package/examples/vue/src/components/WelcomeItem.vue +0 -86
  119. package/examples/vue/src/components/icons/IconCommunity.vue +0 -7
  120. package/examples/vue/src/components/icons/IconDocumentation.vue +0 -7
  121. package/examples/vue/src/components/icons/IconEcosystem.vue +0 -7
  122. package/examples/vue/src/components/icons/IconSupport.vue +0 -7
  123. package/examples/vue/src/components/icons/IconTooling.vue +0 -19
  124. package/examples/vue/src/main.ts +0 -6
  125. package/examples/vue/tsconfig.json +0 -16
  126. package/examples/vue/tsconfig.node.json +0 -8
  127. package/examples/vue/vite.config.ts +0 -15
  128. package/flake.lock +0 -82
  129. package/flake.nix +0 -111
  130. package/post-build.js +0 -45
  131. package/scripts/gc-node-drop.js +0 -49
  132. package/scripts/gc-rust-drop.js +0 -53
  133. package/src/config.rs +0 -285
  134. package/src/connect.rs +0 -340
  135. package/src/http.rs +0 -244
  136. package/src/lib.rs +0 -39
  137. package/src/listener.rs +0 -495
  138. package/src/listener_builder.rs +0 -204
  139. package/src/logging.rs +0 -140
  140. package/src/session.rs +0 -551
  141. package/src/tcp.rs +0 -18
  142. package/src/tls.rs +0 -44
  143. package/trailer.d.ts +0 -15
  144. package/trailer.js +0 -382
  145. package/tsconfig.json +0 -8
  146. package/typedoc.json +0 -3
@@ -1,101 +0,0 @@
1
- /**
2
- * By default, Remix will handle generating the HTTP Response for you.
3
- * You are free to delete this file if you'd like to, but if you ever want it revealed again, you can run `npx remix reveal` ✨
4
- * For more information, see https://remix.run/docs/en/main/file-conventions/entry.server
5
- */
6
-
7
- import { PassThrough } from "node:stream";
8
- import type { EntryContext } from "@remix-run/node";
9
- import { Response } from "@remix-run/node";
10
- import { RemixServer } from "@remix-run/react";
11
- import isbot from "isbot";
12
- import { renderToPipeableStream } from "react-dom/server";
13
-
14
- const ABORT_DELAY = 5_000;
15
-
16
- export default function handleRequest(
17
- request: Request,
18
- responseStatusCode: number,
19
- responseHeaders: Headers,
20
- remixContext: EntryContext
21
- ) {
22
- return isbot(request.headers.get("user-agent"))
23
- ? handleBotRequest(request, responseStatusCode, responseHeaders, remixContext)
24
- : handleBrowserRequest(request, responseStatusCode, responseHeaders, remixContext);
25
- }
26
-
27
- function handleBotRequest(
28
- request: Request,
29
- responseStatusCode: number,
30
- responseHeaders: Headers,
31
- remixContext: EntryContext
32
- ) {
33
- return new Promise((resolve, reject) => {
34
- const { pipe, abort } = renderToPipeableStream(
35
- <RemixServer context={remixContext} url={request.url} abortDelay={ABORT_DELAY} />,
36
- {
37
- onAllReady() {
38
- const body = new PassThrough();
39
-
40
- responseHeaders.set("Content-Type", "text/html");
41
-
42
- resolve(
43
- new Response(body, {
44
- headers: responseHeaders,
45
- status: responseStatusCode,
46
- })
47
- );
48
-
49
- pipe(body);
50
- },
51
- onShellError(error: unknown) {
52
- reject(error);
53
- },
54
- onError(error: unknown) {
55
- responseStatusCode = 500;
56
- console.error(error);
57
- },
58
- }
59
- );
60
-
61
- setTimeout(abort, ABORT_DELAY);
62
- });
63
- }
64
-
65
- function handleBrowserRequest(
66
- request: Request,
67
- responseStatusCode: number,
68
- responseHeaders: Headers,
69
- remixContext: EntryContext
70
- ) {
71
- return new Promise((resolve, reject) => {
72
- const { pipe, abort } = renderToPipeableStream(
73
- <RemixServer context={remixContext} url={request.url} abortDelay={ABORT_DELAY} />,
74
- {
75
- onShellReady() {
76
- const body = new PassThrough();
77
-
78
- responseHeaders.set("Content-Type", "text/html");
79
-
80
- resolve(
81
- new Response(body, {
82
- headers: responseHeaders,
83
- status: responseStatusCode,
84
- })
85
- );
86
-
87
- pipe(body);
88
- },
89
- onShellError(error: unknown) {
90
- reject(error);
91
- },
92
- onError(error: unknown) {
93
- console.error(error);
94
- responseStatusCode = 500;
95
- },
96
- }
97
- );
98
-
99
- setTimeout(abort, ABORT_DELAY);
100
- });
101
- }
@@ -1,20 +0,0 @@
1
- import { Links, LiveReload, Meta, Outlet, Scripts, ScrollRestoration } from "@remix-run/react";
2
-
3
- export default function App() {
4
- return (
5
- <html lang="en">
6
- <head>
7
- <meta charSet="utf-8" />
8
- <meta name="viewport" content="width=device-width,initial-scale=1" />
9
- <Meta />
10
- <Links />
11
- </head>
12
- <body>
13
- <Outlet />
14
- <ScrollRestoration />
15
- <Scripts />
16
- <LiveReload />
17
- </body>
18
- </html>
19
- );
20
- }
@@ -1,30 +0,0 @@
1
- import type { V2_MetaFunction } from "@remix-run/react";
2
-
3
- export const meta: V2_MetaFunction = () => {
4
- return [{ title: "New Remix App" }];
5
- };
6
-
7
- export default function Index() {
8
- return (
9
- <div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.4" }}>
10
- <h1>Welcome to Remix</h1>
11
- <ul>
12
- <li>
13
- <a target="_blank" href="https://remix.run/tutorials/blog" rel="noreferrer">
14
- 15m Quickstart Blog Tutorial
15
- </a>
16
- </li>
17
- <li>
18
- <a target="_blank" href="https://remix.run/tutorials/jokes" rel="noreferrer">
19
- Deep Dive Jokes App Tutorial
20
- </a>
21
- </li>
22
- <li>
23
- <a target="_blank" href="https://remix.run/docs" rel="noreferrer">
24
- Remix Docs
25
- </a>
26
- </li>
27
- </ul>
28
- </div>
29
- );
30
- }
@@ -1,16 +0,0 @@
1
- const ngrok = require("@ngrok/ngrok");
2
-
3
- // setup ngrok ingress in the parent process
4
- var port = process.env.PORT || "3000";
5
- process.argv.forEach((item, index) => {
6
- if (["--port", "-p"].includes(item)) port = process.argv[index + 1];
7
- });
8
-
9
- async function setup() {
10
- const session = await new ngrok.SessionBuilder().authtokenFromEnv().connect();
11
- const listener = await session.httpEndpoint().listen();
12
- console.log(`Forwarding to: localhost:${port} from ingress at: ${listener.url()}`);
13
- listener.forward(`localhost:${port}`);
14
- }
15
-
16
- setup();
@@ -1,30 +0,0 @@
1
- {
2
- "private": true,
3
- "sideEffects": false,
4
- "scripts": {
5
- "build": "remix build",
6
- "dev": "remix dev",
7
- "start": "remix-serve build",
8
- "typecheck": "tsc"
9
- },
10
- "dependencies": {
11
- "@ngrok/ngrok": "^0.*",
12
- "@remix-run/node": "^1.15.0",
13
- "@remix-run/react": "^1.15.0",
14
- "@remix-run/serve": "^1.15.0",
15
- "isbot": "^3.6.5",
16
- "react": "^18.2.0",
17
- "react-dom": "^18.2.0"
18
- },
19
- "devDependencies": {
20
- "@remix-run/dev": "^1.15.0",
21
- "@remix-run/eslint-config": "^1.15.0",
22
- "@types/react": "^18.0.25",
23
- "@types/react-dom": "^18.0.8",
24
- "eslint": "^8.27.0",
25
- "typescript": "^4.8.4"
26
- },
27
- "engines": {
28
- "node": ">=14"
29
- }
30
- }
Binary file
@@ -1,16 +0,0 @@
1
- require("./ngrok.config.js");
2
-
3
- /** @type {import('@remix-run/dev').AppConfig} */
4
- module.exports = {
5
- ignoredRouteFiles: ["**/.*"],
6
- // appDirectory: "app",
7
- // assetsBuildDirectory: "public/build",
8
- // serverBuildPath: "build/index.js",
9
- // publicPath: "/build/",
10
- future: {
11
- v2_errorBoundary: true,
12
- v2_meta: true,
13
- v2_normalizeFormMethod: true,
14
- v2_routeConvention: true,
15
- },
16
- };
@@ -1,2 +0,0 @@
1
- /// <reference types="@remix-run/dev" />
2
- /// <reference types="@remix-run/node" />
@@ -1,22 +0,0 @@
1
- {
2
- "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
3
- "compilerOptions": {
4
- "lib": ["DOM", "DOM.Iterable", "ES2019"],
5
- "isolatedModules": true,
6
- "esModuleInterop": true,
7
- "jsx": "react-jsx",
8
- "moduleResolution": "node",
9
- "resolveJsonModule": true,
10
- "target": "ES2019",
11
- "strict": true,
12
- "allowJs": true,
13
- "forceConsistentCasingInFileNames": true,
14
- "baseUrl": ".",
15
- "paths": {
16
- "~/*": ["./app/*"]
17
- },
18
-
19
- // Remix takes care of building everything in `remix build`.
20
- "noEmit": true
21
- }
22
- }
@@ -1,38 +0,0 @@
1
- # create-svelte
2
-
3
- Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
4
-
5
- ## Creating a project
6
-
7
- If you're seeing this, you've probably already done this step. Congrats!
8
-
9
- ```bash
10
- # create a new project in the current directory
11
- npm create svelte@latest
12
-
13
- # create a new project in my-app
14
- npm create svelte@latest my-app
15
- ```
16
-
17
- ## Developing
18
-
19
- Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
20
-
21
- ```bash
22
- npm run dev
23
-
24
- # or start the server and open the app in a new browser tab
25
- npm run dev -- --open
26
- ```
27
-
28
- ## Building
29
-
30
- To create a production version of your app:
31
-
32
- ```bash
33
- npm run build
34
- ```
35
-
36
- You can preview the production build with `npm run preview`.
37
-
38
- > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
@@ -1,17 +0,0 @@
1
- {
2
- "extends": "./.svelte-kit/tsconfig.json",
3
- "compilerOptions": {
4
- "allowJs": true,
5
- "checkJs": true,
6
- "esModuleInterop": true,
7
- "forceConsistentCasingInFileNames": true,
8
- "resolveJsonModule": true,
9
- "skipLibCheck": true,
10
- "sourceMap": true,
11
- "strict": true
12
- }
13
- // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias and https://kit.svelte.dev/docs/configuration#files
14
- //
15
- // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
16
- // from the referenced tsconfig.json - TypeScript does not merge them in
17
- }
@@ -1,20 +0,0 @@
1
- const ngrok = require("@ngrok/ngrok");
2
-
3
- // setup ngrok ingress in the parent process
4
- var host = "localhost";
5
- var port = "5173";
6
- var run = true;
7
- process.argv.forEach((item, index) => {
8
- if (item.includes("postinstall")) run = false;
9
- if (item == "--host") host = process.argv[index + 1];
10
- if (item == "--port") port = process.argv[index + 1];
11
- });
12
-
13
- async function setup() {
14
- const session = await new ngrok.SessionBuilder().authtokenFromEnv().connect();
15
- const listener = await session.httpEndpoint().listen();
16
- console.log(`Forwarding to: ${host}:${port} from ingress at: ${listener.url()}`);
17
- listener.forward(`${host}:${port}`);
18
- }
19
-
20
- if (run) setup();
@@ -1,22 +0,0 @@
1
- {
2
- "name": "svelte",
3
- "version": "0.0.1",
4
- "private": true,
5
- "scripts": {
6
- "dev": "vite dev",
7
- "build": "vite build",
8
- "preview": "vite preview",
9
- "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
10
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch"
11
- },
12
- "devDependencies": {
13
- "@ngrok/ngrok": "^0.*",
14
- "@sveltejs/adapter-auto": "^2.0.0",
15
- "@sveltejs/kit": "^1.5.0",
16
- "svelte": "^3.54.0",
17
- "svelte-check": "^3.0.1",
18
- "typescript": "^5.0.0",
19
- "vite": "^4.2.0"
20
- },
21
- "type": "module"
22
- }
@@ -1,12 +0,0 @@
1
- // See https://kit.svelte.dev/docs/types#app
2
- // for information about these interfaces
3
- declare global {
4
- namespace App {
5
- // interface Error {}
6
- // interface Locals {}
7
- // interface PageData {}
8
- // interface Platform {}
9
- }
10
- }
11
-
12
- export {};
@@ -1,12 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <link rel="icon" href="%sveltekit.assets%/favicon.png" />
6
- <meta name="viewport" content="width=device-width" />
7
- %sveltekit.head%
8
- </head>
9
- <body data-sveltekit-preload-data="hover">
10
- <div style="display: contents">%sveltekit.body%</div>
11
- </body>
12
- </html>
@@ -1,2 +0,0 @@
1
- <h1>Welcome to SvelteKit</h1>
2
- <p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
Binary file
@@ -1,14 +0,0 @@
1
- import adapter from "@sveltejs/adapter-auto";
2
- import "./ngrok.config.cjs";
3
-
4
- /** @type {import('@sveltejs/kit').Config} */
5
- const config = {
6
- kit: {
7
- // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
8
- // If your environment is not supported or you settled on a specific environment, switch out the adapter.
9
- // See https://kit.svelte.dev/docs/adapters for more information about adapters.
10
- adapter: adapter(),
11
- },
12
- };
13
-
14
- export default config;
@@ -1,6 +0,0 @@
1
- import { sveltekit } from "@sveltejs/kit/vite";
2
- import { defineConfig } from "vite";
3
-
4
- export default defineConfig({
5
- plugins: [sveltekit()],
6
- });
@@ -1,3 +0,0 @@
1
- {
2
- "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
3
- }
@@ -1,40 +0,0 @@
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
- ```
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />
@@ -1,13 +0,0 @@
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>
@@ -1,18 +0,0 @@
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.SessionBuilder().authtokenFromEnv().connect();
13
- const listener = await session.httpEndpoint().listen();
14
- console.log(`Forwarding to: ${host}:${port} from ingress at: ${listener.url()}`);
15
- listener.forward(`${host}:${port}`);
16
- }
17
-
18
- setup();
@@ -1,25 +0,0 @@
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.*",
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
@@ -1,47 +0,0 @@
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>
@@ -1,74 +0,0 @@
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
- }
@@ -1 +0,0 @@
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>