Code Monkey home page Code Monkey logo

cloudflare-workers-webpack-boilerplate's People

Contributors

detroitenglish avatar madisvain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudflare-workers-webpack-boilerplate's Issues

Invalid configuration object

I'm getting an error

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.output.path: The provided value "dist" is not an absolute path!
   -> The output directory as **absolute path** (required).

my background is C# so am not up-to-date with webpack and npm enough to fix diagnose this. Any help would be great

Problems deploying

I am unable to deploy excample scripts:

cloudflare-worker-webpack-boilerplate dschmidt$ clear

ubm-dschmidt-mb:cloudflare-worker-webpack-boilerplate dschmidt$ npm run deploy

[email protected] deploy /Users/dschmidt/webpacktest/cloudflare-worker-webpack-boilerplate/cloudflare-worker-webpack-boilerplate
cross-env WORKER_ACTION=deploy webpack --display none --bail

๐Ÿšง | Bundling Cloudflare Worker script
Uploading worker...
Success! Cloudflare worker deployed
{ Error: Request failed with status code 400
at createError (/Users/dschmidt/webpacktest/cloudflare-worker-webpack-boilerplate/cloudflare-worker-webpack-boilerplate/node_modules/axios/lib/core/createError.js:16:15)
at settle (/Users/dschmidt/webpacktest/cloudflare-worker-webpack-boilerplate/cloudflare-worker-webpack-boilerplate/node_modules/axios/lib/core/settle.js:18:12)
at IncomingMessage.handleStreamEnd (/Users/dschmidt/webpacktest/cloudflare-worker-webpack-boilerplate/cloudflare-worker-webpack-boilerplate/node_modules/axios/lib/adapters/http.js:201:11)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
config:
{ adapter: [Function: httpAdapter],
transformRequest: { '0': [Function: transformRequest] },
transformResponse: { '0': [Function: transformResponse] },
timeout: 20000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
headers:
{ Accept: 'application/json, text/plain, /',
'Content-Type': 'application/json',
'X-Auth-Email': 'EMAIL_OBFUSCATED',
'X-Auth-Key': 'API_KEY_OBFUSCATED',
'User-Agent': 'axios/0.18.0',
'Content-Length': 29 },
method: 'post',
baseURL: 'https://api.cloudflare.com/client/v4/zones/ZONE_NAME_OBFUSCATED',
url: 'https://api.cloudflare.com/client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters',
data: '{"pattern":"","enabled":true}' },
request:
ClientRequest {
domain: null,
_events:
{ socket: [Function],
abort: [Function],
aborted: [Function],
error: [Function],
timeout: [Function],
prefinish: [Function: requestOnPrefinish] },
_eventsCount: 6,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cloudflare.com',
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'api.cloudflare.com',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 379,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular],
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 269,
[Symbol(bytesRead)]: 952 },
connection:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cloudflare.com',
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'api.cloudflare.com',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 379,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular],
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 269,
[Symbol(bytesRead)]: 952 },
_header: 'POST /client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters HTTP/1.1\r\nAccept: application/json, text/plain, /\r\nContent-Type: application/json\r\nX-Auth-Email: EMAIL_OBFUSCATED\r\nX-Auth-Key: API_KEY_OBFUSCATED\r\nUser-Agent: axios/0.18.0\r\nContent-Length: 29\r\nHost: api.cloudflare.com\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent:
Agent {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object],
requests: {},
sockets: [Object],
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
maxCachedSessions: 100,
_sessionCache: [Object] },
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters',
_ended: true,
res:
IncomingMessage {
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 3,
_maxListeners: undefined,
socket: [Object],
connection: [Object],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: [Object],
rawHeaders: [Array],
trailers: {},
rawTrailers: [],
upgrade: false,
url: '',
method: null,
statusCode: 400,
statusMessage: 'Bad Request',
client: [Object],
_consuming: true,
_dumped: false,
req: [Circular],
responseUrl: 'https://api.cloudflare.com/client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters',
redirects: [],
read: [Function] },
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
_redirectable:
Writable {
_writableState: [Object],
writable: true,
domain: null,
_events: [Object],
_eventsCount: 2,
_maxListeners: undefined,
_options: [Object],
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 29,
_requestBodyBuffers: [],
_onNativeResponse: [Function],
_currentRequest: [Circular],
_currentUrl: 'https://api.cloudflare.com/client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters' },
[Symbol(outHeadersKey)]:
{ accept: [Array],
'content-type': [Array],
'x-auth-email': [Array],
'x-auth-key': [Array],
'user-agent': [Array],
'content-length': [Array],
host: [Array] } },
response:
{ status: 400,
statusText: 'Bad Request',
headers:
{ date: 'Thu, 14 Mar 2019 13:35:40 GMT',
'content-type': 'application/json; charset=UTF-8',
'content-length': '169',
connection: 'close',
'set-cookie': [Array],
'cf-ray': '4b76a1d4cc755a2c-BOS',
'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
'served-in-seconds': '0.037',
'strict-transport-security': 'max-age=15780000; includeSubDomains',
server: 'cloudflare' },
config:
{ adapter: [Function: httpAdapter],
transformRequest: [Object],
transformResponse: [Object],
timeout: 20000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
headers: [Object],
method: 'post',
baseURL: 'https://api.cloudflare.com/client/v4/zones/ZONE_NAME_OBFUSCATED',
url: 'https://api.cloudflare.com/client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters',
data: '{"pattern":"","enabled":true}' },
request:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Object],
connection: [Object],
_header: 'POST /client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters HTTP/1.1\r\nAccept: application/json, text/plain, /\r\nContent-Type: application/json\r\nX-Auth-Email: EMAIL_OBFUSCATED\r\nX-Auth-Key: API_KEY_OBFUSCATED\r\nUser-Agent: axios/0.18.0\r\nContent-Length: 29\r\nHost: api.cloudflare.com\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters',
_ended: true,
res: [Object],
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
_redirectable: [Object],
[Symbol(outHeadersKey)]: [Object] },
data: { result: null, success: false, errors: [Array], messages: [] } } }
{ Error: Request failed with status code 400
at createError (/Users/dschmidt/webpacktest/cloudflare-worker-webpack-boilerplate/cloudflare-worker-webpack-boilerplate/node_modules/axios/lib/core/createError.js:16:15)
at settle (/Users/dschmidt/webpacktest/cloudflare-worker-webpack-boilerplate/cloudflare-worker-webpack-boilerplate/node_modules/axios/lib/core/settle.js:18:12)
at IncomingMessage.handleStreamEnd (/Users/dschmidt/webpacktest/cloudflare-worker-webpack-boilerplate/cloudflare-worker-webpack-boilerplate/node_modules/axios/lib/adapters/http.js:201:11)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
config:
{ adapter: [Function: httpAdapter],
transformRequest: { '0': [Function: transformRequest] },
transformResponse: { '0': [Function: transformResponse] },
timeout: 20000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
headers:
{ Accept: 'application/json, text/plain, /',
'Content-Type': 'application/json',
'X-Auth-Email': 'EMAIL_OBFUSCATED',
'X-Auth-Key': 'API_KEY_OBFUSCATED',
'User-Agent': 'axios/0.18.0',
'Content-Length': 30 },
method: 'post',
baseURL: 'https://api.cloudflare.com/client/v4/zones/ZONE_NAME_OBFUSCATED',
url: 'https://api.cloudflare.com/client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters',
data: '{"pattern":"","enabled":false}' },
request:
ClientRequest {
domain: null,
_events:
{ socket: [Function],
abort: [Function],
aborted: [Function],
error: [Function],
timeout: [Function],
prefinish: [Function: requestOnPrefinish] },
_eventsCount: 6,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cloudflare.com',
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'api.cloudflare.com',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 380,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular],
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 295,
[Symbol(bytesRead)]: 952 },
connection:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cloudflare.com',
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'api.cloudflare.com',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 380,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular],
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,
[Symbol(asyncId)]: 295,
[Symbol(bytesRead)]: 952 },
_header: 'POST /client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters HTTP/1.1\r\nAccept: application/json, text/plain, /\r\nContent-Type: application/json\r\nX-Auth-Email: EMAIL_OBFUSCATED\r\nX-Auth-Key: API_KEY_OBFUSCATED\r\nUser-Agent: axios/0.18.0\r\nContent-Length: 30\r\nHost: api.cloudflare.com\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent:
Agent {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object],
requests: {},
sockets: [Object],
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
maxCachedSessions: 100,
_sessionCache: [Object] },
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters',
_ended: true,
res:
IncomingMessage {
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 3,
_maxListeners: undefined,
socket: [Object],
connection: [Object],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: [Object],
rawHeaders: [Array],
trailers: {},
rawTrailers: [],
upgrade: false,
url: '',
method: null,
statusCode: 400,
statusMessage: 'Bad Request',
client: [Object],
_consuming: true,
_dumped: false,
req: [Circular],
responseUrl: 'https://api.cloudflare.com/client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters',
redirects: [],
read: [Function] },
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
_redirectable:
Writable {
_writableState: [Object],
writable: true,
domain: null,
_events: [Object],
_eventsCount: 2,
_maxListeners: undefined,
_options: [Object],
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 30,
_requestBodyBuffers: [],
_onNativeResponse: [Function],
_currentRequest: [Circular],
_currentUrl: 'https://api.cloudflare.com/client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters' },
[Symbol(outHeadersKey)]:
{ accept: [Array],
'content-type': [Array],
'x-auth-email': [Array],
'x-auth-key': [Array],
'user-agent': [Array],
'content-length': [Array],
host: [Array] } },
response:
{ status: 400,
statusText: 'Bad Request',
headers:
{ date: 'Thu, 14 Mar 2019 13:35:40 GMT',
'content-type': 'application/json; charset=UTF-8',
'content-length': '169',
connection: 'close',
'set-cookie': [Array],
'cf-ray': '4b76a1d5fc2aae0e-BOS',
'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
'served-in-seconds': '0.040',
'strict-transport-security': 'max-age=15780000; includeSubDomains',
server: 'cloudflare' },
config:
{ adapter: [Function: httpAdapter],
transformRequest: [Object],
transformResponse: [Object],
timeout: 20000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
headers: [Object],
method: 'post',
baseURL: 'https://api.cloudflare.com/client/v4/zones/ZONE_NAME_OBFUSCATED',
url: 'https://api.cloudflare.com/client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters',
data: '{"pattern":"","enabled":false}' },
request:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,ZONE_NAME_OBFUSCATED
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Object],
connection: [Object],
_header: 'POST /client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters HTTP/1.1\r\nAccept: application/json, text/plain, /\r\nContent-Type: application/json\r\nX-Auth-Email: EMAIL_OBFUSCATED\r\nX-Auth-Key: API_KEY_OBFUSCATED\r\nUser-Agent: axios/0.18.0\r\nContent-Length: 30\r\nHost: api.cloudflare.com\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/client/v4/zones/ZONE_NAME_OBFUSCATED/workers/filters',
_ended: true,
res: [Object],
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
_redirectable: [Object],
[Symbol(outHeadersKey)]: [Object] },
data: { result: null, success: false, errors: [Array], messages: [] } } }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.