@homepages/concrete 12.0.0 → 13.0.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.
- package/CHANGELOG.md +184 -0
- package/README.md +8 -10
- package/codemods/fixtures-are-data.mjs +7 -0
- package/codemods/fixtures-list-properties.mjs +6 -0
- package/codemods/manifest.json +11 -0
- package/codemods/steps/fixtures-list-properties.mjs +16 -0
- package/codemods/steps/fixtures-to-data.mjs +41 -0
- package/dist/artifact/playground/client/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
- package/dist/artifact/playground/client/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
- package/dist/artifact/playground/client/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
- package/dist/artifact/playground/client/assets/index-Bmvcss4B.js +1338 -0
- package/dist/artifact/playground/client/assets/index-C01UCAWD.css +1 -0
- package/dist/artifact/playground/client/index.html +2 -2
- package/dist/artifact/playground/client/island-canvas-host.mjs +1 -1
- package/dist/artifact/playground/host.mjs +110 -59
- package/dist/base.css +2 -2
- package/dist/cli/build/icons.js +1 -1
- package/dist/cli/build/index.js +11 -10
- package/dist/cli/build/manifest.js +44 -0
- package/dist/cli/build/record.js +123 -0
- package/dist/cli/build/sections.js +28 -18
- package/dist/cli/build/source.js +1 -1
- package/dist/cli/build/static.js +8 -5
- package/dist/cli/build/template-build.js +614 -0
- package/dist/cli/check/analyze.js +18 -1
- package/dist/cli/check/load-workspace.js +2 -2
- package/dist/cli/check/portable-names.js +1 -1
- package/dist/cli/check/render/corpus.js +119 -0
- package/dist/cli/check/render/invariants.js +1 -0
- package/dist/cli/check/stages/bundles.js +15 -18
- package/dist/cli/check/stages/composition.js +8 -25
- package/dist/cli/check/stages/fixtures.js +14 -10
- package/dist/cli/check/stages/logic.js +7 -23
- package/dist/cli/check/stages/render.js +12 -14
- package/dist/cli/check/stages/sections.js +22 -66
- package/dist/cli/check/stages/stylesheet.js +4 -26
- package/dist/cli/check/stages/workspace.js +27 -22
- package/dist/cli/commands.js +51 -23
- package/dist/cli/currency/preamble.js +1 -1
- package/dist/cli/currency/resolve-latest.js +3 -2
- package/dist/cli/dev/capture-browser.js +26 -0
- package/dist/cli/dev/fixture-schema.js +441 -0
- package/dist/cli/dev/folder-files.js +244 -0
- package/dist/cli/dev/index.js +7 -3
- package/dist/cli/dev/playground-server.js +34 -0
- package/dist/cli/dev/section-ladders.js +76 -0
- package/dist/cli/dev/server.js +120 -304
- package/dist/cli/install/background.js +16 -0
- package/dist/cli/install/index.js +45 -0
- package/dist/cli/install/tools.js +27 -0
- package/dist/cli/media/derive.js +19 -13
- package/dist/cli/media/deriver-plugin.js +14 -3
- package/dist/cli/property/fixture-list.js +46 -0
- package/dist/cli/property/index.js +12 -9
- package/dist/cli/property/library.js +12 -10
- package/dist/cli/publish/artifact.js +90 -0
- package/dist/cli/publish/captures.js +61 -0
- package/dist/cli/publish/fixtures.js +17 -0
- package/dist/cli/publish/index.js +10 -18
- package/dist/cli/{build → publish}/playground.js +3 -3
- package/dist/cli/publish/report.js +15 -33
- package/dist/cli/upgrade/codemod.d.ts +14 -0
- package/dist/cli/upgrade/fixture-conversion.d.ts +11 -0
- package/dist/cli/upgrade/fixture-conversion.js +54 -0
- package/dist/cli/upgrade/fixture-modules.js +125 -0
- package/dist/cli/upgrade/fixtures-to-data.d.ts +40 -0
- package/dist/cli/upgrade/fixtures-to-data.js +498 -0
- package/dist/cli/upgrade/index.js +18 -2
- package/dist/cli/upgrade/legacy-fixtures.d.ts +34 -0
- package/dist/cli/upgrade/legacy-fixtures.js +22 -0
- package/dist/cli/upgrade/stage.js +1 -1
- package/dist/cli/workspace-fixtures.js +80 -0
- package/dist/cli.js +1 -0
- package/dist/css/compile.js +9 -3
- package/dist/fixtures/bundle-rule.js +16 -16
- package/dist/fixtures/media-plugin.js +12 -33
- package/dist/fixtures/synthesize-empties.js +3 -2
- package/dist/index.d.ts +7 -7
- package/dist/{playground-island-runtime.d.ts → island-runtime.d.ts} +1 -2
- package/dist/{playground-island-runtime.js → island-runtime.js} +1 -2
- package/dist/islands/client-module.js +1 -1
- package/dist/{cli/dev → islands}/tsconfig-paths.js +2 -14
- package/dist/islands/wrap.js +40 -0
- package/dist/node_modules/.pnpm/acorn@8.18.0/node_modules/acorn/dist/acorn.js +5119 -0
- package/dist/packages/external/concrete/package.js +1 -1
- package/dist/packages/internal/bundle-evaluation/dist/cache.js +36 -0
- package/dist/packages/internal/bundle-evaluation/dist/evaluate.js +174 -0
- package/dist/packages/internal/bundle-evaluation/dist/index.js +5 -0
- package/dist/packages/internal/bundle-evaluation/dist/section-code.js +10 -0
- package/dist/packages/internal/capture-settle/dist/index.js +2 -2
- package/dist/packages/internal/capture-settle/dist/settle.js +88 -13
- package/dist/packages/internal/code-fingerprint/dist/index.js +57 -0
- package/dist/packages/internal/content-doc-ops/dist/index.js +176 -0
- package/dist/packages/internal/content-doc-ops/dist/made-rows.js +15 -0
- package/dist/packages/internal/deliverable-reads/dist/bootstrap.js +81 -0
- package/dist/packages/internal/deliverable-reads/dist/display.js +21 -0
- package/dist/packages/internal/deliverable-reads/dist/format.js +15 -0
- package/dist/packages/internal/deliverable-reads/dist/index.js +7 -0
- package/dist/packages/internal/deliverable-reads/dist/pages.js +29 -0
- package/dist/packages/internal/deliverable-reads/dist/requirements.js +72 -0
- package/dist/{cli/capture → packages/internal/download-files/dist}/bundle.js +8 -4
- package/dist/packages/internal/download-files/dist/capture-origin.js +126 -0
- package/dist/packages/internal/download-files/dist/capture-routes.js +139 -0
- package/dist/packages/internal/download-files/dist/capture-shell.js +38 -0
- package/dist/packages/internal/download-files/dist/capture.js +74 -0
- package/dist/packages/internal/download-files/dist/egress-watch.js +38 -0
- package/dist/packages/internal/download-files/dist/files.js +7 -0
- package/dist/packages/internal/download-files/dist/finish.js +35 -0
- package/dist/packages/internal/download-files/dist/fleet.js +94 -0
- package/dist/packages/internal/download-files/dist/format.js +40 -0
- package/dist/packages/internal/download-files/dist/make.js +105 -0
- package/dist/packages/internal/download-files/dist/master-tally.js +32 -0
- package/dist/packages/internal/download-files/dist/names.js +24 -0
- package/dist/packages/internal/download-files/dist/pdf-boxes.js +33 -0
- package/dist/packages/internal/download-files/dist/pdf-image-placements.js +194 -0
- package/dist/packages/internal/download-files/dist/pdf-images.js +289 -0
- package/dist/packages/internal/file-store/dist/files.js +8 -0
- package/dist/packages/internal/file-store/dist/lru.js +40 -0
- package/dist/packages/internal/file-store/dist/refusal.js +12 -0
- package/dist/packages/internal/file-store/dist/trees.js +151 -0
- package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +1 -1
- package/dist/packages/internal/fill-bake/dist/compute-reads.js +47 -21
- package/dist/packages/internal/fill-bake/dist/index.js +5 -1
- package/dist/packages/internal/fill-bake/dist/item-merge.js +4 -3
- package/dist/packages/internal/fill-bake/dist/resolve-instance.js +9 -0
- package/dist/packages/internal/fill-bake/dist/resolve.js +3 -0
- package/dist/packages/internal/fill-bake/dist/round-trip.js +2 -0
- package/dist/packages/internal/fill-bake/dist/strip.js +6 -0
- package/dist/packages/internal/fill-vocabulary/dist/holder.js +1 -1
- package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +1 -1
- package/dist/packages/internal/fill-vocabulary/dist/verbs.js +1 -1
- package/dist/packages/internal/island-runtime/dist/index.js +1 -10
- package/dist/packages/internal/island-runtime/dist/use-capture-ready.d.ts +5 -0
- package/dist/packages/internal/lead-fields/dist/ingest.js +72 -0
- package/dist/packages/internal/media-resolution/dist/video.js +6 -2
- package/dist/packages/internal/page-render/dist/addresses.js +57 -0
- package/dist/packages/internal/page-render/dist/index.js +6 -0
- package/dist/packages/internal/page-render/dist/kept.js +30 -0
- package/dist/packages/internal/page-render/dist/nav.js +42 -0
- package/dist/packages/internal/page-render/dist/render.js +152 -0
- package/dist/packages/internal/page-shell/dist/assemble.js +161 -0
- package/dist/packages/internal/page-shell/dist/escape.js +10 -0
- package/dist/packages/internal/page-shell/dist/frame.js +23 -0
- package/dist/packages/internal/page-shell/dist/index.js +26 -0
- package/dist/packages/internal/playground/dist/build-fingerprint.js +18 -0
- package/dist/packages/internal/playground/dist/fixture-conversions/list-names-properties.js +76 -0
- package/dist/packages/internal/playground/dist/fixture-formats.d.ts +37 -0
- package/dist/packages/internal/playground/dist/fixture-formats.js +20 -0
- package/dist/packages/internal/playground/dist/host/bootstrap.js +108 -0
- package/dist/packages/internal/playground/dist/host/built.js +202 -0
- package/dist/packages/internal/playground/dist/host/catalog-fixture.js +53 -0
- package/dist/packages/internal/playground/dist/host/download.js +34 -0
- package/dist/packages/internal/playground/dist/host/env.js +11 -0
- package/dist/packages/internal/playground/dist/host/everywhere-saves.js +353 -0
- package/dist/packages/internal/playground/dist/host/fixture-addresses.js +52 -0
- package/dist/packages/internal/playground/dist/host/fixture-documents.js +494 -0
- package/dist/packages/internal/playground/dist/host/fixture-operations.js +364 -0
- package/dist/packages/internal/playground/dist/host/fixture-units.js +93 -0
- package/dist/{fixtures → packages/internal/playground/dist/host}/image-dimensions.js +1 -1
- package/dist/packages/internal/playground/dist/host/leads.js +41 -0
- package/dist/packages/internal/playground/dist/host/media-saves.js +309 -0
- package/dist/{fixtures → packages/internal/playground/dist/host}/media-store.js +79 -26
- package/dist/packages/internal/playground/dist/host/overridable.js +9 -0
- package/dist/packages/internal/playground/dist/host/owned-saves.js +203 -0
- package/dist/{playground → packages/internal/playground/dist}/host/page-state.js +1 -1
- package/dist/packages/internal/playground/dist/host/program.js +54 -0
- package/dist/packages/internal/playground/dist/host/property-derive.js +216 -0
- package/dist/packages/internal/playground/dist/host/property-saves.js +74 -0
- package/dist/{fixtures → packages/internal/playground/dist/host}/property.js +88 -229
- package/dist/packages/internal/playground/dist/host/provenance.js +49 -0
- package/dist/packages/internal/playground/dist/host/resolve.js +553 -0
- package/dist/packages/internal/playground/dist/host/row-images.js +41 -0
- package/dist/{fixtures → packages/internal/playground/dist/host}/rows.js +1 -1
- package/dist/packages/internal/playground/dist/host/save.js +429 -0
- package/dist/packages/internal/playground/dist/host/serve.js +952 -0
- package/dist/packages/internal/playground/dist/host/site.js +79 -0
- package/dist/packages/internal/playground/dist/host/slots.js +202 -0
- package/dist/packages/internal/playground/dist/host/stated-content.js +93 -0
- package/dist/packages/internal/playground/dist/host/stored-fixtures.js +135 -0
- package/dist/packages/internal/playground/dist/host/violations.js +7 -0
- package/dist/packages/internal/playground/dist/jobs/lanes.js +24 -0
- package/dist/packages/internal/playground/dist/jobs/memory-queue.js +112 -0
- package/dist/packages/internal/playground/dist/jobs/probe.js +37 -0
- package/dist/packages/internal/playground/dist/jobs/queue.js +28 -0
- package/dist/packages/internal/playground/dist/jobs/runner.js +207 -0
- package/dist/packages/internal/playground/dist/layout.js +14 -0
- package/dist/packages/internal/playground/dist/platform.js +33 -0
- package/dist/packages/internal/playground/dist/server/changes.js +57 -0
- package/dist/packages/internal/playground/dist/server/crop.js +47 -0
- package/dist/packages/internal/playground/dist/server/derived-files.js +88 -0
- package/dist/packages/internal/playground/dist/server/download.js +158 -0
- package/dist/{cli/dev → packages/internal/playground/dist/server}/http.js +4 -12
- package/dist/packages/internal/playground/dist/server/jobs.js +29 -0
- package/dist/{cli/dev → packages/internal/playground/dist/server}/listen.js +4 -11
- package/dist/packages/internal/playground/dist/server/playground-server.js +424 -0
- package/dist/{cli/dev → packages/internal/playground/dist/server}/request-error.js +1 -1
- package/dist/packages/internal/playground/dist/server/size-ladders.js +170 -0
- package/dist/packages/internal/playground/dist/server/verification.js +75 -0
- package/dist/packages/internal/playground/dist/server/verify-build.js +139 -0
- package/dist/packages/internal/playground/dist/wire.js +78 -0
- package/dist/packages/internal/property-facts/dist/registry-facts.js +1 -1
- package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +1 -1
- package/dist/packages/internal/section-contracts/dist/reads-acyclic-contract.js +1 -1
- package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +1 -1
- package/dist/packages/internal/site-files/dist/head.js +59 -0
- package/dist/packages/internal/site-files/dist/index.js +4 -0
- package/dist/packages/internal/site-files/dist/site.js +211 -0
- package/dist/packages/internal/static-assets-binding/dist/index.js +32 -0
- package/dist/packages/internal/static-assets-binding/dist/section-asset-url.js +38 -5
- package/dist/packages/internal/template-artifact/dist/asset-mime.js +8 -1
- package/dist/packages/internal/template-artifact/dist/build.js +148 -0
- package/dist/packages/internal/template-artifact/dist/composition.js +62 -0
- package/dist/packages/internal/template-artifact/dist/index.js +2 -2
- package/dist/packages/internal/template-artifact/dist/layout.js +48 -12
- package/dist/packages/internal/template-artifact/dist/manifest.js +3 -10
- package/dist/packages/internal/template-artifact/dist/verify.js +51 -31
- package/dist/packages/internal/template-contracts/dist/address-value.js +6 -1
- package/dist/packages/internal/template-contracts/dist/content-categories.js +10 -1
- package/dist/packages/internal/template-contracts/dist/fact-compute.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/fact-keys.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/fact-registry.d.ts +3 -3
- package/dist/packages/internal/template-contracts/dist/fact-registry.js +59 -32
- package/dist/packages/internal/template-contracts/dist/fill-spec.js +14 -1
- package/dist/packages/internal/template-contracts/dist/list.d.ts +3 -3
- package/dist/packages/internal/template-contracts/dist/media-candidates.js +67 -2
- package/dist/packages/internal/template-contracts/dist/media-offer.js +180 -0
- package/dist/packages/internal/template-contracts/dist/object.d.ts +2 -2
- package/dist/packages/internal/template-contracts/dist/primitive-descriptors.js +9 -2
- package/dist/packages/internal/template-contracts/dist/read-graph.js +36 -2
- package/dist/packages/internal/template-contracts/dist/ref-locate.js +16 -1
- package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +9 -10
- package/dist/packages/internal/template-contracts/dist/registry-facts.js +12 -1
- package/dist/packages/internal/template-contracts/dist/registry-graph.js +112 -0
- package/dist/packages/internal/template-contracts/dist/registry-shape.js +15 -2
- package/dist/packages/internal/template-contracts/dist/require-graph.js +300 -0
- package/dist/packages/internal/template-contracts/dist/row-ref.d.ts +3 -3
- package/dist/packages/internal/template-contracts/dist/row.d.ts +3 -3
- package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +1 -1
- package/dist/{schema → packages/internal/template-contracts/dist}/section-nav.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/slot-builders.d.ts +4 -4
- package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +3 -1
- package/dist/packages/internal/template-contracts/dist/slot-catalog.js +24 -1
- package/dist/packages/internal/template-contracts/dist/slot-overrides.js +26 -1
- package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/slot-types.js +1 -1
- package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/table-members.js +7 -2
- package/dist/packages/internal/template-contracts/dist/video-value.d.ts +1 -1
- package/dist/packages/internal/upload-formats/dist/heic.js +35 -0
- package/dist/packages/internal/upload-formats/dist/index.js +80 -0
- package/dist/packages/internal/upload-formats/dist/magic-bytes.js +293 -0
- package/dist/platform/paths.js +1 -0
- package/dist/platform/process.js +49 -1
- package/dist/rules/registry.js +27 -3
- package/dist/schema/fact.d.ts +2 -2
- package/dist/schema/facts-view.d.ts +1 -1
- package/dist/schema/section-props.d.ts +1 -1
- package/dist/schema/section-schema.d.ts +1 -1
- package/dist/schema/section-schema.js +1 -0
- package/dist/section/declare.d.ts +1 -1
- package/dist/section/discovery.js +6 -2
- package/dist/section/publish-shape.js +38 -0
- package/dist/section/section.d.ts +1 -1
- package/dist/template/define-template.d.ts +14 -4
- package/dist/template/define-template.js +2 -0
- package/dist/template/logic-shim.d.ts +1 -1
- package/dist/template/materialize.js +1 -1
- package/dist/template/running-copy.js +0 -1
- package/dist/template/section-reads.js +1 -1
- package/guide/reference/cli/INDEX.md +6 -5
- package/guide/reference/cli/build.md +10 -8
- package/guide/reference/cli/check.md +4 -2
- package/guide/reference/cli/dev.md +6 -2
- package/guide/reference/cli/install.md +41 -0
- package/guide/reference/cli/property-add.md +5 -4
- package/guide/reference/cli/property-list.md +2 -2
- package/guide/reference/cli/publish.md +5 -5
- package/guide/reference/cli/upgrade.md +1 -1
- package/guide/reference/rules/INDEX.md +8 -4
- package/package.json +14 -30
- package/dist/artifact/playground/client/assets/index-BcLGpWLR.js +0 -1266
- package/dist/artifact/playground/client/assets/index-CxWPYOH2.css +0 -1
- package/dist/cli/build/artifact.js +0 -220
- package/dist/cli/build/captures.js +0 -48
- package/dist/cli/build/fixtures.js +0 -92
- package/dist/cli/capture/capture-browser.js +0 -37
- package/dist/cli/capture/capture.js +0 -115
- package/dist/cli/check/render/inputs.js +0 -60
- package/dist/cli/check/render/nav.js +0 -31
- package/dist/cli/dev/crop.js +0 -20
- package/dist/cli/dev/fixture-ladders.js +0 -96
- package/dist/cli/dev/hmr.js +0 -26
- package/dist/cli/dev/islands.js +0 -234
- package/dist/cli/dev/load-template.js +0 -52
- package/dist/cli/dev/vite.js +0 -114
- package/dist/cli/dev/workspace-reader.js +0 -249
- package/dist/cli/publish/freshness.js +0 -64
- package/dist/fixtures/brand.d.ts +0 -4
- package/dist/fixtures/brand.js +0 -8
- package/dist/fixtures/load.js +0 -159
- package/dist/fixtures/resolve.js +0 -392
- package/dist/fixtures.d.ts +0 -429
- package/dist/fixtures.js +0 -23
- package/dist/packages/internal/canvas-core/dist/island-host.js +0 -62
- package/dist/packages/internal/canvas-core/dist/island-shields.js +0 -30
- package/dist/playground/canvas-island-host.d.ts +0 -11
- package/dist/playground/canvas-island-host.js +0 -29
- package/dist/playground/canvas-markers.js +0 -14
- package/dist/playground/host/paths.js +0 -8
- package/dist/playground/layout.js +0 -17
- package/dist/playground/wire.js +0 -28
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SlotValue } from "../packages/internal/template-contracts/dist/slot-value.js";
|
|
2
1
|
import { Slot } from "../packages/internal/template-contracts/dist/slot-types.js";
|
|
3
2
|
import { DISPLAY_REF_PREFIX, DisplayEntryName, SlotRef } from "../packages/internal/template-contracts/dist/slot-ref.js";
|
|
3
|
+
import { SlotValue } from "../packages/internal/template-contracts/dist/slot-value.js";
|
|
4
4
|
import "../schema/section-props.js";
|
|
5
5
|
import { DefinedSchema, DisplayInput } from "../schema/define-schema.js";
|
|
6
6
|
//#region src/section/declare.d.ts
|
|
@@ -12,6 +12,7 @@ const SKIPPED_DIRS = /* @__PURE__ */ new Set([
|
|
|
12
12
|
"dist",
|
|
13
13
|
".concrete"
|
|
14
14
|
]);
|
|
15
|
+
const ROOT_TOOL_CONFIG = /^[^/.]+\.config\.[cm]?[jt]s$/;
|
|
15
16
|
var DuplicateSectionKeyError = class extends Error {
|
|
16
17
|
key;
|
|
17
18
|
first;
|
|
@@ -31,9 +32,12 @@ function listModules(root) {
|
|
|
31
32
|
if (entry.name.startsWith(".")) continue;
|
|
32
33
|
const path = entry.path;
|
|
33
34
|
if (entry.isDirectory()) {
|
|
34
|
-
if (SKIPPED_DIRS.has(entry.name)
|
|
35
|
+
if (SKIPPED_DIRS.has(entry.name)) continue;
|
|
35
36
|
walk(path, depth + 1);
|
|
36
|
-
} else if (entry.isFile() && MODULE_FILE.test(entry.name) && !SKIPPED_FILE.test(entry.name))
|
|
37
|
+
} else if (entry.isFile() && MODULE_FILE.test(entry.name) && !SKIPPED_FILE.test(entry.name)) {
|
|
38
|
+
if (depth === 0 && ROOT_TOOL_CONFIG.test(entry.name)) continue;
|
|
39
|
+
out.push(path);
|
|
40
|
+
}
|
|
37
41
|
}
|
|
38
42
|
};
|
|
39
43
|
walk(root, 0);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { fillSpecFromSchema } from "../schema/extract-fill-spec.js";
|
|
2
|
+
import { FillSpec } from "../packages/internal/template-contracts/dist/fill-spec-schema.js";
|
|
3
|
+
import { SectionSchema } from "../schema/section-schema.js";
|
|
4
|
+
import { materializeSection } from "./materialize.js";
|
|
5
|
+
|
|
6
|
+
//#region src/section/publish-shape.ts
|
|
7
|
+
function flatten(parsed, key) {
|
|
8
|
+
const { meta, ...rest } = parsed;
|
|
9
|
+
return {
|
|
10
|
+
...rest,
|
|
11
|
+
slot_order: Object.keys(rest.slots),
|
|
12
|
+
anchor: meta.anchor ?? key,
|
|
13
|
+
...meta.display ? { display: meta.display } : {}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function stampItemOrder(object) {
|
|
17
|
+
object.item_order = Object.keys(object.fields);
|
|
18
|
+
for (const field of Object.values(object.fields)) {
|
|
19
|
+
const element = field.element;
|
|
20
|
+
if (field.type === "list" && element?.type === "object") stampItemOrder(element);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function publishShape(key, section) {
|
|
24
|
+
const materialized = materializeSection(section);
|
|
25
|
+
const parsed = SectionSchema.parse(materialized);
|
|
26
|
+
for (const slot of Object.values(parsed.slots)) {
|
|
27
|
+
if (slot.type === "object") stampItemOrder(slot);
|
|
28
|
+
if (slot.type === "list" && slot.element?.type === "object") stampItemOrder(slot.element);
|
|
29
|
+
}
|
|
30
|
+
const fillSpec = FillSpec.parse(fillSpecFromSchema(materialized));
|
|
31
|
+
return {
|
|
32
|
+
schema: flatten(parsed, key),
|
|
33
|
+
fillSpec
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { publishShape };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { SectionNav } from "../packages/internal/template-contracts/dist/section-nav.js";
|
|
1
2
|
import { Slot } from "../packages/internal/template-contracts/dist/slot-types.js";
|
|
2
3
|
import { SlotRef } from "../packages/internal/template-contracts/dist/slot-ref.js";
|
|
3
|
-
import { SectionNav } from "../schema/section-nav.js";
|
|
4
4
|
import "../schema/section-schema.js";
|
|
5
5
|
import { SectionProps } from "../schema/section-props.js";
|
|
6
6
|
import { SlotBindingMap } from "../primitives/slot-bindings.js";
|
|
@@ -63,7 +63,7 @@ interface TemplatePreview {
|
|
|
63
63
|
readonly types: readonly ("single_family" | "condo_townhome" | "multi_family" | "investment")[];
|
|
64
64
|
readonly demoUrl?: string | null;
|
|
65
65
|
}
|
|
66
|
-
/** What every
|
|
66
|
+
/** What every output class shares: identity, the icon, scope, rules, intake chrome. */
|
|
67
67
|
interface DefineTemplateCommon {
|
|
68
68
|
readonly key: string;
|
|
69
69
|
/** The display name — two words at most; the picker, the editor and the dashboard show it on one line. */
|
|
@@ -72,6 +72,13 @@ interface DefineTemplateCommon {
|
|
|
72
72
|
readonly icon: string;
|
|
73
73
|
readonly scope: TemplateScope;
|
|
74
74
|
readonly preview?: TemplatePreview;
|
|
75
|
+
/**
|
|
76
|
+
* The template's fixture list, as a path relative to `template.ts`:
|
|
77
|
+
* `fixtures: "./fixtures/index.json"`. The list names the content fixtures the playground
|
|
78
|
+
* offers, each a document naming the property it is on. Dev data: it enters no bundle and
|
|
79
|
+
* no content hash, so changing a fixture re-versions nothing.
|
|
80
|
+
*/
|
|
81
|
+
readonly fixtures?: string;
|
|
75
82
|
}
|
|
76
83
|
/** One rendered format, or a non-empty list of one class. */
|
|
77
84
|
type FormatList<F> = F | readonly [F, ...F[]];
|
|
@@ -94,7 +101,7 @@ type DefineTemplateInput<PageId extends string> = DefineTemplateCommon & ({
|
|
|
94
101
|
readonly pages: Readonly<Record<PageId, RenderedPage>>;
|
|
95
102
|
readonly canvases?: CanvasesInput<NoInfer<PageId>>;
|
|
96
103
|
});
|
|
97
|
-
/** The
|
|
104
|
+
/** The output class a template's formats declare. */
|
|
98
105
|
type OutputClass = "website" | "image" | "document";
|
|
99
106
|
/** One page as the template value carries it: the authored entry with its id stamped from the key. */
|
|
100
107
|
interface TemplatePage {
|
|
@@ -126,11 +133,13 @@ interface TemplateValue {
|
|
|
126
133
|
readonly formats: readonly (WebsiteFormat | ImageFormat | DocumentFormat)[];
|
|
127
134
|
readonly icon: string;
|
|
128
135
|
readonly scope: TemplateScope;
|
|
129
|
-
/** In
|
|
136
|
+
/** In output order. */
|
|
130
137
|
readonly pages: readonly TemplatePage[];
|
|
131
138
|
/** In canvas-bar order; always explicit. */
|
|
132
139
|
readonly canvases: readonly TemplateCanvas[];
|
|
133
140
|
readonly preview?: TemplatePreview;
|
|
141
|
+
/** The fixture list's path, relative to `template.ts`, as authored. */
|
|
142
|
+
readonly fixtures?: string;
|
|
134
143
|
readonly [TEMPLATE]: true;
|
|
135
144
|
}
|
|
136
145
|
/**
|
|
@@ -138,7 +147,8 @@ interface TemplateValue {
|
|
|
138
147
|
* class, the canvases naming real pages — and returns the value the probe reads.
|
|
139
148
|
*
|
|
140
149
|
* @throws when the scope names no org, names one twice, or names one that is not a
|
|
141
|
-
* UUID; when `
|
|
150
|
+
* UUID; when `fixtures` is not a `./`-relative path to a `.json` file; when `format` is
|
|
151
|
+
* an empty list or mixes classes; when `pages` is empty; when
|
|
142
152
|
* a declared canvas names a page the site map lacks.
|
|
143
153
|
*/
|
|
144
154
|
declare function defineTemplate<const PageId extends string>(input: DefineTemplateInput<PageId>): TemplateValue;
|
|
@@ -11,6 +11,7 @@ const CLASS_BY_CATEGORY = {
|
|
|
11
11
|
};
|
|
12
12
|
function defineTemplate(input) {
|
|
13
13
|
assertScope(input.scope);
|
|
14
|
+
if (input.fixtures !== void 0 && (typeof input.fixtures !== "string" || !/^\.\/.+\.json$/.test(input.fixtures))) throw new Error(`Template "${input.key}": \`fixtures\` is the fixture list's path relative to template.ts, written "./fixtures/index.json".`);
|
|
14
15
|
const formats = Array.isArray(input.format) ? [...input.format] : [input.format];
|
|
15
16
|
const output = outputClassOf(input.key, formats);
|
|
16
17
|
const authoredPages = input.pages;
|
|
@@ -49,6 +50,7 @@ function defineTemplate(input) {
|
|
|
49
50
|
pages,
|
|
50
51
|
canvases,
|
|
51
52
|
...input.preview === void 0 ? {} : { preview: input.preview },
|
|
53
|
+
...input.fixtures === void 0 ? {} : { fixtures: input.fixtures },
|
|
52
54
|
[TEMPLATE]: true
|
|
53
55
|
};
|
|
54
56
|
return Object.freeze(value);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ATTR_ISLAND_KEY, ISLAND_CAPTURE_HOLDS_GLOBAL } from "../packages/internal/capture-settle/dist/island-markers.js";
|
|
2
2
|
import { ATTR_ISLAND_FRAMELESS, ATTR_ISLAND_ID, ATTR_ISLAND_PROPS, EDITOR_BRIDGE_PROP, EDITOR_BRIDGE_PROTOCOL, EditorBridge, EditorBridgeSelection, EditorSelection, ISLAND_ELEMENT, IslandComponent, IslandEditor, IslandEditorOptions, IslandModule, IslandProps, IslandPropsError, IslandServerFrame, deserializeIslandProps, islandId, serializeIslandProps } from "../packages/internal/island-runtime/dist/contract.js";
|
|
3
|
-
import { compute, getComputed } from "../packages/internal/template-contracts/dist/compute.js";
|
|
4
3
|
import { Slot as Slot$1 } from "../packages/internal/template-contracts/dist/slot-types.js";
|
|
5
4
|
import { fill } from "../packages/internal/template-contracts/dist/fill-builders.js";
|
|
5
|
+
import { compute, getComputed } from "../packages/internal/template-contracts/dist/compute.js";
|
|
6
6
|
import { holderProcess } from "../packages/internal/template-contracts/dist/process-builders.js";
|
|
7
7
|
import { address, date, document, email, image, media, number, phone, poi, select, text, tour, url, video } from "../packages/internal/template-contracts/dist/slot-builders.js";
|
|
8
8
|
import { object } from "../packages/internal/template-contracts/dist/object.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { placementOf } from "../packages/internal/template-contracts/dist/ref-locate.js";
|
|
2
|
-
import { recordPlacements } from "../section/placements.js";
|
|
3
2
|
import { TemplateManifest } from "../schema/manifest.js";
|
|
3
|
+
import { recordPlacements } from "../section/placements.js";
|
|
4
4
|
import { buildReadGraph, isSourcedTarget } from "./section-reads.js";
|
|
5
5
|
import { createElement } from "react";
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DISPLAY_REF_PREFIX, serializedSectionRefs } from "../packages/internal/template-contracts/dist/slot-ref.js";
|
|
2
2
|
import { holderOf, mirrorRefOf, sectionSlotAt } from "../packages/internal/template-contracts/dist/ref-locate.js";
|
|
3
|
-
import { fillSpecFromSchema } from "../schema/extract-fill-spec.js";
|
|
4
3
|
import { memberSourceOf } from "../packages/internal/template-contracts/dist/row-sources.js";
|
|
4
|
+
import { fillSpecFromSchema } from "../schema/extract-fill-spec.js";
|
|
5
5
|
|
|
6
6
|
//#region src/template/section-reads.ts
|
|
7
7
|
function isSourcedTarget(schema, slot) {
|
|
@@ -3,7 +3,7 @@ purpose: Every `concrete` command, with its full flag surface, exit codes and co
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=13.0.0 <14.0.0"
|
|
7
7
|
related: [INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# Command reference
|
|
@@ -18,11 +18,12 @@ page. Run `concrete --help` for the same list at the terminal.
|
|
|
18
18
|
|---|---|---|
|
|
19
19
|
| [`dev`](dev.md) | Serve this workspace's template in the local editor | `concrete dev [--port <n>] [--no-auto-update]` |
|
|
20
20
|
| [`check`](check.md) | Grade the template against every requirement the platform accepts it on | `concrete check [--json] [--no-auto-update]` |
|
|
21
|
-
| [`build`](build.md) |
|
|
21
|
+
| [`build`](build.md) | Write the template's built files, building only what changed | `concrete build [--out <dir>] [--no-auto-update]` |
|
|
22
22
|
| [`upgrade`](upgrade.md) | Move the workspace to a newer @homepages/concrete and run its codemods | `concrete upgrade [--dry-run] [--to <version>]` |
|
|
23
|
+
| [`install`](install.md) | Install the tools the playground runs, at the builds this release pins | `concrete install` |
|
|
23
24
|
| [`property list`](property-list.md) | List the sample properties a workspace can copy in | `concrete property list [--no-auto-update]` |
|
|
24
|
-
| [`property add`](property-add.md) | Copy a sample property
|
|
25
|
-
| [`publish`](publish.md) | Publish the template to HomePages | `concrete publish [--
|
|
25
|
+
| [`property add`](property-add.md) | Copy a sample property beside this workspace's fixture list | `concrete property add <slug> [--no-auto-update]` |
|
|
26
|
+
| [`publish`](publish.md) | Publish the template to HomePages | `concrete publish [--dry-run] [--json] [--env-file <path>] [--no-auto-update]` |
|
|
26
27
|
|
|
27
28
|
## Global options
|
|
28
29
|
|
|
@@ -79,7 +80,7 @@ of its flags.
|
|
|
79
80
|
|
|
80
81
|
## Versions
|
|
81
82
|
|
|
82
|
-
These pages describe `@homepages/concrete` **>=
|
|
83
|
+
These pages describe `@homepages/concrete` **>=13.0.0 <14.0.0**. The range, rather than
|
|
83
84
|
the exact version they were generated from: this reference is committed build output,
|
|
84
85
|
so a page stamped with a patch version would be stale the day it shipped.
|
|
85
86
|
`concrete --version` prints the installed one.
|
|
@@ -3,12 +3,12 @@ purpose: The `concrete build` command — its flags, exit codes and constraints.
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=13.0.0 <14.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete build
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Write the template's built files, building only what changed.
|
|
12
12
|
|
|
13
13
|
## Synopsis
|
|
14
14
|
|
|
@@ -20,21 +20,23 @@ concrete build [--out <dir>] [--no-auto-update]
|
|
|
20
20
|
|
|
21
21
|
| Flag | Type | Default | What it does |
|
|
22
22
|
|---|---|---|---|
|
|
23
|
-
| `--out <dir>` | string | `.concrete/build` | Directory to write the
|
|
23
|
+
| `--out <dir>` | string | `.concrete/build` | Directory to write the built files into, relative to the workspace root |
|
|
24
24
|
| `--no-auto-update` | boolean | `false` | Skip the package refresh this command runs first when the workspace is behind the published release |
|
|
25
25
|
|
|
26
26
|
## Exit codes
|
|
27
27
|
|
|
28
28
|
| Code | When |
|
|
29
29
|
|---|---|
|
|
30
|
-
| `0` | the
|
|
31
|
-
| `1` |
|
|
30
|
+
| `0` | the built files were written |
|
|
31
|
+
| `1` | a step could not build — a module that does not load, a section that does not bundle, a stylesheet that does not compile — or the files cannot be written |
|
|
32
32
|
|
|
33
33
|
## Constraints
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
35
|
+
- Builds and grades nothing: `check` grades what it writes, and `publish` builds, checks and publishes. It writes no artifact.
|
|
36
|
+
- Writes the template's manifest, each section's schema, fill spec, logic, renderer and island chunks, the template's composition and stylesheet, and the assets and shared bundles they name. Beside the directory, never in it, it writes the build's record, `<dir>.json` (`.concrete/build.json` by default): every file's hash, the template's and each section's content hash, and which sections this run built.
|
|
37
|
+
- Incremental: a section is built again only when a file its bundles were made from changed since the last build in the same directory. The workspace, the schemas and the stylesheet are read on every run.
|
|
38
|
+
- Deterministic: the same tree builds to the same content hashes.
|
|
39
|
+
- A failure writes nothing, so the previous build stays whole.
|
|
38
40
|
- The default output directory, `.concrete/build/`, is gitignored by the scaffold.
|
|
39
41
|
|
|
40
42
|
## Before it runs
|
|
@@ -3,7 +3,7 @@ purpose: The `concrete check` command — its flags, exit codes and constraints.
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=13.0.0 <14.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete check
|
|
@@ -35,8 +35,10 @@ concrete check [--json] [--no-auto-update]
|
|
|
35
35
|
- Under `--json` the report is the only thing written to stdout; every notice goes to stderr.
|
|
36
36
|
- Grades with the toolchain this package ships — TypeScript, ESLint, esbuild — never with a version the workspace declares.
|
|
37
37
|
- Every threshold is a platform acceptance criterion, not a preference. No flag or config file raises one.
|
|
38
|
+
- Runs `build` first and grades the files it wrote; a step that could not build is a finding of the stage it belongs to.
|
|
38
39
|
- Every run reports what each placed section's built bundles weigh: the renderer, each island chunk and each asset, in the human output and as `weights` under `--json`.
|
|
39
|
-
- `
|
|
40
|
+
- `publish` runs this on every publish and refuses on red: an artifact exists only because check passed.
|
|
41
|
+
- `template.ts` is the only file it finds by name. Pages, sections, the stylesheet and the icon are reached from it by import, and the fixtures by the fixture list it names (`fixtures: "./fixtures/index.json"`): a JSON list of the property documents and the content fixtures, each content fixture a JSON document naming its property document, every path relative to the file that states it.
|
|
40
42
|
|
|
41
43
|
## Before it runs
|
|
42
44
|
|
|
@@ -3,7 +3,7 @@ purpose: The `concrete dev` command — its flags, exit codes and constraints.
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=13.0.0 <14.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete dev
|
|
@@ -20,7 +20,7 @@ concrete dev [--port <n>] [--no-auto-update]
|
|
|
20
20
|
|
|
21
21
|
| Flag | Type | Default | What it does |
|
|
22
22
|
|---|---|---|---|
|
|
23
|
-
| `--port <n>` | string | `5180` | Port to serve on. A non-integer or non-positive value falls back to the default
|
|
23
|
+
| `--port <n>` | string | `5180` | Port to serve on. A non-integer or non-positive value falls back to the default |
|
|
24
24
|
| `--no-auto-update` | boolean | `false` | Skip the package refresh this command runs first when the workspace is behind the published release |
|
|
25
25
|
|
|
26
26
|
## Exit codes
|
|
@@ -34,6 +34,10 @@ concrete dev [--port <n>] [--no-auto-update]
|
|
|
34
34
|
|
|
35
35
|
- Runs until interrupted — it is a server, not a one-shot command.
|
|
36
36
|
- Serves this one workspace: its template over its fixtures, in the platform's own editor.
|
|
37
|
+
- Builds the template as `concrete build` does, into `.concrete/dev`, and again on every change to a source file, building only the sections the change reaches; every open editor then shows the new build. An image whose responsive ladder is not derived yet serves as its own file meanwhile, and the sections that import it build again once it lands.
|
|
38
|
+
- The fixtures are the content fixtures the fixture list in `template.ts` names, each on a property document; an edit to one of those files reloads every open editor.
|
|
39
|
+
- An edit made in the editor saves into the fixture's documents after a short pause, as stable JSON: a content edit into the content fixture, a fact edit into the property document every fixture on that property reads. An upload into a media list, a pasted link and a library removal save into the property document, an uploaded file into the property's own folder.
|
|
40
|
+
- `api/catalog` is the list of every address it answers: under each content fixture, each view (the canvas per canvas and format, and a website's live view per page) and each output (a website's site per page, or an image's or a document's download per format with its page images), every address relative to the server's root. A page the fixture switches off is in none of them.
|
|
37
41
|
|
|
38
42
|
## Before it runs
|
|
39
43
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
purpose: The `concrete install` command — its flags, exit codes and constraints.
|
|
3
|
+
mode: reference
|
|
4
|
+
status: generated
|
|
5
|
+
generated_from: the concrete command table
|
|
6
|
+
applies_to: "@homepages/concrete >=13.0.0 <14.0.0"
|
|
7
|
+
related: [reference/cli/INDEX.md]
|
|
8
|
+
---
|
|
9
|
+
# concrete install
|
|
10
|
+
|
|
11
|
+
Install the tools the playground runs, at the builds this release pins.
|
|
12
|
+
|
|
13
|
+
## Synopsis
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
concrete install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Flags
|
|
20
|
+
|
|
21
|
+
This command takes no flags.
|
|
22
|
+
|
|
23
|
+
## Exit codes
|
|
24
|
+
|
|
25
|
+
| Code | When |
|
|
26
|
+
|---|---|
|
|
27
|
+
| `0` | every tool is installed, whether this run downloaded it or it was already there |
|
|
28
|
+
| `1` | a tool could not be installed |
|
|
29
|
+
|
|
30
|
+
## Constraints
|
|
31
|
+
|
|
32
|
+
- Installs the Chromium build the platform renders with, through Playwright's own installer, into Playwright's per-user cache: every workspace on the machine shares it.
|
|
33
|
+
- A tool already installed downloads nothing, so running it again costs nothing.
|
|
34
|
+
- `npm create @homepages/concrete` runs it after its install, and `upgrade` after it moves the package's version; a failed download there is a notice, never a failed command.
|
|
35
|
+
- `dev` starts the install of a missing tool in the background and says so in one line; a capture asked for meanwhile waits for it.
|
|
36
|
+
- On Linux, a browser that installs but cannot start names the system libraries it lacks in Playwright's own words.
|
|
37
|
+
- Never refreshes the package first: it installs what the version already installed pins.
|
|
38
|
+
|
|
39
|
+
## See also
|
|
40
|
+
|
|
41
|
+
- [Every command](INDEX.md) — the rest of the command's surface.
|
|
@@ -3,12 +3,12 @@ purpose: The `concrete property add` command — its flags, exit codes and const
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=13.0.0 <14.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete property add
|
|
10
10
|
|
|
11
|
-
Copy a sample property
|
|
11
|
+
Copy a sample property beside this workspace's fixture list.
|
|
12
12
|
|
|
13
13
|
## Synopsis
|
|
14
14
|
|
|
@@ -37,8 +37,9 @@ concrete property add <slug> [--no-auto-update]
|
|
|
37
37
|
|
|
38
38
|
## Constraints
|
|
39
39
|
|
|
40
|
-
- Copies the whole folder — property.
|
|
41
|
-
-
|
|
40
|
+
- Copies the whole folder — property.json, media/, README.md, sources.json — to `properties/<slug>/` beside the fixture list `template.ts` names: `fixtures/properties/<slug>/` for `./fixtures/index.json`. From then on it is the workspace's to edit.
|
|
41
|
+
- Prints the content fixture to make on it; listing that fixture in the fixture list is yours to do.
|
|
42
|
+
- Never overwrites: an existing `properties/<slug>/` there is refused and named, and nothing is copied.
|
|
42
43
|
- The workspace never depends on the library: nothing is added to package.json, so no later release of it can change a copied property.
|
|
43
44
|
- Reads the library the way `property list` does, through the same per-user cache.
|
|
44
45
|
|
|
@@ -3,7 +3,7 @@ purpose: The `concrete property list` command — its flags, exit codes and cons
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=13.0.0 <14.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete property list
|
|
@@ -32,7 +32,7 @@ concrete property list [--no-auto-update]
|
|
|
32
32
|
## Constraints
|
|
33
33
|
|
|
34
34
|
- Prints one line per property on stdout: its slug, its description, then its listing intent and non-zero counts.
|
|
35
|
-
- Reads the
|
|
35
|
+
- Reads the @homepages/sample-properties version its `documents` dist-tag names, from the registry the workspace installs from, and caches each version per user under `XDG_CACHE_HOME`, else `~/.cache`.
|
|
36
36
|
- When the registry cannot be read, lists the newest cached version and says so on stderr.
|
|
37
37
|
|
|
38
38
|
## Before it runs
|
|
@@ -3,7 +3,7 @@ purpose: The `concrete publish` command — its flags, exit codes and constraint
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=13.0.0 <14.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete publish
|
|
@@ -13,14 +13,13 @@ Publish the template to HomePages.
|
|
|
13
13
|
## Synopsis
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
concrete publish [--
|
|
16
|
+
concrete publish [--dry-run] [--json] [--env-file <path>] [--no-auto-update]
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Flags
|
|
20
20
|
|
|
21
21
|
| Flag | Type | Default | What it does |
|
|
22
22
|
|---|---|---|---|
|
|
23
|
-
| `--rebuild` | boolean | `false` | Build the artifact again even when the tree still matches the one on disk |
|
|
24
23
|
| `--dry-run` | boolean | `false` | Upload and verify the artifact, report what publishing would change, and write nothing |
|
|
25
24
|
| `--json` | boolean | `false` | Print the settled publication record on stdout instead of the summary |
|
|
26
25
|
| `--env-file <path>` | string | — | Read `CONCRETE_TOKEN` and `CONCRETE_API_URL` from this dotenv file instead of the workspace's `.env` |
|
|
@@ -31,7 +30,7 @@ concrete publish [--rebuild] [--dry-run] [--json] [--env-file <path>] [--no-auto
|
|
|
31
30
|
| Code | When |
|
|
32
31
|
|---|---|
|
|
33
32
|
| `0` | the template was published, the environment already held it as current, or a dry run passed verification |
|
|
34
|
-
| `1` | `check` is not green, or the platform refuses the publication, fails its verification or cannot finish it |
|
|
33
|
+
| `1` | `check` is not green, a capture failed, or the platform refuses the publication, fails its verification or cannot finish it |
|
|
35
34
|
| `2` | no publisher key is set, the key is malformed or not accepted, the endpoint cannot be reached, or it runs outside a workspace |
|
|
36
35
|
|
|
37
36
|
## Constraints
|
|
@@ -39,7 +38,8 @@ concrete publish [--rebuild] [--dry-run] [--json] [--env-file <path>] [--no-auto
|
|
|
39
38
|
- The key is the environment: `CONCRETE_TOKEN` names production, staging or dev in its prefix (`cpt_prod_…`), and publish goes where it points. There is no environment flag.
|
|
40
39
|
- Reads `CONCRETE_TOKEN` from the environment, then from the workspace's `.env`. `CONCRETE_API_URL` replaces the endpoint the key's prefix names.
|
|
41
40
|
- `--env-file <path>` names the key file instead, relative to the current directory: its values win over the environment and the workspace's `.env` is not read. It is how a library holding one key file per environment picks one, in any shell.
|
|
42
|
-
- Builds
|
|
41
|
+
- Builds and checks on every run, then assembles the artifact — the built files, the authored fixtures, the playground and, for an image or document template, the captures — and uploads it. An artifact is never reused.
|
|
42
|
+
- An image or document template's captures are every authored fixture at every declared format, taken exactly as `dev`'s *Download* takes it — the enabled pages and their zip, or the PDF. They sit outside the artifact hash, and are taken with the Chromium build the platform renders with: on a machine without it, publish refuses with the one command that installs it.
|
|
43
43
|
- Prints one line per stage on stderr as it settles: target, build, upload, verify, write, adopt.
|
|
44
44
|
- Publishing a tree the environment already holds as current changes nothing, says so, and exits 0. Rolling back is publishing the older tree.
|
|
45
45
|
- Under `--json` the publication record is the only thing written to stdout; every stage line goes to stderr.
|
|
@@ -3,7 +3,7 @@ purpose: The `concrete upgrade` command — its flags, exit codes and constraint
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete command table
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=13.0.0 <14.0.0"
|
|
7
7
|
related: [reference/cli/INDEX.md]
|
|
8
8
|
---
|
|
9
9
|
# concrete upgrade
|
|
@@ -3,7 +3,7 @@ purpose: Every rule `concrete check` grades, by the stage that grades it, in the
|
|
|
3
3
|
mode: reference
|
|
4
4
|
status: generated
|
|
5
5
|
generated_from: the concrete rule registry
|
|
6
|
-
applies_to: "@homepages/concrete >=
|
|
6
|
+
applies_to: "@homepages/concrete >=13.0.0 <14.0.0"
|
|
7
7
|
related: [reference/cli/check.md]
|
|
8
8
|
---
|
|
9
9
|
# Rule reference
|
|
@@ -33,6 +33,7 @@ The workspace loads: `template.ts` default-exports a `defineTemplate` value and
|
|
|
33
33
|
| `concrete/workspace/duplicate-section-key` | tree | Two different exported sections declare the same key. |
|
|
34
34
|
| `concrete/workspace/crlf-text` | tree | A text file in the workspace has CRLF line endings, so the same commit would build a different version than an LF checkout. |
|
|
35
35
|
| `concrete/workspace/unportable-name` | tree | A source file name, the template key, a section key or a fixture id would not name the same file on Windows and macOS: two differ only by case or Unicode form, or one is a reserved device name (`con`, `nul`, `com1`…), ends in a dot or a space, or carries a character Windows refuses in a file name (`:`, `\`, `?`, `*`, a control character…). A key or id must also be NFC. |
|
|
36
|
+
| `concrete/workspace/duplicate-browser-file` | tree | Two of the build's browser files (a stylesheet, a script, an imported image or font) would have one filename. A host answers them by filename alone, and a published site keeps them in one folder. |
|
|
36
37
|
|
|
37
38
|
## typecheck
|
|
38
39
|
|
|
@@ -111,17 +112,20 @@ Every placed section's logic bundle builds exactly as `build` builds it.
|
|
|
111
112
|
|
|
112
113
|
## fixtures
|
|
113
114
|
|
|
114
|
-
The fixtures
|
|
115
|
+
The fixtures the fixture list names load, resolve over the composition, and stay out of the bundle.
|
|
115
116
|
|
|
116
117
|
| Rule | Venue | What it requires |
|
|
117
118
|
|---|---|---|
|
|
118
|
-
| `concrete/fixtures/none` | tree | The workspace
|
|
119
|
+
| `concrete/fixtures/none` | tree | The workspace has no fixture: template.ts names no fixture list, or the list names no content fixture; marker coverage has no input. |
|
|
119
120
|
| `concrete/fixtures/property-invalid` | tree | A property fails the platform schema, references a missing file, or repeats an id within a list. |
|
|
120
121
|
| `concrete/fixtures/media-not-in-property` | tree | A content entry references a media entry its property does not carry. |
|
|
121
122
|
| `concrete/fixtures/rows-not-in-property` | tree | A content entry states more rows for a directly linked list than its property carries. |
|
|
122
123
|
| `concrete/fixtures/value-invalid` | tree | A content entry states a malformed date, email or phone value. |
|
|
124
|
+
| `concrete/fixtures/held-row-not-in-property` | tree | A content entry holds a row its property does not carry; the slot loads empty, as a deleted row does. |
|
|
125
|
+
| `concrete/fixtures/document-invalid` | tree | A fixture document does not parse, or does not match the template: an unknown key, slot or field, a value of the wrong kind, a sourced slot stated without its override mark, or one instance stated twice. |
|
|
126
|
+
| `concrete/fixtures/reference-invalid` | tree | A fixture document names a file outside its own folder, or one that does not exist. |
|
|
123
127
|
| `concrete/fixtures/instance-not-placed` | tree | A content entry names an instance the composition does not place. |
|
|
124
|
-
| `concrete/fixtures/reachable-from-bundle` | tree | A module reachable from template.ts imports
|
|
128
|
+
| `concrete/fixtures/reachable-from-bundle` | tree | A module reachable from template.ts imports a file the fixture list reaches, or the sample library. |
|
|
125
129
|
|
|
126
130
|
## sections
|
|
127
131
|
|