Skip to content
This repository was archived by the owner on Sep 12, 2019. It is now read-only.

Commit b37920a

Browse files
authored
Merge pull request #122 from netlify/addServeFunctions
Extract serveFunctions from ZISI
2 parents f68215c + f6fbb9c commit b37920a

15 files changed

+474
-53
lines changed

package-lock.json

+44-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,31 @@
66
"bugs": "https://github.com/netlify/netlify-dev-plugin/issues",
77
"dependencies": {
88
"@netlify/cli-utils": "^1.0.1",
9-
"@netlify/rules-proxy": "^0.1.2",
9+
"@netlify/rules-proxy": "^0.1.3",
1010
"@netlify/zip-it-and-ship-it": "^0.1.3",
1111
"@oclif/command": "^1",
1212
"@oclif/config": "^1",
1313
"ascii-table": "0.0.9",
14+
"body-parser": "^1.18.3",
1415
"boxen": "^3.0.0",
1516
"chalk": "^2.4.2",
1617
"chokidar": "^2.1.5",
1718
"copy-template-dir": "^1.4.0",
1819
"execa": "^1.0.0",
20+
"express": "^4.16.4",
21+
"express-logging": "^1.1.1",
1922
"fs-extra": "^7.0.1",
2023
"fuzzy": "^0.1.3",
21-
"get-port": "^4.1.0",
24+
"get-port": "^4.2.0",
2225
"gh-release-fetch": "^1.0.3",
2326
"http-proxy": "^1.17.0",
2427
"inquirer": "^6.2.2",
2528
"inquirer-autocomplete-prompt": "^1.0.1",
2629
"netlify": "2.4.1",
30+
"netlify-cli-logo": "^1.0.0",
2731
"node-fetch": "^2.3.0",
2832
"ora": "^3.4.0",
33+
"querystring": "^0.2.0",
2934
"safe-join": "^0.1.2",
3035
"static-server": "^2.2.1",
3136
"wait-port": "^0.2.2",

src/cli-logo.js

-10
This file was deleted.

src/commands/dev/exec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const {
66
NETLIFYDEVLOG,
77
NETLIFYDEVWARN,
88
NETLIFYDEVERR
9-
} = require("../../cli-logo");
9+
} = require("netlify-cli-logo");
1010

1111
class ExecCommand extends Command {
1212
async run() {

src/commands/dev/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const httpProxy = require("http-proxy");
55
const waitPort = require("wait-port");
66
const getPort = require("get-port");
77
const chokidar = require("chokidar");
8-
const { serveFunctions } = require("@netlify/zip-it-and-ship-it");
8+
const { serveFunctions } = require("../../utils/serveFunctions");
99
const { serverSettings } = require("../../detect-server");
1010
const { detectFunctionsBuilder } = require("../../detect-functions-builder");
1111
const Command = require("@netlify/cli-utils");
@@ -17,7 +17,7 @@ const {
1717
NETLIFYDEVLOG,
1818
NETLIFYDEVWARN,
1919
NETLIFYDEVERR
20-
} = require("../../cli-logo");
20+
} = require("netlify-cli-logo");
2121
const boxen = require("boxen");
2222
const { createTunnel, connectTunnel } = require("../../live-tunnel");
2323

src/commands/functions/build.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const {
77
NETLIFYDEVLOG,
88
NETLIFYDEVWARN,
99
NETLIFYDEVERR
10-
} = require("../../cli-logo");
10+
} = require("netlify-cli-logo");
1111

1212
class FunctionsBuildCommand extends Command {
1313
async run() {

src/commands/functions/create.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const {
1919
NETLIFYDEVLOG,
2020
NETLIFYDEVWARN,
2121
NETLIFYDEVERR
22-
} = require("../../cli-logo");
22+
} = require("netlify-cli-logo");
2323

2424
const templatesDir = path.resolve(__dirname, "../../functions-templates");
2525

src/commands/functions/serve.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const {
44
NETLIFYDEVLOG,
55
NETLIFYDEVWARN,
66
NETLIFYDEVERR
7-
} = require("../../cli-logo");
7+
} = require("netlify-cli-logo");
88

99
class FunctionsServeCommand extends Command {
1010
async run() {

src/commands/functions/update.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const {
55
NETLIFYDEVLOG,
66
NETLIFYDEVWARN,
77
NETLIFYDEVERR
8-
} = require("../../cli-logo");
8+
} = require("netlify-cli-logo");
99

1010
class FunctionsUpdateCommand extends Command {
1111
async run() {

src/detect-server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const {
55
NETLIFYDEVLOG,
66
NETLIFYDEVWARN,
77
NETLIFYDEVERR
8-
} = require("./cli-logo");
8+
} = require("netlify-cli-logo");
99
const inquirer = require("inquirer");
1010
const fs = require("fs");
1111
const detectors = fs

src/detectors/utils/jsdetect.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const { existsSync, readFileSync } = require("fs");
77
let pkgJSON = null;
88
let yarnExists = false;
99
let warnedAboutEmptyScript = false;
10-
const { NETLIFYDEVWARN } = require("../../cli-logo.js");
10+
const { NETLIFYDEVWARN } = require("netlify-cli-logo");
1111

1212
/** hold package.json in a singleton so we dont do expensive parsing repeatedly */
1313
function getPkgJSON() {

src/live-tunnel.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ const path = require("path");
55
const execa = require("execa");
66
const chalk = require("chalk");
77
const { fetchLatest, updateAvailable } = require("gh-release-fetch");
8-
const { NETLIFYDEVLOG, NETLIFYDEVWARN, NETLIFYDEVERR } = require("./cli-logo");
8+
const {
9+
NETLIFYDEVLOG,
10+
NETLIFYDEVWARN,
11+
NETLIFYDEVERR
12+
} = require("netlify-cli-logo");
913

1014
async function createTunnel(siteId, netlifyApiToken, log) {
1115
await installTunnelClient(log);

src/utils/dev.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
// bit of a hasty abstraction but recommended by oclif
33
const { getAddons } = require("netlify/src/addons");
44
const chalk = require("chalk");
5-
const { NETLIFYDEVLOG, NETLIFYDEVWARN, NETLIFYDEVERR } = require("../cli-logo");
5+
const {
6+
NETLIFYDEVLOG,
7+
NETLIFYDEVWARN,
8+
NETLIFYDEVERR
9+
} = require("netlify-cli-logo");
610
/**
711
* inject environment variables from netlify addons and buildbot
812
* into your local dev process.env

0 commit comments

Comments
 (0)