Skip to content

Commit 799f686

Browse files
committed
chore: make the project structure more consistent
1 parent 09dcdbe commit 799f686

File tree

15 files changed

+15
-15
lines changed

15 files changed

+15
-15
lines changed

src/auth/routes/app_auth_login_provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { response } from "../../utils";
1+
import { response } from "../../core/utils";
22

33
const fs = require("fs").promises;
44
const path = require("path");

src/auth/routes/app_auth_logout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { response } from "../../utils";
1+
import { response } from "../../core/utils";
22
const SWA_CLI_HOST = "http://localhost:" + process.env.SWA_CLI_PORT;
33

44
const httpTrigger = async function (context: Context, req: ServerRequest) {

src/auth/routes/app_auth_me.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { decodeCookie, response, validateCookie } from "../../utils";
1+
import { decodeCookie, response, validateCookie } from "../../core/utils";
22

33
const httpTrigger = async function (context: Context, req: ServerRequest) {
44
const { cookie } = req.headers;

src/auth/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createServer, ServerResponse } from "http";
2-
import { argv, serializeCookie } from "../utils";
2+
import { argv, serializeCookie } from "../core/utils";
33
import url from "url";
44

55
const port = argv<number>("--port") || 4242;

src/cli/commands/start.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import fs from "fs";
22
import path from "path";
33
import shell from "shelljs";
4-
import builder from "../../builder";
5-
import { createRuntimeHost } from "../../runtimeHost";
6-
import { getBin, isHttpUrl, isPortAvailable, parseUrl, readConfigFile, validateDevServerConfig } from "../../utils";
7-
import { DEFAULT_CONFIG } from "../config";
4+
import builder from "../../core/builder";
5+
import { createRuntimeHost } from "../../core/runtimeHost";
6+
import { getBin, isHttpUrl, isPortAvailable, parseUrl, readConfigFile, validateDevServerConfig } from "../../core/utils";
7+
import { DEFAULT_CONFIG } from "../../config";
88

99
export async function start(startContext: string, program: CLIConfig) {
1010
let useAppDevServer = undefined;
@@ -134,7 +134,7 @@ export async function start(startContext: string, program: CLIConfig) {
134134
`-c 'bgYellow.bold,bgMagenta.bold,bgCyan.bold,bgGreen.bold'`,
135135

136136
// start the reverse proxy
137-
`"node ../proxy.js"`,
137+
`"node ../proxy/server.js"`,
138138

139139
// emulate auth
140140
`"node ../auth/server.js --host=${program.host} --port=${authPort}"`,

src/cli/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ const [, , ...args] = process.argv;
44
process.title = ["swa", ...args].join(" ");
55

66
import program from "commander";
7-
import { parsePort } from "../utils";
7+
import { parsePort } from "../core/utils";
88
import { start } from "./commands/start";
9-
import { DEFAULT_CONFIG } from "./config";
9+
import { DEFAULT_CONFIG } from "../config";
1010

1111
(async function () {
1212
const cli: CLIConfig & program.Command = program
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DEFAULT_CONFIG } from "./cli/config";
1+
import { DEFAULT_CONFIG } from "../config";
22
import { detectRuntime, RuntimeType } from "./runtimes";
33
import { getBin } from "./utils";
44

0 commit comments

Comments
 (0)