@begin/api
Advanced tools
Comparing version 1.0.8 to 1.1.0
@@ -6,6 +6,6 @@ // @ts-check | ||
static async create ({ access_token, zip }) { | ||
static async create ({ access_token, chunk, zip }) { | ||
if (!zip) throw ReferenceError('missing_zip') | ||
if (!access_token) throw ReferenceError('missing_access_token') | ||
let result = await write({ access_token, params: { zip } }) | ||
let result = await write({ access_token, params: { chunk, zip } }) | ||
if (result.errors) { | ||
@@ -12,0 +12,0 @@ console.log(result.errors) |
{ | ||
"name": "@begin/api", | ||
"version": "1.0.8", | ||
"version": "1.1.0", | ||
"description": "Node client for api.begin.com", | ||
@@ -41,8 +41,8 @@ "type": "module", | ||
"@architect/eslint-config": "^2.0.1", | ||
"dotenv": "^10.0.0", | ||
"eslint": "^8.0.1", | ||
"dotenv": "^16.0.0", | ||
"eslint": "^8.11.0", | ||
"tap-spec": "^5.0.0", | ||
"tape": "^5.3.1", | ||
"typedoc": "^0.22.6", | ||
"typescript": "^4.4.4" | ||
"tape": "^5.5.2", | ||
"typedoc": "^0.22.13", | ||
"typescript": "^4.6.2" | ||
}, | ||
@@ -49,0 +49,0 @@ "dependencies": { |
@@ -1,2 +0,2 @@ | ||
> Node client for api.begin.com | ||
> Node client for api.begin.com | ||
@@ -25,3 +25,2 @@ Obtain an `access_token` by creating a client at https://api.begin.com. | ||
# Usage | ||
@@ -37,7 +36,10 @@ ### App static methods | ||
// create a new app | ||
let app = await App.create({ access_token, name, zip }) | ||
// create a new app | ||
let app = await App.create({ access_token, zip }) | ||
// create a new app using @begin/chunker | ||
let app = await App.create({ access_token, chunk, zip }) | ||
``` | ||
### App instance methods | ||
@@ -53,4 +55,7 @@ | ||
// deploy a new version of the app | ||
await app.deploy({ name, zip }) | ||
await app.deploy({ zip }) | ||
// deploy a new version of the app using @begin/chunker | ||
await app.deploy({ chunk, zip }) | ||
// destroy an app | ||
@@ -60,2 +65,3 @@ await app.destroy() | ||
### Work with environment variables | ||
@@ -72,5 +78,5 @@ | ||
await app.env.destroy({ key: "HENLO" }) | ||
``` | ||
### Work with static assets | ||
@@ -88,5 +94,5 @@ | ||
await app.static.destroy({ name: '/file.js' }) | ||
``` | ||
# Contributing | ||
@@ -93,0 +99,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25289
100