Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
1dd9d91
Migrate to block-tools structurer (automated refresh)
vadimpiven Jun 19, 2026
109706b
Fix author-code for SDK upgrade and bump graph-maker to 1.4.6
vadimpiven Jun 19, 2026
774be19
Migrate model and UI to BlockModelV3
vadimpiven Jun 19, 2026
374a0a9
Add changeset for structurer + V3 migration
vadimpiven Jun 19, 2026
b1d8956
Fix block test timeout and simplify GraphPage settings write
vadimpiven Jun 19, 2026
8eb667e
CI: restore test:false in build.yaml (no backend test lane)
vadimpiven Jun 19, 2026
49931b2
CI: re-enable test lane (test: true) with retry to absorb backend col…
vadimpiven Jun 19, 2026
bf84d68
Merge remote-tracking branch 'origin/main' into chore/migrate-to-stru…
erohinaelena Sep 14, 2026
5fc6951
Migrate to structure v2 (automated structurer refresh)
erohinaelena Sep 14, 2026
2415fa2
Declare the block kind and wire it into the V3 model
erohinaelena Sep 14, 2026
eff9f15
Update the changeset for the structure-v2 and kind migration
erohinaelena Sep 14, 2026
15d3e94
Carry the data mapping in the kind's init-params
erohinaelena Sep 14, 2026
fd32edc
Carry source ids taken apart, so template refs relocate
erohinaelena Sep 14, 2026
7197bda
Note the data-mapping contract in the changeset
erohinaelena Sep 14, 2026
9f69f7d
Take the published SDK and drop the local override
erohinaelena Sep 15, 2026
6eaa6a8
Carry the reader's chart settings in the template
erohinaelena Sep 15, 2026
379fb61
Key colour mappings by a source that can be repointed
erohinaelena Sep 15, 2026
d77a23a
review fixes
erohinaelena Sep 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .changeset/migrate-to-structurer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
"@platforma-open/milaboratories.graph-maker": minor
"@platforma-open/milaboratories.graph-maker.model": minor
"@platforma-open/milaboratories.graph-maker.ui": minor
"@platforma-open/milaboratories.graph-maker.workflow": patch
---

Migrate to the block-tools structurer and to BlockModelV3.

- Adopt the tool-managed layout (oxlint/oxfmt, managed tsconfig/turbo/catalog) and
complete the SDK upgrade (model/ui-vue 1.83, workflow-tengo 6, tengo-builder 4,
block-tools 2.15).
- Upgrade @milaboratories/graph-maker to 1.8.0.
- Migrate the model from the legacy V1 API to BlockModelV3. The multi-graph page
list is unified UI-only state carried over by a one-time legacy upgrader; args
project to an empty object. The graph-maker plugin is intentionally not adopted
(the multi-graph plugin is not yet available).
- UI bindings move from app.model.ui to app.model.data; the app uses defineAppV3.
- Adopt structure v2: the block package becomes a slim facade (block/src/index.ts,
from-pack-v2 pointer) and the block declares its mandatory kind.
- Declare the block kind's init-params contract: a project template seeds graph
pages by id, label, chart type, layer template and data mapping. Source ids
travel taken apart rather than as canonical strings, so the SDK can repoint the
references inside column ids at the new project's blocks; init rebuilds them
canonically. The rest of GraphMakerState is per-view bookkeeping and does not
travel, and neither does per-view bookkeeping — the open tab, the zoom, the lasso,
or `usedDefaultOptions`, which would stop the new project's defaults being applied.
The reader's chart settings (axes, layers, statistics) travel whole rather
than as a difference from the chart type's defaults: those defaults come from a
graph-maker module a block model cannot bundle, so a seeded page keeps the defaults
of the day it was exported. Colour mappings travel as a list keyed by the source
taken apart, not by the id string graph-maker keys them with, so the column or axis
each colour was chosen for is repointed at the new project rather than naming a block
that is not there.
35 changes: 26 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
workflow_dispatch: {}
jobs:
init:
runs-on: ubuntu-latest
runs-on: hz-ubuntu-dind
steps:
- uses: milaboratory/github-ci/actions/context/init@v4
with:
Expand All @@ -22,12 +22,15 @@ jobs:
- init
uses: milaboratory/github-ci/.github/workflows/node-simple-pnpm.yaml@v4
with:
app-name: 'Block: Graph Builder'
app-name-slug: 'block-graph-builder'
node-version: '20.x'
build-script-name: 'build'
app-name: 'Block: Graph Maker'
app-name-slug: 'block-graph-maker'
node-version: '22.x'
gha-runner-label: hz-ubuntu-dind
build-script-name: 'build:dev-local'
build-before-publish-script-name: 'build:release'
pnpm-recursive-build: false
test: false

test: true
test-script-name: 'test'
pnpm-recursive-tests: false
team-id: 'ciplopen'
Expand All @@ -36,6 +39,11 @@ jobs:
package-path: 'block'
create-tag: 'true'

# Require the published `block` package to be bumped by a changeset on
# PRs (empty changeset or the `skip-changelog` label waives it). Needs
# the input to exist on the pinned `@v4` reusable workflow.
require-package-path-bump: true

npmrc-config: |
{
"registries": {
Expand All @@ -54,13 +62,22 @@ jobs:
"PL_CI_TEST_PASSWORD": ${{ toJSON(secrets.PL_CI_TEST_PASSWORD) }},

"AWS_CI_IAM_MONOREPO_SIMPLE_ROLE": ${{ toJSON(secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE) }},
"AWS_CI_TURBOREPO_S3_BUCKET": ${{ toJSON(secrets.AWS_CI_TURBOREPO_US_S3_BUCKET) }},

"AWS_CI_TURBOREPO_S3_BUCKET": ${{ toJSON(secrets.AWS_CI_TURBOREPO_S3_BUCKET) }},

"HZ_CI_TURBO_S3_BUCKET": ${{ toJSON(vars.HZ_CI_TURBO_S3_BUCKET) }},
"HZ_CI_TURBO_S3_ENDPOINT": ${{ toJSON(vars.HZ_CI_TURBO_S3_ENDPOINT) }},
"HZ_CI_TURBO_S3_REGION": ${{ toJSON(vars.HZ_CI_TURBO_S3_REGION) }},
"HZ_CI_TURBO_S3_ACCESS_KEY": ${{ toJSON(secrets.HZ_CI_TURBO_S3_ACCESS_KEY) }},
"HZ_CI_TURBO_S3_SECRET_KEY": ${{ toJSON(secrets.HZ_CI_TURBO_S3_SECRET_KEY) }},
"HZ_CI_CACHE_S3_ACCESS_KEY": ${{ toJSON(secrets.HZ_CI_CACHE_S3_ACCESS_KEY) }},
"HZ_CI_CACHE_S3_SECRET_KEY": ${{ toJSON(secrets.HZ_CI_CACHE_S3_SECRET_KEY) }},

"PL_REGISTRY_PLATFORMA_OPEN_UPLOAD_URL": ${{ toJSON(secrets.PL_REGISTRY_PLOPEN_UPLOAD_URL) }},
"QUAY_USERNAME": ${{ toJSON(secrets.QUAY_USERNAME) }},
"QUAY_ROBOT_TOKEN": ${{ toJSON(secrets.QUAY_ROBOT_TOKEN) }} }

SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_BLOCKS_CI_CHANNEL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

GH_ZEN_APP_ID: ${{ secrets.GH_ZEN_APP_ID }}
GH_ZEN_APP_PRIVATE_KEY: ${{ secrets.GH_ZEN_APP_PRIVATE_KEY }}
6 changes: 3 additions & 3 deletions .github/workflows/mark-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
- init
uses: milaboratory/github-ci/.github/workflows/block-mark-stable.yaml@v4
with:
app-name: 'Block: Graph Builder - Mark Stable'
node-version: '20.x'
app-name: 'Block: Graph Maker - Mark Stable'
node-version: '22.x'
npmrc-config: |
{
"registries": {
Expand All @@ -30,5 +30,5 @@ jobs:
{ "NPMJS_TOKEN": ${{ toJSON(secrets.NPMJS_TOKEN) }},
"AWS_CI_IAM_MONOREPO_SIMPLE_ROLE": ${{ toJSON(secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE) }} }

SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_BLOCKS_CI_CHANNEL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,13 @@ node_modules/
block-pack
log/
.turbo
.test_auth.json
dist/
block-pack/
dev/
work/
vite.config.*.timestamp-*
software/**/*.tgz
.DS_Store
.vscode/sftp.json
test-dry-run.json
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

1 change: 1 addition & 0 deletions .structure
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":2}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
9 changes: 0 additions & 9 deletions block/index.d.ts

This file was deleted.

15 changes: 0 additions & 15 deletions block/index.js

This file was deleted.

41 changes: 29 additions & 12 deletions block/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,41 @@
{
"name": "@platforma-open/milaboratories.graph-maker",
"version": "1.4.99",
"files": [
"dist",
"block-pack"
],
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"sources": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"scripts": {
"pretty": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json,vue}\"",
"build": "rm -rf ./block-pack && block-tools pack",
"build": "ts-builder build --target block-facade && block-tools pack",
"mark-stable": "block-tools mark-stable -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'",
"prepublishOnly": "block-tools publish -r s3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1 --registry-serve-url https://blocks.pl-open.science"
"prepublishOnly": "block-tools publish -r s3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1 --registry-serve-url https://blocks.pl-open.science",
"do-pack": "shx rm -f package.tgz && pnpm pack && shx mv *.tgz package.tgz",
"check": "ts-builder type-check --target block-facade"
},
"files": [
"index.d.ts",
"index.js"
],
"dependencies": {
"@platforma-sdk/model": "catalog:",
"dependencies": {},
"devDependencies": {
"@milaboratories/ts-builder": "catalog:",
"@milaboratories/ts-configs": "catalog:",
"@platforma-open/milaboratories.graph-maker.kind": "workspace:*",
"@platforma-open/milaboratories.graph-maker.model": "workspace:*",
"@platforma-open/milaboratories.graph-maker.ui": "workspace:*",
"@platforma-open/milaboratories.graph-maker.workflow": "workspace:*"
"@platforma-open/milaboratories.graph-maker.workflow": "workspace:*",
"@platforma-sdk/block-tools": "catalog:",
"@platforma-sdk/model": "catalog:",
"shx": "catalog:",
"typescript": "catalog:"
},
"block": {
"components": {
Expand Down Expand Up @@ -43,8 +63,5 @@
},
"marketplaceRanking": 15000
}
},
"devDependencies": {
"@platforma-sdk/block-tools": "catalog:"
}
}
5 changes: 5 additions & 0 deletions block/src/AGENTS.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This file is managed by `block-tools structure`. Do not edit by hand.
// Narrow MCP / AI surface.

export type { BlockContract, BlockOutputs, BlockData } from "./index";
export * from "./agents-extra";
8 changes: 8 additions & 0 deletions block/src/agents-extra.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Author-owned. `block-tools structure` does not modify this file.
// MCP / AI extension surface. Add types and functions the agent
// surface should expose.
//
// In the future this file will host JS functions the MCP runtime
// can execute. The `.d.ts` declarations stay visible to the agent;
// the JS bodies execute in the MCP code-execution context (the
// agent sees the types but not the implementation).
9 changes: 9 additions & 0 deletions block/src/block-extra.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Author-owned. `block-tools structure` does not modify this file.
// Add block-specific helper types or values the consumer surface
// should expose. Anything you `export` here flows out via the
// main entry (./index re-exports this file).
//
// Do NOT redefine: BlockContract, BlockOutputs, BlockData,
// BlockPointer, platforma, or the block-named <PascalName>Block*
// aliases — those names come from ./index and `export *` from this
// file would shadow them.
55 changes: 55 additions & 0 deletions block/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// This file is managed by `block-tools structure`. Do not edit by hand.
// Author content lives in ./block-extra.ts.

import { platforma } from "@platforma-open/milaboratories.graph-maker.model";
import {
InferOutputsType,
InferDataType,
InferHrefType,
} from "@platforma-sdk/model";

export { platforma };

export type BlockContract = {
outputs: InferOutputsType<typeof platforma>;
data: InferDataType<typeof platforma>;
href: InferHrefType<typeof platforma>;
};

export type BlockOutputs = BlockContract["outputs"];
export type BlockData = BlockContract["data"];

// import.meta.url is a file: URL (always forward-slash, even on Windows:
// file:///C:/…). We expose URLs, NOT paths — the facade stays dependency-free
// and loadable in minimal engines (e.g. QuickJS), and each consumer converts
// at its own edge with the right tool (fileURLToPath in Node), where Windows
// drive letters / %-encoding / UNC are handled correctly. The bundled entry
// sits one dir under the package root (dist/index.js, or src/index.ts in dev),
// so the root is two URL segments up. The structurer owns this layout —
// consumers read these URLs, they never reconstruct <root>/block-pack.
//
// TypeScript ships `ImportMeta.url` only in the `dom`/`webworker` libs; the
// facade tsconfig is lib-minimal (no `dom`, no `@types/node`) by design. We
// type the one ESM-standard member we use with a local cast rather than a
// `declare global` — a global augmentation would leak into the published
// `dist/index.d.ts` and clash with `@types/node`'s `ImportMeta` in full-Node
// consumers (test packages, the Middle Layer).
const selfUrl = (import.meta as ImportMeta & { url: string }).url;
const dirUrl = selfUrl.slice(0, selfUrl.lastIndexOf("/"));
const rootUrl = dirUrl.slice(0, dirUrl.lastIndexOf("/"));

export const BlockPointer = {
type: "from-pack-v2" as const,
packUrl: rootUrl + "/block-pack",
rootUrl,
} as const;

// Block-named aliases for readable cross-block imports in tests and
// consumer code. Same types / same runtime value as the universal
// names above; the aliases avoid `as`-renames at the import site.
export type GraphMakerBlockContract = BlockContract;
export type GraphMakerBlockOutputs = BlockOutputs;
export type GraphMakerBlockData = BlockData;
export const GraphMakerBlockPointer = BlockPointer;

export * from "./block-extra";
4 changes: 4 additions & 0 deletions block/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "@milaboratories/ts-configs/block/facade",
"include": ["src/**/*"]
}
4 changes: 4 additions & 0 deletions kind/.oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": ["node_modules/@milaboratories/ts-builder/configs/oxfmt.json"],
"ignorePatterns": ["dist", "coverage", "CHANGELOG.md"]
}
3 changes: 3 additions & 0 deletions kind/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["node_modules/@milaboratories/ts-builder/dist/configs/oxlint-node.json"]
}
37 changes: 37 additions & 0 deletions kind/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "@platforma-open/milaboratories.graph-maker.kind",
"version": "1.0.0",
"private": true,
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"sources": "./src/index.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"default": "./dist/index.js"
}
},
"scripts": {
"fmt": "ts-builder format",
"watch": "ts-builder build --target block-kind --watch",
"build": "ts-builder build --target block-kind && block-tools build-kind-manifest",
"check": "ts-builder check --target block-kind"
},
"dependencies": {
"@milaboratories/graph-maker": "catalog:",
"@platforma-sdk/block-kind": "catalog:"
},
"devDependencies": {
"@milaboratories/ts-builder": "catalog:",
"@milaboratories/ts-configs": "catalog:",
"@platforma-sdk/block-tools": "catalog:"
},
"peerDependencies": {
"@types/node": "*",
"typescript": "*"
}
}
Loading
Loading