stackpath / serverless-scripting-cli Goto Github PK
View Code? Open in Web Editor NEWA command line interface to StackPath's serverless platform.
License: MIT License
A command line interface to StackPath's serverless platform.
License: MIT License
If I have site_id in my script block, I shouldn't really need to set a global site_id as well. But the CLI will error if I don't define one globally:
Missing required property 'site_id' in your edgeengine.json file.
Easy to work around obviously, but seems like it shouldn't be necessary.
Looks like we can set the site_id on the global scope OR override it on the per script scope. It would be nice to have the option to do that for the stack_id as well.
The documentation indicates that we can specify our own script id. Maybe this has to be in a GUID format... that's not clear. I thought it would be nice to be able to make it something human readable. So I tried to set "id": "jwt-auth" and got invalid ScriptId
Describe the bug
Script doesn't deploy
To reproduce
Install dependencies, add SP token, send a 400kb script on a site.
Expected behavior
Deploying scripts...... Deployment completed.
Actual behavior
yarn run v1.22.10
$ sp-serverless deploy
Refreshing access token...... Refreshing access token done.
Deploying scripts...... ?
An error has occurred (FetchError: invalid json response body at https://gateway.stackpath.com/cdn/v1/stacks/xxx/sites/xxx/scripts/xxx reason: Unexpected end of JSON input). Continue? y/n:
System Details (please complete the following information):
When I have more than one script in my edgeengine.json it just deploys whichever one is first. If I flip their order in the edgeengine.json it will deploy the other!
When I try to deploy a script again it comes up with this...
An error has occurred (a script with this name already exists on this site....
Asks: Continue? y/n:
When I say "y" it gives this error:
Deploying scripts...... An error has occurred. Error: An error occurred when connecting to StackPath host https://gateway.stackpath.com.
The Firebase CLI is really nice because it allows you the option to only deploy certain things. Let's say only one script change. There is no reason to deploy all.
firebase deploy --only functions
See this doc:
https://firebase.google.com/docs/cli/#partial_deploys
Would be great to have this same feature for Edge Engine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.