@getxflow/cli 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/xflow/SKILL.md +13 -2
package/dist/version.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEFAULT_API_URL = exports.CLI_VERSION = void 0;
|
|
4
4
|
/** Keep in sync with cli/package.json. */
|
|
5
|
-
exports.CLI_VERSION = '0.3.
|
|
5
|
+
exports.CLI_VERSION = '0.3.3';
|
|
6
6
|
/** Overridden by XFLOW_API_URL or the `api` field in xflow.json. */
|
|
7
7
|
exports.DEFAULT_API_URL = 'https://app.getxflow.com';
|
package/package.json
CHANGED
package/skills/xflow/SKILL.md
CHANGED
|
@@ -6,8 +6,9 @@ description: Build, deploy and publish apps on the XFlow platform with the xflow
|
|
|
6
6
|
# XFlow
|
|
7
7
|
|
|
8
8
|
Hosting for web apps. The code lives in an ordinary repository on the developer
|
|
9
|
-
machine
|
|
10
|
-
|
|
9
|
+
machine, `xflow deploy` sends the sources, and the platform builds them in a clean
|
|
10
|
+
sandbox and serves the result as static files. A platform project is recognized by
|
|
11
|
+
the `xflow.json` file in its root.
|
|
11
12
|
|
|
12
13
|
## First rule
|
|
13
14
|
|
|
@@ -134,6 +135,12 @@ separate deploy command: `xflow deploy` ships the functions and then builds the
|
|
|
134
135
|
in that order. List what is live with `xflow functions list`. The handler returns
|
|
135
136
|
`{ statusCode, body }` where `body` is a JSON string.
|
|
136
137
|
|
|
138
|
+
Keep one shape inside that string across the whole project: `{ success: true, data }`
|
|
139
|
+
when it worked, `{ success: false, error: { message, code } }` when it did not. Nothing
|
|
140
|
+
enforces this, but a project where every function answers its own way costs an adapter
|
|
141
|
+
on every call. Branch the frontend on `error.code`, never on `error.message`: wording
|
|
142
|
+
gets rewritten on any edit, a code does not.
|
|
143
|
+
|
|
137
144
|
The sources are the whole truth about which functions exist. Delete the directory and the
|
|
138
145
|
next deploy deletes the function from the cloud, schedules included, and that cannot be
|
|
139
146
|
undone: a function created again later gets a different address. So never remove a function
|
|
@@ -291,6 +298,10 @@ answers you get:
|
|
|
291
298
|
and takes its real size from there, not from what you declared, so an early `confirm`
|
|
292
299
|
answers that the file is not there.
|
|
293
300
|
|
|
301
|
+
A refusal comes back as `{ error, code }`. Branch on `code` (`invalid_name`, `file_too_large`,
|
|
302
|
+
`quota_exceeded`, `not_uploaded`, `duplicate_name`, `not_found`, …) and never on the text:
|
|
303
|
+
the wording is free to change, the code is not.
|
|
304
|
+
|
|
294
305
|
What the app may do with files is decided inside that function, because the page in the
|
|
295
306
|
browser can be edited by whoever opened it. Never write the key into the sources and never
|
|
296
307
|
send it to the frontend: the build gate stops on a key found in the application code, and a
|