Skip to content

Commit f5bfd0e

Browse files
committed
Migrate block onto the structurer
1 parent c11f560 commit f5bfd0e

31 files changed

Lines changed: 815 additions & 567 deletions
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@platforma-open/milaboratories.3d-structure-based-liabilities.model': patch
3+
'@platforma-open/milaboratories.3d-structure-based-liabilities.ui': patch
4+
'@platforma-open/milaboratories.3d-structure-based-liabilities.workflow': patch
5+
'@platforma-open/milaboratories.3d-structure-based-liabilities.software': patch
6+
'@platforma-open/milaboratories.3d-structure-based-liabilities': patch
7+
---
8+
9+
Migrate block onto the structurer (block-tools `structure refresh`) and upgrade the SDK toolchain. Tool-managed layout now owns tsconfig, oxlint/oxfmt, turbo, the block index, and per-package deps. Catalog bumped to block-tools 2.11.0, workflow-tengo 6.6.3, model/ui-vue/test 1.79.14, tengo-builder 4.0.8.

.github/workflows/build.yaml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,55 +11,45 @@ on:
1111
workflow_dispatch: {}
1212
jobs:
1313
init:
14-
if: github.repository != 'milaboratory/platforma-hello-world'
1514
runs-on: ubuntu-latest
1615
steps:
1716
- uses: milaboratory/github-ci/actions/context/init@v4
1817
with:
1918
version-canonize: false
2019
branch-versioning: main
2120
run:
22-
if: github.repository != 'milaboratory/platforma-hello-world'
2321
needs:
2422
- init
25-
2623
uses: milaboratory/github-ci/.github/workflows/node-simple-pnpm.yaml@v4
2724
with:
28-
app-name: 'Block: 3D Structure-Based Liabilities'
25+
app-name: 'Block: 3d Structure-Based Liabilities'
2926
app-name-slug: 'block-3d-structure-based-liabilities'
30-
3127
node-version: '20.x'
3228
build-script-name: 'build'
3329
pnpm-recursive-build: false
3430

35-
test: false
31+
test: true
3632
test-script-name: 'test'
3733
pnpm-recursive-tests: false
3834
team-id: 'ciplopen'
3935

36+
publish-to-public: 'true'
4037
package-path: 'block'
41-
publish-to-public: true
42-
create-tag: true
38+
create-tag: 'true'
4339

4440
npmrc-config: |
4541
{
4642
"registries": {
4743
"https://registry.npmjs.org/": {
48-
"scopes": ["milaboratories", "platforma-open", "platforma-sdk"],
44+
"scopes": ["milaboratories", "platforma-sdk", "platforma-open"],
4945
"tokenVar": "NPMJS_TOKEN"
50-
},
51-
"https://npm.pkg.github.com/": {
52-
"scopes": ["milaboratory"],
53-
"tokenVar": "NODE_AUTH_TOKEN"
5446
}
5547
}
5648
}
57-
5849
secrets:
5950
env: |
6051
{ "PL_LICENSE": ${{ toJSON(secrets.MI_LICENSE) }},
6152
"MI_LICENSE": ${{ toJSON(secrets.MI_LICENSE) }},
62-
6353
"NPMJS_TOKEN": ${{ toJSON(secrets.NPMJS_TOKEN) }},
6454
"PL_CI_TEST_USER": ${{ toJSON(secrets.PL_CI_TEST_USER) }},
6555
"PL_CI_TEST_PASSWORD": ${{ toJSON(secrets.PL_CI_TEST_PASSWORD) }},
@@ -70,8 +60,8 @@ jobs:
7060
"QUAY_USERNAME": ${{ toJSON(secrets.QUAY_USERNAME) }},
7161
"QUAY_ROBOT_TOKEN": ${{ toJSON(secrets.QUAY_ROBOT_TOKEN) }} }
7262
73-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
7463
SLACK_CHANNEL: ${{ secrets.SLACK_BLOCKS_CI_CHANNEL }}
64+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
7565

7666
GH_ZEN_APP_ID: ${{ secrets.GH_ZEN_APP_ID }}
7767
GH_ZEN_APP_PRIVATE_KEY: ${{ secrets.GH_ZEN_APP_PRIVATE_KEY }}

.github/workflows/mark-stable.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@ on:
33
workflow_dispatch: {}
44
jobs:
55
init:
6-
if: github.repository != 'milaboratory/platforma-hello-world'
76
runs-on: ubuntu-latest
87
steps:
98
- uses: milaboratory/github-ci/actions/context/init@v4
109
with:
1110
version-canonize: false
1211
branch-versioning: main
1312
run:
14-
if: github.repository != 'milaboratory/platforma-hello-world'
1513
needs:
1614
- init
1715
uses: milaboratory/github-ci/.github/workflows/block-mark-stable.yaml@v4
1816
with:
19-
app-name: 'Block: 3D Structure-Based Liabilities - Mark Stable'
17+
app-name: 'Block: 3d Structure Based Liabilities - Mark Stable'
2018
node-version: '20.x'
2119
npmrc-config: |
2220
{
@@ -32,5 +30,5 @@ jobs:
3230
{ "NPMJS_TOKEN": ${{ toJSON(secrets.NPMJS_TOKEN) }},
3331
"AWS_CI_IAM_MONOREPO_SIMPLE_ROLE": ${{ toJSON(secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE) }} }
3432
35-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
3633
SLACK_CHANNEL: ${{ secrets.SLACK_BLOCKS_CI_CHANNEL }}
34+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

.prettierrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.structure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":1}

.vscode/settings.json

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,3 @@
11
{
2-
"vitest.disableWorkspaceWarning": true,
3-
"editor.defaultFormatter": "oxc.oxc-vscode",
4-
"[typescript]": {
5-
"editor.defaultFormatter": "oxc.oxc-vscode",
6-
"editor.tabSize": 2
7-
},
8-
"[vue]": {
9-
"editor.defaultFormatter": "oxc.oxc-vscode",
10-
"editor.tabSize": 2
11-
},
12-
"cSpell.words": [
13-
"datasource",
14-
"pframe",
15-
"prerun"
16-
],
17-
"editor.codeActionsOnSave": {
18-
"source.fixAll.eslint": "always"
19-
},
20-
"eslint.enable": true,
21-
"eslint.format.enable": true,
22-
"[javascript]": {
23-
"editor.defaultFormatter": "oxc.oxc-vscode",
24-
"editor.tabSize": 2
25-
},
26-
"[css]": {
27-
"editor.defaultFormatter": "oxc.oxc-vscode",
28-
"editor.tabSize": 2
29-
},
30-
"[scss]": {
31-
"editor.defaultFormatter": "oxc.oxc-vscode",
32-
"editor.tabSize": 2
33-
},
34-
"[html]": {
35-
"editor.defaultFormatter": "oxc.oxc-vscode",
36-
"editor.tabSize": 2
37-
},
38-
"[yaml]": {
39-
"editor.defaultFormatter": "oxc.oxc-vscode",
40-
"editor.tabSize": 2
41-
},
42-
"[markdown]": {
43-
"editor.defaultFormatter": "oxc.oxc-vscode",
44-
"editor.tabSize": 2
45-
},
46-
"[json]": {
47-
"editor.defaultFormatter": "oxc.oxc-vscode",
48-
"editor.tabSize": 2
49-
},
50-
"typescript.tsdk": "./node_modules/typescript/lib"
2+
"typescript.tsdk": "node_modules/typescript/lib"
513
}

block/index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
declare const blockSpec: {
2+
type: "dev-v2";
3+
folder: string;
4+
};
5+
6+
export { blockSpec };

block/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const blockSpec = {
2+
type: "dev-v2",
3+
folder: __dirname,
4+
};
5+
6+
module.exports = {
7+
blockSpec,
8+
};

block/package.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
{
22
"name": "@platforma-open/milaboratories.3d-structure-based-liabilities",
33
"version": "1.2.6",
4-
"scripts": {
5-
"build": "shx rm -rf ./block-pack && block-tools pack",
6-
"prepublishOnly": "block-tools pack && block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'",
7-
"do-pack": "shx rm -f *.tgz && block-tools pack && pnpm pack && shx mv *.tgz package.tgz"
8-
},
94
"files": [
105
"index.d.ts",
116
"index.js"
127
],
8+
"scripts": {
9+
"build": "shx rm -rf ./block-pack && block-tools pack",
10+
"prepublishOnly": "block-tools pack && block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'",
11+
"do-pack": "shx rm -f *.tgz && block-tools pack && pnpm pack && shx mv *.tgz package.tgz",
12+
"mark-stable": "block-tools mark-stable -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'"
13+
},
1314
"dependencies": {
14-
"@platforma-sdk/model": "catalog:",
15-
"@platforma-open/milaboratories.3d-structure-based-liabilities.workflow": "workspace:*",
1615
"@platforma-open/milaboratories.3d-structure-based-liabilities.model": "workspace:*",
17-
"@platforma-open/milaboratories.3d-structure-based-liabilities.ui": "workspace:*"
16+
"@platforma-open/milaboratories.3d-structure-based-liabilities.ui": "workspace:*",
17+
"@platforma-open/milaboratories.3d-structure-based-liabilities.workflow": "workspace:*",
18+
"@platforma-sdk/model": "catalog:"
19+
},
20+
"devDependencies": {
21+
"@platforma-sdk/block-tools": "catalog:",
22+
"shx": "catalog:"
1823
},
24+
"packageManager": "pnpm@9.12.0",
1925
"block": {
2026
"components": {
2127
"workflow": "@platforma-open/milaboratories.3d-structure-based-liabilities.workflow/dist/tengo/tpl/main.plj.gz",
@@ -49,9 +55,5 @@
4955
"windows-x64"
5056
]
5157
}
52-
},
53-
"devDependencies": {
54-
"@platforma-sdk/block-tools": "catalog:"
55-
},
56-
"packageManager": "pnpm@9.12.0"
58+
}
5759
}

model/.oxfmtrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"ignorePatterns": ["dist", "CHANGELOG.md"]
2+
"extends": ["node_modules/@milaboratories/ts-builder/configs/oxfmt.json"],
3+
"ignorePatterns": ["dist", "coverage", "CHANGELOG.md"]
34
}

0 commit comments

Comments
 (0)