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

Extract serveFunctions from ZISI #122

Merged
merged 3 commits into from
Apr 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 44 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,31 @@
"bugs": "https://github.com/netlify/netlify-dev-plugin/issues",
"dependencies": {
"@netlify/cli-utils": "^1.0.1",
"@netlify/rules-proxy": "^0.1.2",
"@netlify/rules-proxy": "^0.1.3",
"@netlify/zip-it-and-ship-it": "^0.1.3",
"@oclif/command": "^1",
"@oclif/config": "^1",
"ascii-table": "0.0.9",
"body-parser": "^1.18.3",
"boxen": "^3.0.0",
"chalk": "^2.4.2",
"chokidar": "^2.1.5",
"copy-template-dir": "^1.4.0",
"execa": "^1.0.0",
"express": "^4.16.4",
"express-logging": "^1.1.1",
"fs-extra": "^7.0.1",
"fuzzy": "^0.1.3",
"get-port": "^4.1.0",
"get-port": "^4.2.0",
"gh-release-fetch": "^1.0.3",
"http-proxy": "^1.17.0",
"inquirer": "^6.2.2",
"inquirer-autocomplete-prompt": "^1.0.1",
"netlify": "2.4.1",
"netlify-cli-logo": "^1.0.0",
"node-fetch": "^2.3.0",
"ora": "^3.4.0",
"querystring": "^0.2.0",
"safe-join": "^0.1.2",
"static-server": "^2.2.1",
"wait-port": "^0.2.2",
Expand Down
10 changes: 0 additions & 10 deletions src/cli-logo.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/commands/dev/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {
NETLIFYDEVLOG,
NETLIFYDEVWARN,
NETLIFYDEVERR
} = require("../../cli-logo");
} = require("netlify-cli-logo");

class ExecCommand extends Command {
async run() {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const httpProxy = require("http-proxy");
const waitPort = require("wait-port");
const getPort = require("get-port");
const chokidar = require("chokidar");
const { serveFunctions } = require("@netlify/zip-it-and-ship-it");
const { serveFunctions } = require("../../utils/serveFunctions");
const { serverSettings } = require("../../detect-server");
const { detectFunctionsBuilder } = require("../../detect-functions-builder");
const Command = require("@netlify/cli-utils");
Expand All @@ -17,7 +17,7 @@ const {
NETLIFYDEVLOG,
NETLIFYDEVWARN,
NETLIFYDEVERR
} = require("../../cli-logo");
} = require("netlify-cli-logo");
const boxen = require("boxen");
const { createTunnel, connectTunnel } = require("../../live-tunnel");

Expand Down
2 changes: 1 addition & 1 deletion src/commands/functions/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {
NETLIFYDEVLOG,
NETLIFYDEVWARN,
NETLIFYDEVERR
} = require("../../cli-logo");
} = require("netlify-cli-logo");

class FunctionsBuildCommand extends Command {
async run() {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/functions/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const {
NETLIFYDEVLOG,
NETLIFYDEVWARN,
NETLIFYDEVERR
} = require("../../cli-logo");
} = require("netlify-cli-logo");

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

Expand Down
2 changes: 1 addition & 1 deletion src/commands/functions/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {
NETLIFYDEVLOG,
NETLIFYDEVWARN,
NETLIFYDEVERR
} = require("../../cli-logo");
} = require("netlify-cli-logo");

class FunctionsServeCommand extends Command {
async run() {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/functions/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const {
NETLIFYDEVLOG,
NETLIFYDEVWARN,
NETLIFYDEVERR
} = require("../../cli-logo");
} = require("netlify-cli-logo");

class FunctionsUpdateCommand extends Command {
async run() {
Expand Down
2 changes: 1 addition & 1 deletion src/detect-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const {
NETLIFYDEVLOG,
NETLIFYDEVWARN,
NETLIFYDEVERR
} = require("./cli-logo");
} = require("netlify-cli-logo");
const inquirer = require("inquirer");
const fs = require("fs");
const detectors = fs
Expand Down
2 changes: 1 addition & 1 deletion src/detectors/utils/jsdetect.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { existsSync, readFileSync } = require("fs");
let pkgJSON = null;
let yarnExists = false;
let warnedAboutEmptyScript = false;
const { NETLIFYDEVWARN } = require("../../cli-logo.js");
const { NETLIFYDEVWARN } = require("netlify-cli-logo");

/** hold package.json in a singleton so we dont do expensive parsing repeatedly */
function getPkgJSON() {
Expand Down
6 changes: 5 additions & 1 deletion src/live-tunnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ const path = require("path");
const execa = require("execa");
const chalk = require("chalk");
const { fetchLatest, updateAvailable } = require("gh-release-fetch");
const { NETLIFYDEVLOG, NETLIFYDEVWARN, NETLIFYDEVERR } = require("./cli-logo");
const {
NETLIFYDEVLOG,
NETLIFYDEVWARN,
NETLIFYDEVERR
} = require("netlify-cli-logo");

async function createTunnel(siteId, netlifyApiToken, log) {
await installTunnelClient(log);
Expand Down
6 changes: 5 additions & 1 deletion src/utils/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
// bit of a hasty abstraction but recommended by oclif
const { getAddons } = require("netlify/src/addons");
const chalk = require("chalk");
const { NETLIFYDEVLOG, NETLIFYDEVWARN, NETLIFYDEVERR } = require("../cli-logo");
const {
NETLIFYDEVLOG,
NETLIFYDEVWARN,
NETLIFYDEVERR
} = require("netlify-cli-logo");
/**
* inject environment variables from netlify addons and buildbot
* into your local dev process.env
Expand Down
Loading