@getxflow/cli 1.0.2 → 1.0.4

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 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 = '1.0.2';
5
+ exports.CLI_VERSION = '1.0.4';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getxflow/cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "CLI for the XFlow platform: projects with apps, functions and a database; source sync, deployment and publishing",
5
5
  "license": "UNLICENSED",
6
6
  "engines": {
@@ -23,7 +23,7 @@ contains the fix.
23
23
 
24
24
  ## Keeping these instructions current
25
25
 
26
- These instructions ship with xflow CLI 1.0.2, so the copy you are reading can be older than
26
+ These instructions ship with xflow CLI 1.0.4, so the copy you are reading can be older than
27
27
  the CLI answering your commands.
28
28
 
29
29
  When the CLI says this file does not match it, run `xflow skills --refresh` and then **read
@@ -233,19 +233,16 @@ A person sets this in the web interface; you cannot, and you should not ask for
233
233
 
234
234
  | Level | Who gets in |
235
235
  |---|---|
236
- | Project members | people who have access to the project: the team through xflow, staff with a login |
237
- | By list | the members named for this app |
236
+ | Project members | people who have access to the project |
238
237
  | Anyone with the link | anybody, no sign-in at all |
239
238
 
240
239
  - The plan decides which levels exist: on Free an app opens only inside xflow, Start adds the
241
- direct address, "By list" and "Anyone with the link".
242
- - At the two closed levels the platform signs people in, and a function receives the person in
243
- `event.xflow.user` (`id`, `role` in the organization, `name`, `login`).
244
- - Staff (a doctor, a picker) never sign in to xflow: an admin gives them a login and a password,
245
- they enter at the address of the app, `login` is set for them and null for the team. Keep
246
- roles inside the app (doctor, receptionist) in your own table keyed by `user.id`.
247
- - A "Sign out" button: `const r = await fetch('/_xflow/logout', { method: 'POST' })`, then
248
- `location.href = (await r.json()).next`. It ends every sign-in of the person.
240
+ direct address and "Anyone with the link".
241
+ - At the closed level the platform signs people in, and a function receives the person in
242
+ `event.xflow.user` (`id`, `role` in the organization, `name`). Keep roles inside the app
243
+ (doctor, receptionist) in your own table keyed by `user.id`.
244
+ - People outside the organization (patients, pickers, clients) are not xflow accounts: make the
245
+ app "Anyone with the link" and give it its own sign-in, see below.
249
246
  - At "Anyone with the link" the platform signs nobody in: `event.xflow.user` is null for
250
247
  visitors. Accounts, sign-in and who sees which rows are the code of your app, see below.
251
248
  - `usePlatformAuth()` in the frontend knows the person only inside the xflow frame, and even
@@ -393,7 +390,7 @@ exports.handler = async (event) => {
393
390
  // project), 'external' (an outside service with a key), 'schedule',
394
391
  // 'platform' (a person through xflow functions invoke or the web interface)
395
392
  // slug: the address name of the calling app (<id>--<org>) or page, null otherwise
396
- // user: { id, role, name, login } of a signed-in person (login only for staff),
393
+ // user: { id, role, name } of a signed-in person,
397
394
  // null for anonymous visitors, pages, keys
398
395
  // ip: the visitor's address, null for a schedule
399
396
  }
@@ -410,7 +407,7 @@ exports.minRole = 'developer' // 'member' | 'developer' | 'owner'
410
407
 
411
408
  The platform refuses anything below that role before your code runs; it applies to people
412
409
  (apps, pages, `functions invoke`), not to keys and schedules. `member` is the people who only
413
- use the apps (staff of a clinic, managers), `developer` and `owner` build them. In the web
410
+ use the apps (clinic employees, managers), `developer` and `owner` build them. In the web
414
411
  interface these roles are called «Просмотр» (`member`), «Редактор» (`developer`) and «Админ»
415
412
  (`owner`). Without the line
416
413
  every member of the project can call the function. Losing access