pgkiln 0.40.0 → 0.42.0

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.
Files changed (73) hide show
  1. package/db/migrations/095_rest_catalogs.sql +59 -0
  2. package/db/migrations/096_developer_email.sql +15 -0
  3. package/db/migrations/097_generated_app_quality.sql +911 -0
  4. package/db/migrations/098_app_activity.sql +37 -0
  5. package/docs/apex-feature-parity.md +15 -12
  6. package/docs/guide/03-builder.md +103 -19
  7. package/docs/guide/04-pages-and-regions.md +37 -4
  8. package/docs/guide/09-reference.md +6 -2
  9. package/docs/guide/11-from-apex.md +1 -1
  10. package/docs/guide/12-development.md +19 -2
  11. package/docs/guide/14-globalization.md +7 -3
  12. package/docs/guide/17-mobile.md +1 -1
  13. package/docs/guide/19-rest-data-sources.md +39 -1
  14. package/examples/hr/hr_59_gantt_editing.sql +21 -0
  15. package/examples/hr/hr_60_tree_charts.sql +46 -0
  16. package/package.json +1 -1
  17. package/public/app.css +219 -33
  18. package/public/app.js +206 -0
  19. package/public/builder.css +31 -3
  20. package/public/builder.js +31 -0
  21. package/public/sw.js +5 -2
  22. package/src/app.ts +6 -0
  23. package/src/builder/appfromfile.ts +5 -4
  24. package/src/builder/appsheets.ts +23 -9
  25. package/src/builder/appwizard.ts +215 -70
  26. package/src/builder/blueprints.ts +2 -1
  27. package/src/builder/components.ts +1 -1
  28. package/src/builder/find-workspace.ts +120 -0
  29. package/src/builder/home.ts +4 -32
  30. package/src/builder/mail.ts +39 -0
  31. package/src/builder/newapp.ts +182 -5
  32. package/src/builder/region-settings.ts +19 -1
  33. package/src/builder/rest-catalogs.ts +424 -0
  34. package/src/builder/routes.ts +36 -34
  35. package/src/builder/shared.ts +2 -0
  36. package/src/builder/workspace-transfer.ts +136 -0
  37. package/src/i18n/ar.ts +15 -0
  38. package/src/i18n/cs.ts +15 -0
  39. package/src/i18n/da.ts +15 -0
  40. package/src/i18n/de.ts +15 -0
  41. package/src/i18n/el.ts +15 -0
  42. package/src/i18n/es.ts +15 -0
  43. package/src/i18n/fi.ts +15 -0
  44. package/src/i18n/fr.ts +15 -0
  45. package/src/i18n/he.ts +15 -0
  46. package/src/i18n/it.ts +15 -0
  47. package/src/i18n/ja.ts +15 -0
  48. package/src/i18n/ko.ts +15 -0
  49. package/src/i18n/nb.ts +15 -0
  50. package/src/i18n/pl.ts +15 -0
  51. package/src/i18n/pt.ts +15 -0
  52. package/src/i18n/ru.ts +15 -0
  53. package/src/i18n/sv.ts +15 -0
  54. package/src/i18n/tr.ts +15 -0
  55. package/src/i18n/uk.ts +15 -0
  56. package/src/i18n/zh.ts +15 -0
  57. package/src/i18n.ts +30 -0
  58. package/src/icons.ts +2 -1
  59. package/src/layout.ts +2 -2
  60. package/src/restcatalog.ts +605 -0
  61. package/src/runtime/charts.ts +304 -15
  62. package/src/runtime/data-reporter.ts +48 -16
  63. package/src/runtime/devbar.ts +35 -14
  64. package/src/runtime/engine.ts +7 -4
  65. package/src/runtime/gantt-move.ts +63 -0
  66. package/src/runtime/locale.ts +2 -2
  67. package/src/runtime/regions.ts +28 -2
  68. package/src/runtime/render.ts +18 -4
  69. package/src/runtime/report.ts +15 -9
  70. package/src/runtime/routes.ts +39 -0
  71. package/src/runtime/styles.ts +5 -2
  72. package/src/websources.ts +11 -3
  73. package/src/workspace-export.ts +240 -0
@@ -0,0 +1,59 @@
1
+ -- =====================================================================
2
+ -- 095: REST source catalogs (APEX: Workspace Utilities → REST Source
3
+ -- Catalogs)
4
+ --
5
+ -- A catalog describes one web service for a workspace: its base URL and
6
+ -- its services (an endpoint each: path with {parameters}, method,
7
+ -- parameters, row selector, columns, write-back operations). Developers of
8
+ -- the workspace create a REST data source in any of its applications from a
9
+ -- catalog service, so the service is described once, not in every
10
+ -- application. A catalog is entered by hand or read from an OpenAPI 3 (or
11
+ -- Swagger 2) document.
12
+ --
13
+ -- A data source made from a catalog is a copy (meta.rest_source): changing
14
+ -- the catalog later doesn't change it. Credentials stay with the
15
+ -- application (web credentials), never in a catalog.
16
+ --
17
+ -- Workspace data: not part of an application's export; the workspace
18
+ -- export (Workspace utilities → Export) carries the catalogs.
19
+ -- =====================================================================
20
+ create table meta.rest_catalog (
21
+ id serial primary key,
22
+ workspace_id int not null references meta.workspace on delete cascade,
23
+ name text not null check (name ~ '^\S(.{0,58}\S)?$'),
24
+ description text check (length(description) <= 2000),
25
+ -- e.g. https://api.example.com/v1 (no trailing slash: service paths start with /)
26
+ base_url text not null check (base_url ~ '^https?://[^\s<>"{}]+$' and base_url !~ '/$' and length(base_url) <= 2000),
27
+ -- where it came from: by hand, or an OpenAPI document (its title and version are kept)
28
+ source text not null default 'manual' check (source in ('manual', 'openapi')),
29
+ api_version text check (length(api_version) <= 100),
30
+ created_by text,
31
+ created_at timestamptz not null default now(),
32
+ updated_at timestamptz not null default now()
33
+ );
34
+ create unique index rest_catalog_name_key on meta.rest_catalog (workspace_id, lower(name));
35
+
36
+ create table meta.rest_catalog_service (
37
+ id serial primary key,
38
+ catalog_id int not null references meta.rest_catalog on delete cascade,
39
+ -- the REST data source's name when one is made from it
40
+ name text not null check (name ~ '^[A-Z][A-Z0-9_]{0,59}$'),
41
+ description text check (length(description) <= 2000),
42
+ -- after the catalog's base URL, e.g. /cities/{city}/weather?units=metric
43
+ path text not null check (path ~ '^/[^\s<>"]*$' and length(path) <= 2000),
44
+ method text not null default 'GET' check (method in ('GET', 'POST', 'PUT', 'PATCH', 'DELETE')),
45
+ -- as meta.rest_source (030, 036)
46
+ params jsonb not null default '[]' check (jsonb_typeof(params) = 'array'),
47
+ headers jsonb not null default '{}' check (jsonb_typeof(headers) = 'object'),
48
+ body text,
49
+ row_selector text,
50
+ columns jsonb not null default '[]' check (jsonb_typeof(columns) = 'array'),
51
+ key_columns text[] not null default '{}',
52
+ operations jsonb not null default '{}' check (jsonb_typeof(operations) = 'object'),
53
+ position int not null default 0,
54
+ unique (catalog_id, name)
55
+ );
56
+
57
+ revoke all on meta.rest_catalog, meta.rest_catalog_service from public;
58
+ comment on table meta.rest_catalog is 'REST source catalogs (095): a workspace''s descriptions of web services; applications make REST data sources from their services.';
59
+ comment on table meta.rest_catalog_service is 'A service (endpoint) of a REST source catalog (095): copied into meta.rest_source by "From a catalog".';
@@ -0,0 +1,15 @@
1
+ -- =====================================================================
2
+ -- 096: developers' e-mail addresses and "Find my workspace" (APEX: the
3
+ -- workspace sign-in page → Find My Workspace)
4
+ --
5
+ -- meta.developer.email: optional; a developer sets their own on the
6
+ -- Developers page, administrators set anyone's. "Find my workspace" on the
7
+ -- builder's sign-in page mails the developer accounts with that address the
8
+ -- workspaces they belong to, through the mail service administrators choose
9
+ -- for the builder (meta.setting builder_mail_service and builder_mail_from).
10
+ -- The page answers the same whether or not an account has the address.
11
+ -- =====================================================================
12
+ alter table meta.developer
13
+ add column email text check (email is null or (email ~ '^[^@\s<>"(),;:\\]+@[^@\s<>"(),;:\\]+\.[^@\s<>"(),;:\\]+$' and length(email) <= 254));
14
+ create index developer_email_idx on meta.developer (lower(email)) where email is not null;
15
+ comment on column meta.developer.email is 'The developer''s e-mail address (096): "Find my workspace" sends their workspaces to it.';