workpeg 0.152.0__tar.gz → 0.153.0__tar.gz
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.
- {workpeg-0.152.0/src/workpeg.egg-info → workpeg-0.153.0}/PKG-INFO +1 -1
- {workpeg-0.152.0 → workpeg-0.153.0}/pyproject.toml +1 -1
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/build.py +62 -2
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/workpeg-runtime.js +69 -23
- {workpeg-0.152.0 → workpeg-0.153.0/src/workpeg.egg-info}/PKG-INFO +1 -1
- {workpeg-0.152.0 → workpeg-0.153.0}/LICENSE +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/MANIFEST.in +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/README.md +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/setup.cfg +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/__init__.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/auth.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/build.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/cdn.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/cli.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/config.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/context.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/create_new.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/doctor.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/project.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/run.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/runtime.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/sandbox/__init__.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/sandbox/docker_driver.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/sandbox/driver.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/submit.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/__init__.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/functions/Dockerfile +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/functions/LICENSE +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/functions/README.md +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/functions/app/__init__.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/functions/app/main.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/functions/requirements.txt +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/project/README.md +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/project/function/Dockerfile +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/project/function/app/__init__.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/project/function/app/main.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/project/function/requirements.txt +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/project/ui/main.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/templates/project/workpeg.json +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/terminal.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/__init__.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/actions.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/actions_manifest.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/app.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/calendar.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/compiler/__init__.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/compiler/ast_parser.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/compiler/ir.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/compiler/js_generator.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/create.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/dates.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/dev_refused_names.json +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/devmode.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/devserve.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/devsite.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/fake_cloud.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/minify.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/render_nodes.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/renderers_manifest.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/ai-concurrent-replies.md +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/ai-prompt-queue.md +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/ai-question-frame.md +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/ai-subagent-frame.md +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/ai.js +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/editor.js +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/fonts/OFL.txt +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/fonts/geist-italic-cyrillic-ext.af944491.woff2 +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/fonts/geist-italic-cyrillic.88be6946.woff2 +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/fonts/geist-italic-latin-ext.370a8962.woff2 +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/fonts/geist-italic-latin.7611b95c.woff2 +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/fonts/geist-italic-vietnamese.8dfcf303.woff2 +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/fonts/geist-normal-cyrillic-ext.b7a545bb.woff2 +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/fonts/geist-normal-cyrillic.6129fc85.woff2 +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/fonts/geist-normal-latin-ext.58a6b173.woff2 +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/fonts/geist-normal-latin.9b6f5ff4.woff2 +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/fonts/geist-normal-vietnamese.f689f638.woff2 +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/icons.css.gz +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/overlay.js +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/pegment.css +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/scaffold.js +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/scaffold.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/search_manifest.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/serve.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/skills_manifest.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/state.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/validators.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/watcher.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/widgets/__init__.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/widgets/base.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/widgets/canvas.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/widgets/display.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/widgets/fields.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/widgets/forms.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/widgets/futures.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/widgets/gestures.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/widgets/interactive.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/widgets/layout.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/widgets/pickers.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/utils.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg.egg-info/SOURCES.txt +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg.egg-info/dependency_links.txt +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg.egg-info/entry_points.txt +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg.egg-info/requires.txt +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg.egg-info/top_level.txt +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_auth.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_build.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_cdn.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_cdn_publish.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_changelog.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_changelog_guard.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_cli.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_config.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_context.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_create_new.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_doctor.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_project_create.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_release_script.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_run.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_runtime.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_submit.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_utils.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_version.py +0 -0
- {workpeg-0.152.0 → workpeg-0.153.0}/tests/test_watch_pipeline.py +0 -0
|
@@ -883,8 +883,10 @@ def _check_manifest_size(text: str) -> None:
|
|
|
883
883
|
f"manifest.json is {size} bytes; the platform refuses to read one "
|
|
884
884
|
f"over {MAX_MANIFEST_BYTES}. It does not read part of it — the "
|
|
885
885
|
f"whole file is skipped, so every section in it (search, actions, "
|
|
886
|
-
f"renderers, skills) silently never arrives
|
|
887
|
-
f"
|
|
886
|
+
f"renderers, skills, summary, dev) silently never arrives, and a "
|
|
887
|
+
f"\"dev\": {{\"others\": \"deny\"}} with it lets other "
|
|
888
|
+
f"businesses' dev pages back onto this namespace. Shorten the "
|
|
889
|
+
f"longest section; skill instructions are usually what grows.")
|
|
888
890
|
|
|
889
891
|
|
|
890
892
|
def _peg_manifest(ir, namespace: str, source: Path) -> "dict | None":
|
|
@@ -926,6 +928,10 @@ def _peg_manifest(ir, namespace: str, source: Path) -> "dict | None":
|
|
|
926
928
|
summary = _summary_section(source)
|
|
927
929
|
if summary:
|
|
928
930
|
sections["summary"] = summary
|
|
931
|
+
|
|
932
|
+
dev = _dev_section(source)
|
|
933
|
+
if dev:
|
|
934
|
+
sections["dev"] = dev
|
|
929
935
|
# Future sections slot in here, each read from its own workpeg.json block.
|
|
930
936
|
|
|
931
937
|
if not sections:
|
|
@@ -1006,6 +1012,60 @@ def _summary_section(source: Path) -> "str | None":
|
|
|
1006
1012
|
return text
|
|
1007
1013
|
|
|
1008
1014
|
|
|
1015
|
+
#: Who may run a dev page on this Peg's label, besides its owner: the one
|
|
1016
|
+
#: key the ``dev`` section has, and the only two words it takes.
|
|
1017
|
+
DEV_KEYS = ("others",)
|
|
1018
|
+
DEV_OTHERS = ("allow", "deny")
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
def _dev_section(source: Path) -> "dict | None":
|
|
1022
|
+
"""The Peg's ``dev`` section: whether other businesses may run a dev
|
|
1023
|
+
page (``https://<namespace>.dev.workpeg.com``) on this Peg's label.
|
|
1024
|
+
|
|
1025
|
+
``{"others": "allow"}`` or ``{"others": "deny"}``. The owner's own
|
|
1026
|
+
business is never refused by it. With no section, others are allowed.
|
|
1027
|
+
|
|
1028
|
+
**Exact words, closed key set, refused at build.** The registry reads
|
|
1029
|
+
this from the uploaded ``manifest.json`` and counts anything it cannot
|
|
1030
|
+
read as ``deny``, so a typo would quietly close the Peg to everyone
|
|
1031
|
+
else. Failing here says so where the author can fix it. Nothing is
|
|
1032
|
+
normalised: ``"Deny"`` and ``" deny"`` are refused, not guessed at.
|
|
1033
|
+
"""
|
|
1034
|
+
from workpeg.ui.search_manifest import ManifestValidationError
|
|
1035
|
+
|
|
1036
|
+
config_path = _find_peg_config(source)
|
|
1037
|
+
if config_path is None:
|
|
1038
|
+
return None
|
|
1039
|
+
try:
|
|
1040
|
+
data = json.loads(config_path.read_text(encoding="utf-8"))
|
|
1041
|
+
except (OSError, ValueError):
|
|
1042
|
+
# Reported by _search_section, which reads the same file.
|
|
1043
|
+
return None
|
|
1044
|
+
if not isinstance(data, dict) or "dev" not in data:
|
|
1045
|
+
return None
|
|
1046
|
+
value = data["dev"]
|
|
1047
|
+
shape = ('"dev" must be {"others": "allow"} or {"others": "deny"}')
|
|
1048
|
+
if not isinstance(value, dict):
|
|
1049
|
+
raise ManifestValidationError(
|
|
1050
|
+
f"{config_path}: {shape}, an object; got "
|
|
1051
|
+
f"{type(value).__name__}.")
|
|
1052
|
+
unknown = sorted(str(k) for k in value if k not in DEV_KEYS)
|
|
1053
|
+
if unknown:
|
|
1054
|
+
raise ManifestValidationError(
|
|
1055
|
+
f"{config_path}: {shape}. Unknown key(s) {unknown}; "
|
|
1056
|
+
f'"others" is the only key.')
|
|
1057
|
+
if "others" not in value:
|
|
1058
|
+
raise ManifestValidationError(
|
|
1059
|
+
f'{config_path}: {shape}. "others" is missing; leave the whole '
|
|
1060
|
+
f'"dev" section out to allow others.')
|
|
1061
|
+
others = value["others"]
|
|
1062
|
+
if not isinstance(others, str) or others not in DEV_OTHERS:
|
|
1063
|
+
raise ManifestValidationError(
|
|
1064
|
+
f'{config_path}: {shape}. "others" is {others!r}; it takes '
|
|
1065
|
+
f'exactly "allow" or "deny", in lower case.')
|
|
1066
|
+
return {"others": others}
|
|
1067
|
+
|
|
1068
|
+
|
|
1009
1069
|
def _actions_section(source: Path) -> "list | None":
|
|
1010
1070
|
"""The Peg's ``actions`` manifest section, from ``workpeg.json``.
|
|
1011
1071
|
|
|
@@ -639,7 +639,7 @@
|
|
|
639
639
|
// "fail" (4xx -> redirect to login) | "error" (5xx / network -> retry, no
|
|
640
640
|
// redirect, so a transient outage doesn't log an authed user out) |
|
|
641
641
|
// "refused" (a dev install's page whose address the API refuses: said on
|
|
642
|
-
// the page, never redirected, see
|
|
642
|
+
// the page, never redirected, see devNoticeOf).
|
|
643
643
|
Workpeg.accountsBase = "https://accounts.workpeg.com";
|
|
644
644
|
Workpeg._auth = "unknown";
|
|
645
645
|
Workpeg._authUser = {};
|
|
@@ -819,9 +819,10 @@
|
|
|
819
819
|
// refused lists ever differed, would bounce the person back here).
|
|
820
820
|
// Every other 4xx, on every host, signs in exactly as before.
|
|
821
821
|
if (r.status === 403 && onDevHost()) {
|
|
822
|
-
return
|
|
823
|
-
if (
|
|
822
|
+
return devProblem(r).then(function (said) {
|
|
823
|
+
if (said[0] !== DEV_REFUSED) { signIn(); return; }
|
|
824
824
|
devRefusedLoad = true;
|
|
825
|
+
devRefusedWhy = said[1];
|
|
825
826
|
Workpeg._auth = "refused";
|
|
826
827
|
Workpeg.render();
|
|
827
828
|
});
|
|
@@ -973,15 +974,50 @@
|
|
|
973
974
|
&& (p === DEV_REFUSED || p === DEV_MISSING || p === DEV_PAUSED);
|
|
974
975
|
}
|
|
975
976
|
|
|
976
|
-
//
|
|
977
|
+
// Why the API refused a dev page's address (dev-origin-refused's
|
|
978
|
+
// "reason"), and the runtime's OWN words for each. The API's reason is
|
|
979
|
+
// only ever compared, by exact string equality, with these four names;
|
|
980
|
+
// what is shown is always the fixed sentence next to it, never anything
|
|
981
|
+
// the answer carried. Any other reason, or none, gets the generic words.
|
|
982
|
+
var DEV_REASONS = [
|
|
983
|
+
["developer", "This business is not a developer yet. A business can " +
|
|
984
|
+
"run dev pages once Workpeg approves its first peg."],
|
|
985
|
+
["closed", "The owner of this peg does not allow dev pages on it."],
|
|
986
|
+
["label", "This name belongs to the platform and cannot be used for " +
|
|
987
|
+
"a dev page."],
|
|
988
|
+
["registry", "Workpeg could not check this dev page right now. Try " +
|
|
989
|
+
"again in a minute."],
|
|
990
|
+
];
|
|
991
|
+
|
|
992
|
+
// The name in DEV_REASONS that *reason* is exactly; "" for anything else.
|
|
993
|
+
function devReason(reason) {
|
|
994
|
+
for (var i = 0; i < DEV_REASONS.length; i++) {
|
|
995
|
+
if (reason === DEV_REASONS[i][0]) return DEV_REASONS[i][0];
|
|
996
|
+
}
|
|
997
|
+
return "";
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
// The fixed sentence for a reason devReason returned; "" for "".
|
|
1001
|
+
function devReasonWords(reason) {
|
|
1002
|
+
for (var i = 0; i < DEV_REASONS.length; i++) {
|
|
1003
|
+
if (reason === DEV_REASONS[i][0]) return DEV_REASONS[i][1];
|
|
1004
|
+
}
|
|
1005
|
+
return "";
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
// An answer's problem: [the slug of its type, its dev-origin-refused
|
|
1009
|
+
// reason as devReason reads it]; ["", ""] for a body that has none or
|
|
977
1010
|
// does not parse.
|
|
978
|
-
function
|
|
1011
|
+
function devProblem(r) {
|
|
979
1012
|
try {
|
|
980
1013
|
return Promise.resolve(r.json()).then(function (data) {
|
|
981
|
-
|
|
982
|
-
|
|
1014
|
+
var slug = Workpeg._problemSlug(data && data.type);
|
|
1015
|
+
var why = slug === DEV_REFUSED && data && typeof data === "object"
|
|
1016
|
+
? devReason(data.reason) : "";
|
|
1017
|
+
return [slug, why];
|
|
1018
|
+
}, function () { return ["", ""]; });
|
|
983
1019
|
} catch (e) {
|
|
984
|
-
return Promise.resolve("");
|
|
1020
|
+
return Promise.resolve(["", ""]);
|
|
985
1021
|
}
|
|
986
1022
|
}
|
|
987
1023
|
|
|
@@ -992,7 +1028,9 @@
|
|
|
992
1028
|
// another. Kept here, not on `Workpeg`, so nothing a page runs can clear
|
|
993
1029
|
// it, and only ever set on a dev host.
|
|
994
1030
|
var devRefusedLoad = false;
|
|
995
|
-
var
|
|
1031
|
+
var devRefusedWhy = ""; // users/me's reason, as devReason reads it
|
|
1032
|
+
// [business id, "" | DEV_REFUSED | DEV_MISSING | DEV_PAUSED, reason]
|
|
1033
|
+
var devAnswers = [];
|
|
996
1034
|
|
|
997
1035
|
function devAnswer(biz) {
|
|
998
1036
|
for (var i = 0; i < devAnswers.length; i++) {
|
|
@@ -1001,24 +1039,27 @@
|
|
|
1001
1039
|
return null;
|
|
1002
1040
|
}
|
|
1003
1041
|
|
|
1004
|
-
|
|
1005
|
-
|
|
1042
|
+
// [kind, reason] of the notice this load shows, or null for none.
|
|
1043
|
+
function devNoticeOf() {
|
|
1044
|
+
if (devRefusedLoad) return [DEV_REFUSED, devRefusedWhy];
|
|
1006
1045
|
var a = devAnswer(Workpeg._businessIdFromPath());
|
|
1007
|
-
return a ? a[1] :
|
|
1046
|
+
return a && a[1] ? [a[1], a[2]] : null;
|
|
1008
1047
|
}
|
|
1009
1048
|
|
|
1010
1049
|
// Is this peg installed for testing in this business? Asked once per
|
|
1011
1050
|
// business in the path, once users/me has said yes, on a dev page only
|
|
1012
1051
|
// (the API's gate decides staff/me like any table route). A 403 typed
|
|
1013
1052
|
// dev-install-missing or dev-install-paused puts its notice in place of
|
|
1014
|
-
// the app
|
|
1015
|
-
//
|
|
1053
|
+
// the app, and so does dev-origin-refused, a 403 or the 503 the API gives
|
|
1054
|
+
// when the registry cannot answer, in the words for its reason. Every
|
|
1055
|
+
// other answer, and no answer, leaves the page as it is: its own calls
|
|
1056
|
+
// meet their own refusals, as they would without this.
|
|
1016
1057
|
function devStaffCheck() {
|
|
1017
1058
|
try {
|
|
1018
1059
|
if (!onDevHost()) return;
|
|
1019
1060
|
var biz = Workpeg._businessIdFromPath();
|
|
1020
1061
|
if (!biz || devAnswer(biz)) return;
|
|
1021
|
-
var asked = [biz, ""];
|
|
1062
|
+
var asked = [biz, "", ""];
|
|
1022
1063
|
devAnswers.push(asked);
|
|
1023
1064
|
var headers = {};
|
|
1024
1065
|
var ns = Workpeg._pegNamespace();
|
|
@@ -1027,10 +1068,14 @@
|
|
|
1027
1068
|
encodeURIComponent(biz) + "/staff/me/",
|
|
1028
1069
|
{ method: "GET", credentials: "include", headers: headers })
|
|
1029
1070
|
.then(function (r) {
|
|
1030
|
-
if (r.status !== 403) return;
|
|
1031
|
-
return
|
|
1032
|
-
|
|
1071
|
+
if (r.status !== 403 && r.status !== 503) return;
|
|
1072
|
+
return devProblem(r).then(function (said) {
|
|
1073
|
+
var slug = said[0];
|
|
1074
|
+
if (r.status === 503 ? slug !== DEV_REFUSED
|
|
1075
|
+
: slug !== DEV_REFUSED && slug !== DEV_MISSING
|
|
1076
|
+
&& slug !== DEV_PAUSED) return;
|
|
1033
1077
|
asked[1] = slug;
|
|
1078
|
+
asked[2] = said[1];
|
|
1034
1079
|
Workpeg.render();
|
|
1035
1080
|
});
|
|
1036
1081
|
})
|
|
@@ -1042,7 +1087,7 @@
|
|
|
1042
1087
|
var DEV_INSTALL_PAGE = "https://developers.workpeg.com/dev-install/";
|
|
1043
1088
|
var DEV_LABEL = /^[a-z][a-z0-9-]{1,61}[a-z0-9]$/;
|
|
1044
1089
|
|
|
1045
|
-
function devNotice(kind) {
|
|
1090
|
+
function devNotice(kind, reason) {
|
|
1046
1091
|
var box = document.createElement("div");
|
|
1047
1092
|
box.style.display = "flex";
|
|
1048
1093
|
box.style.flexDirection = "column";
|
|
@@ -1064,7 +1109,8 @@
|
|
|
1064
1109
|
? "Testing is paused for this peg: the registry did not confirm it " +
|
|
1065
1110
|
"just now. Try again in a minute; a rejected peg stays paused " +
|
|
1066
1111
|
"until it is resubmitted."
|
|
1067
|
-
:
|
|
1112
|
+
: devReasonWords(reason)
|
|
1113
|
+
|| "This address cannot be used for a development page.";
|
|
1068
1114
|
box.appendChild(words);
|
|
1069
1115
|
// The peg's page on the developer dashboard, where an owner or admin
|
|
1070
1116
|
// presses Install for testing. Only a namespace that is a label gets a
|
|
@@ -4395,9 +4441,9 @@
|
|
|
4395
4441
|
// else a loader (checking) or notice (5xx/network); a 4xx has already
|
|
4396
4442
|
// redirected. The check is kicked off once, the first time we hit "unknown".
|
|
4397
4443
|
if (Workpeg._auth === "unknown") Workpeg._runAuthCheck();
|
|
4398
|
-
var
|
|
4399
|
-
if (
|
|
4400
|
-
el = devNotice(
|
|
4444
|
+
var dev = devNoticeOf();
|
|
4445
|
+
if (dev) {
|
|
4446
|
+
el = devNotice(dev[0], dev[1]); // a dev page's refusal, said
|
|
4401
4447
|
} else if (Workpeg._auth === "ok") {
|
|
4402
4448
|
devStaffCheck(); // a dev install's page only
|
|
4403
4449
|
el = Workpeg.renderNode(children[0], owner);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/fonts/geist-italic-latin.7611b95c.woff2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{workpeg-0.152.0 → workpeg-0.153.0}/src/workpeg/ui/runtime/fonts/geist-normal-latin.9b6f5ff4.woff2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|