diff --git a/etc/blocks/nonpure-output/.structure b/etc/blocks/nonpure-output/.structure new file mode 100644 index 0000000000..491d734467 --- /dev/null +++ b/etc/blocks/nonpure-output/.structure @@ -0,0 +1 @@ +{"version":1} \ No newline at end of file diff --git a/etc/blocks/nonpure-output/block/CHANGELOG.md b/etc/blocks/nonpure-output/block/CHANGELOG.md new file mode 100644 index 0000000000..825c32f0d0 --- /dev/null +++ b/etc/blocks/nonpure-output/block/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog diff --git a/etc/blocks/nonpure-output/block/package.json b/etc/blocks/nonpure-output/block/package.json new file mode 100644 index 0000000000..65cfd73232 --- /dev/null +++ b/etc/blocks/nonpure-output/block/package.json @@ -0,0 +1,53 @@ +{ + "name": "@milaboratories/milaboratories.test-nonpure-output", + "version": "1.0.127", + "private": true, + "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": { + "build": "ts-builder build --target block-facade && block-tools pack", + "prepublishOnly": "block-tools publish -r s3://milab-euce1-prod-pkgs-s3-block-registry/aux/dev/?region=eu-central-1 --registry-serve-url https://aux-blocks.pl-open.science", + "do-pack": "pnpm pack && shx mv *.tgz package.tgz", + "check": "ts-builder type-check --target block-facade" + }, + "dependencies": {}, + "devDependencies": { + "@milaboratories/milaboratories.test-nonpure-output.model": "workspace:*", + "@milaboratories/milaboratories.test-nonpure-output.ui": "workspace:*", + "@milaboratories/milaboratories.test-nonpure-output.workflow": "workspace:*", + "@milaboratories/ts-builder": "workspace:*", + "@milaboratories/ts-configs": "workspace:*", + "@platforma-sdk/block-tools": "workspace:*", + "@platforma-sdk/model": "workspace:*", + "shx": "catalog:", + "typescript": "catalog:" + }, + "block": { + "components": { + "workflow": "@milaboratories/milaboratories.test-nonpure-output.workflow/dist/tengo/tpl/main.plj.gz", + "model": "@milaboratories/milaboratories.test-nonpure-output.model/dist/model.json", + "ui": "@milaboratories/milaboratories.test-nonpure-output.ui/dist" + }, + "meta": { + "title": "Non-pure Output (CID conflict repro)", + "description": "Test block whose command emits a different value every run, reproducing the recover-mode CID conflict", + "organization": { + "name": "MiLaboratories Inc", + "url": "https://milaboratories.com/" + } + } + } +} diff --git a/etc/blocks/nonpure-output/block/src/AGENTS.ts b/etc/blocks/nonpure-output/block/src/AGENTS.ts new file mode 100644 index 0000000000..5cf2589c3b --- /dev/null +++ b/etc/blocks/nonpure-output/block/src/AGENTS.ts @@ -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"; diff --git a/etc/blocks/nonpure-output/block/src/agents-extra.ts b/etc/blocks/nonpure-output/block/src/agents-extra.ts new file mode 100644 index 0000000000..228811f462 --- /dev/null +++ b/etc/blocks/nonpure-output/block/src/agents-extra.ts @@ -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). diff --git a/etc/blocks/nonpure-output/block/src/block-extra.ts b/etc/blocks/nonpure-output/block/src/block-extra.ts new file mode 100644 index 0000000000..fc00cdd4b3 --- /dev/null +++ b/etc/blocks/nonpure-output/block/src/block-extra.ts @@ -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 Block* +// aliases — those names come from ./index and `export *` from this +// file would shadow them. diff --git a/etc/blocks/nonpure-output/block/src/index.ts b/etc/blocks/nonpure-output/block/src/index.ts new file mode 100644 index 0000000000..a3f8270519 --- /dev/null +++ b/etc/blocks/nonpure-output/block/src/index.ts @@ -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 "@milaboratories/milaboratories.test-nonpure-output.model"; +import { + InferOutputsType, + InferDataType, + InferHrefType, +} from "@platforma-sdk/model"; + +export { platforma }; + +export type BlockContract = { + outputs: InferOutputsType; + data: InferDataType; + href: InferHrefType; +}; + +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 /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 TestNonpureOutputBlockContract = BlockContract; +export type TestNonpureOutputBlockOutputs = BlockOutputs; +export type TestNonpureOutputBlockData = BlockData; +export const TestNonpureOutputBlockPointer = BlockPointer; + +export * from "./block-extra"; diff --git a/etc/blocks/nonpure-output/block/tsconfig.json b/etc/blocks/nonpure-output/block/tsconfig.json new file mode 100644 index 0000000000..8b5ec69745 --- /dev/null +++ b/etc/blocks/nonpure-output/block/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "@milaboratories/ts-configs/block/facade", + "include": ["src/**/*"] +} diff --git a/etc/blocks/nonpure-output/model/.oxfmtrc.json b/etc/blocks/nonpure-output/model/.oxfmtrc.json new file mode 100644 index 0000000000..7eff5e7af0 --- /dev/null +++ b/etc/blocks/nonpure-output/model/.oxfmtrc.json @@ -0,0 +1,4 @@ +{ + "extends": ["node_modules/@milaboratories/ts-builder/configs/oxfmt.json"], + "ignorePatterns": ["dist", "coverage", "CHANGELOG.md"] +} diff --git a/etc/blocks/nonpure-output/model/.oxlintrc.json b/etc/blocks/nonpure-output/model/.oxlintrc.json new file mode 100644 index 0000000000..70ab6b8dc2 --- /dev/null +++ b/etc/blocks/nonpure-output/model/.oxlintrc.json @@ -0,0 +1,3 @@ +{ + "extends": ["node_modules/@milaboratories/ts-builder/dist/configs/oxlint-block-model.json"] +} diff --git a/etc/blocks/nonpure-output/model/CHANGELOG.md b/etc/blocks/nonpure-output/model/CHANGELOG.md new file mode 100644 index 0000000000..825c32f0d0 --- /dev/null +++ b/etc/blocks/nonpure-output/model/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog diff --git a/etc/blocks/nonpure-output/model/package.json b/etc/blocks/nonpure-output/model/package.json new file mode 100644 index 0000000000..8ce1e454c0 --- /dev/null +++ b/etc/blocks/nonpure-output/model/package.json @@ -0,0 +1,42 @@ +{ + "name": "@milaboratories/milaboratories.test-nonpure-output.model", + "version": "1.0.34", + "private": true, + "description": "Block model", + "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" + }, + "./dist/*": "./dist/*" + }, + "scripts": { + "build": "ts-builder build --target block-model && block-tools build-model", + "check": "ts-builder check --target block-model", + "formatter:check": "ts-builder formatter --check", + "linter:check": "ts-builder linter --check", + "types:check": "ts-builder type-check --target block-model", + "fmt": "ts-builder format", + "watch": "ts-builder build --target block-model --watch" + }, + "dependencies": { + "@platforma-sdk/model": "workspace:*", + "zod": "catalog:" + }, + "devDependencies": { + "@milaboratories/build-configs": "workspace:*", + "@milaboratories/ts-builder": "workspace:*", + "@milaboratories/ts-configs": "workspace:*", + "@platforma-sdk/block-tools": "workspace:*", + "vitest": "catalog:" + }, + "peerDependencies": { + "@types/node": "*", + "typescript": "*" + } +} diff --git a/etc/blocks/nonpure-output/model/src/index.ts b/etc/blocks/nonpure-output/model/src/index.ts new file mode 100644 index 0000000000..ac3f3cbe3e --- /dev/null +++ b/etc/blocks/nonpure-output/model/src/index.ts @@ -0,0 +1,27 @@ +import type { InferHrefType, InferOutputsType } from "@platforma-sdk/model"; +import { BlockModel } from "@platforma-sdk/model"; +import { z } from "zod"; + +// The block takes no inputs: it just runs an impure command. argsValid is always +// true, so the workflow runs as soon as the block is created. +export const BlockArgs = z.object({}); + +export type BlockArgs = z.infer; + +export const platforma = BlockModel.create("Heavy") + + .withArgs({}) + + // The non-deterministic value produced by the workflow command (changes every run). + .output("nonpureValue", (ctx) => ctx.outputs?.resolve("nonpureValue")?.getDataAsString()) + + .argsValid(() => true) + + .sections((_ctx) => { + return [{ type: "link", href: "/", label: "Main" }]; + }) + + .done(2); // ui api version 2 + +export type BlockOutputs = InferOutputsType; +export type Href = InferHrefType; diff --git a/etc/blocks/nonpure-output/model/tsconfig.json b/etc/blocks/nonpure-output/model/tsconfig.json new file mode 100644 index 0000000000..ccde31405f --- /dev/null +++ b/etc/blocks/nonpure-output/model/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "@milaboratories/ts-configs/block/model", + "include": ["src/**/*"] +} diff --git a/etc/blocks/nonpure-output/software/random-gen/package.json b/etc/blocks/nonpure-output/software/random-gen/package.json new file mode 100644 index 0000000000..fdf2b32e60 --- /dev/null +++ b/etc/blocks/nonpure-output/software/random-gen/package.json @@ -0,0 +1,45 @@ +{ + "name": "@platforma-open/milaboratories.test-nonpure-output.random-gen", + "version": "1.0.0", + "private": true, + "description": "Impure command: prints a fresh random value on every run", + "files": [ + "./dist/**/*" + ], + "type": "module", + "scripts": { + "build": "pl-pkg build", + "prepublishOnly": "pl-pkg prepublish", + "do-pack": "shx rm -f *.tgz && pl-pkg build && pnpm pack && shx mv platforma-open-*.tgz package.tgz", + "changeset": "changeset", + "version-packages": "changeset version" + }, + "dependencies": {}, + "devDependencies": { + "@platforma-open/milaboratories.runenv-python-3": "catalog:", + "@platforma-sdk/package-builder": "workspace:*", + "shx": "catalog:" + }, + "block-software": { + "entrypoints": { + "main": { + "binary": { + "artifact": { + "type": "python", + "registry": "platforma-open", + "environment": "@platforma-open/milaboratories.runenv-python-3:3.12.10", + "dependencies": { + "toolset": "pip", + "requirements": "requirements.txt" + }, + "root": "./src" + }, + "cmd": [ + "python", + "{pkg}/main.py" + ] + } + } + } + } +} diff --git a/etc/blocks/nonpure-output/software/random-gen/src/main.py b/etc/blocks/nonpure-output/software/random-gen/src/main.py new file mode 100644 index 0000000000..c1d7e91ce5 --- /dev/null +++ b/etc/blocks/nonpure-output/software/random-gen/src/main.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +"""Impure helper for the non-pure-output test block. + +Prints a fresh random token on every run, so the same (empty) inputs produce a +different output each time. That is exactly what makes a block built on it +non-pure, and what triggers the recover-mode CID conflict in the backend: the +recovered (predicted) output CID diverges from the recomputed one. + +Stdlib only - cross-platform, no third-party dependencies. +""" + +import secrets + + +def main() -> None: + # end="" keeps the output clean: no trailing newline gets captured into the + # block's nonpureValue output. + print(secrets.token_hex(16), end="") + + +if __name__ == "__main__": + main() diff --git a/etc/blocks/nonpure-output/software/random-gen/src/requirements.txt b/etc/blocks/nonpure-output/software/random-gen/src/requirements.txt new file mode 100644 index 0000000000..2ab3d16044 --- /dev/null +++ b/etc/blocks/nonpure-output/software/random-gen/src/requirements.txt @@ -0,0 +1 @@ +# No third-party dependencies - main.py uses the Python standard library only. diff --git a/etc/blocks/nonpure-output/ui/.oxfmtrc.json b/etc/blocks/nonpure-output/ui/.oxfmtrc.json new file mode 100644 index 0000000000..ba9bb8f00d --- /dev/null +++ b/etc/blocks/nonpure-output/ui/.oxfmtrc.json @@ -0,0 +1,3 @@ +{ + "ignorePatterns": ["dist", "CHANGELOG.md"] +} diff --git a/etc/blocks/nonpure-output/ui/.oxlintrc.json b/etc/blocks/nonpure-output/ui/.oxlintrc.json new file mode 100644 index 0000000000..5cb5522788 --- /dev/null +++ b/etc/blocks/nonpure-output/ui/.oxlintrc.json @@ -0,0 +1,3 @@ +{ + "extends": ["node_modules/@milaboratories/ts-builder/dist/configs/oxlint-block-ui.json"] +} diff --git a/etc/blocks/nonpure-output/ui/CHANGELOG.md b/etc/blocks/nonpure-output/ui/CHANGELOG.md new file mode 100644 index 0000000000..825c32f0d0 --- /dev/null +++ b/etc/blocks/nonpure-output/ui/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog diff --git a/etc/blocks/nonpure-output/ui/index.html b/etc/blocks/nonpure-output/ui/index.html new file mode 100644 index 0000000000..c604936261 --- /dev/null +++ b/etc/blocks/nonpure-output/ui/index.html @@ -0,0 +1,12 @@ + + + + + + + + +
+ + + diff --git a/etc/blocks/nonpure-output/ui/package.json b/etc/blocks/nonpure-output/ui/package.json new file mode 100644 index 0000000000..6004667a26 --- /dev/null +++ b/etc/blocks/nonpure-output/ui/package.json @@ -0,0 +1,34 @@ +{ + "name": "@milaboratories/milaboratories.test-nonpure-output.ui", + "version": "1.0.117", + "private": true, + "type": "module", + "scripts": { + "dev": "ts-builder serve --target block-ui", + "watch": "ts-builder build --target block-ui --watch", + "check": "ts-builder check --target block-ui", + "formatter:check": "ts-builder formatter --check", + "linter:check": "ts-builder linter --check", + "types:check": "ts-builder type-check --target block-ui", + "build": "ts-builder build --target block-ui", + "fmt": "ts-builder format" + }, + "dependencies": { + "@milaboratories/milaboratories.test-nonpure-output.model": "workspace:*", + "@platforma-sdk/ui-vue": "workspace:*", + "vue": "catalog:" + }, + "devDependencies": { + "@faker-js/faker": "catalog:", + "@milaboratories/build-configs": "workspace:*", + "@milaboratories/helpers": "workspace:*", + "@milaboratories/ts-builder": "workspace:*", + "@milaboratories/ts-configs": "workspace:*", + "vitest": "catalog:", + "zod": "catalog:" + }, + "peerDependencies": { + "@types/node": "*", + "typescript": "*" + } +} diff --git a/etc/blocks/nonpure-output/ui/src/MainPage.vue b/etc/blocks/nonpure-output/ui/src/MainPage.vue new file mode 100644 index 0000000000..b429b8b689 --- /dev/null +++ b/etc/blocks/nonpure-output/ui/src/MainPage.vue @@ -0,0 +1,15 @@ + + + diff --git a/etc/blocks/nonpure-output/ui/src/app.ts b/etc/blocks/nonpure-output/ui/src/app.ts new file mode 100644 index 0000000000..ea961423c6 --- /dev/null +++ b/etc/blocks/nonpure-output/ui/src/app.ts @@ -0,0 +1,19 @@ +import { platforma } from "@milaboratories/milaboratories.test-nonpure-output.model"; +import MainPage from "./MainPage.vue"; +import { defineApp } from "@platforma-sdk/ui-vue"; +import type { Component } from "vue"; +import type { Equal, Expect } from "@milaboratories/helpers"; + +export const sdkPlugin = defineApp(platforma, () => { + return { + routes: { + "/": () => MainPage, + }, + }; +}); + +type App = ReturnType; + +type __cases = [Expect Component | undefined>>]; + +export const useApp = sdkPlugin.useApp; diff --git a/etc/blocks/nonpure-output/ui/src/main.ts b/etc/blocks/nonpure-output/ui/src/main.ts new file mode 100644 index 0000000000..cef5df0ab4 --- /dev/null +++ b/etc/blocks/nonpure-output/ui/src/main.ts @@ -0,0 +1,5 @@ +import { createApp } from "vue"; +import { sdkPlugin } from "./app"; +import { BlockLayout } from "@platforma-sdk/ui-vue"; + +createApp(BlockLayout).use(sdkPlugin).mount("#app"); diff --git a/etc/blocks/nonpure-output/ui/tsconfig.json b/etc/blocks/nonpure-output/ui/tsconfig.json new file mode 100644 index 0000000000..bf561dd728 --- /dev/null +++ b/etc/blocks/nonpure-output/ui/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "@milaboratories/ts-configs/block/ui", + "include": ["src/**/*"] +} diff --git a/etc/blocks/nonpure-output/workflow/CHANGELOG.md b/etc/blocks/nonpure-output/workflow/CHANGELOG.md new file mode 100644 index 0000000000..825c32f0d0 --- /dev/null +++ b/etc/blocks/nonpure-output/workflow/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog diff --git a/etc/blocks/nonpure-output/workflow/format.el b/etc/blocks/nonpure-output/workflow/format.el new file mode 100644 index 0000000000..dff4aa786d --- /dev/null +++ b/etc/blocks/nonpure-output/workflow/format.el @@ -0,0 +1,42 @@ +;; This program formats all files inside src directory. Usage: emacs --script ./format.el + +(defun install-go-mode () + "Installs go-mode" + (require 'package) + (add-to-list 'package-archives + '("melpa-stable" . "https://stable.melpa.org/packages/")) + (package-initialize) + (unless package-archive-contents + (package-refresh-contents)) + + (package-install 'go-mode t) + (require 'go-mode)) + +;; spaces -> tabs only at the beginning of lines +(setq tabify-regexp "^\t* [ \t]+") + +(defun format-file (file) + "Formats a file according to slightly changed Go rules" + (message "Format %s" file) + (save-excursion + (find-file file) + (delete-trailing-whitespace) ;; deletes whitespaces + (go-mode) ;; sets golang rules for indentation + (tabify (point-min) (point-max)) ;; spaces -> tabs in the whole file + (indent-region (point-min) (point-max)) ;; indentation in the whole file + (save-buffer))) ;; save file + +(install-go-mode) + +;; change syntax of a standard go-mode a bit +(advice-add + 'go--in-composite-literal-p + :filter-return + (lambda (&rest r) t)) + +;; find all files in src +(setq files (directory-files-recursively "src" "\\.tengo\\'")) + +;; call format on every file. +(dolist (file files) + (format-file file)) diff --git a/etc/blocks/nonpure-output/workflow/package.json b/etc/blocks/nonpure-output/workflow/package.json new file mode 100644 index 0000000000..387004ca8c --- /dev/null +++ b/etc/blocks/nonpure-output/workflow/package.json @@ -0,0 +1,22 @@ +{ + "name": "@milaboratories/milaboratories.test-nonpure-output.workflow", + "version": "1.0.18", + "private": true, + "description": "Tengo-based template", + "type": "module", + "scripts": { + "build": "shx rm -rf dist && pl-tengo build", + "check": "pl-tengo check", + "format": "/usr/bin/env emacs --script ./format.el || echo 'No emacs.'" + }, + "dependencies": { + "@platforma-open/milaboratories.test-nonpure-output.random-gen": "workspace:*", + "@platforma-sdk/workflow-tengo": "workspace:*" + }, + "devDependencies": { + "@platforma-sdk/tengo-builder": "workspace:*", + "@platforma-sdk/test": "workspace:*", + "shx": "catalog:", + "vitest": "catalog:" + } +} diff --git a/etc/blocks/nonpure-output/workflow/src/main.tpl.tengo b/etc/blocks/nonpure-output/workflow/src/main.tpl.tengo new file mode 100644 index 0000000000..cc81b24f2a --- /dev/null +++ b/etc/blocks/nonpure-output/workflow/src/main.tpl.tengo @@ -0,0 +1,30 @@ +wf := import("@platforma-sdk/workflow-tengo:workflow") +exec := import("@platforma-sdk/workflow-tengo:exec") +assets := import("@platforma-sdk/workflow-tengo:assets") + +// A tiny Python script that prints a fresh random value on every run (stdlib only, +// so it works on every platform). +randomGenSw := assets.importSoftware("@platforma-open/milaboratories.test-nonpure-output.random-gen:main") + +wf.body(func(args) { + // Intentionally NON-DETERMINISTIC output: the command emits a different value on + // every run, so this block is "impure" - the same inputs do not yield the same + // output. + // + // This reproduces the recover-mode CID conflict in the backend: when the project + // is re-derived, the backend recovers this output's predicted CID from the + // glossary, but re-running the command produces a different value, so the + // resource's effectiveCID diverges from its recovered canonicalID. + run := exec.builder(). + cpu(1).ram("50Mi"). + software(randomGenSw). + saveStdoutContent(). + run() + + return { + outputs: { + nonpureValue: run.getStdoutContent() + }, + exports: {} + } +}) diff --git a/etc/blocks/nonpure-output/workflow/tsconfig.json b/etc/blocks/nonpure-output/workflow/tsconfig.json new file mode 100644 index 0000000000..4593cbadcd --- /dev/null +++ b/etc/blocks/nonpure-output/workflow/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "es2022", + "module": "commonjs", + "moduleResolution": "node", + "esModuleInterop": true, + "strict": true, + "outDir": "./dist", + "rootDir": "./src", + "sourceMap": true, + "declaration": true + }, + "types": [], + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +} diff --git a/etc/blocks/nonpure-output/workflow/vitest.config.mts b/etc/blocks/nonpure-output/workflow/vitest.config.mts new file mode 100644 index 0000000000..981029233d --- /dev/null +++ b/etc/blocks/nonpure-output/workflow/vitest.config.mts @@ -0,0 +1,9 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + watch: false, + maxConcurrency: 3, + testTimeout: 5000, + }, +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6de1593cea..f1ab734a9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1245,6 +1245,141 @@ importers: specifier: 'catalog:' version: 4.1.3(@types/node@24.5.2)(@vitest/coverage-istanbul@4.1.3)(happy-dom@15.11.7)(jsdom@25.0.1)(vite@8.0.6(@types/node@24.5.2)(esbuild@0.27.3)(jiti@2.6.1)(sass@1.83.4)(tsx@4.19.1)(yaml@2.8.0)) + etc/blocks/nonpure-output/block: + devDependencies: + '@milaboratories/milaboratories.test-nonpure-output.model': + specifier: workspace:* + version: link:../model + '@milaboratories/milaboratories.test-nonpure-output.ui': + specifier: workspace:* + version: link:../ui + '@milaboratories/milaboratories.test-nonpure-output.workflow': + specifier: workspace:* + version: link:../workflow + '@milaboratories/ts-builder': + specifier: workspace:* + version: link:../../../../tools/ts-builder + '@milaboratories/ts-configs': + specifier: workspace:* + version: link:../../../../tools/ts-configs + '@platforma-sdk/block-tools': + specifier: workspace:* + version: link:../../../../tools/block-tools + '@platforma-sdk/model': + specifier: workspace:* + version: link:../../../../sdk/model + shx: + specifier: 'catalog:' + version: 0.4.0 + typescript: + specifier: 'catalog:' + version: 5.9.3 + + etc/blocks/nonpure-output/model: + dependencies: + '@platforma-sdk/model': + specifier: workspace:* + version: link:../../../../sdk/model + '@types/node': + specifier: '*' + version: 24.5.2 + typescript: + specifier: '*' + version: 5.9.3 + zod: + specifier: 'catalog:' + version: 3.25.76 + devDependencies: + '@milaboratories/build-configs': + specifier: workspace:* + version: link:../../../../tools/build-configs + '@milaboratories/ts-builder': + specifier: workspace:* + version: link:../../../../tools/ts-builder + '@milaboratories/ts-configs': + specifier: workspace:* + version: link:../../../../tools/ts-configs + '@platforma-sdk/block-tools': + specifier: workspace:* + version: link:../../../../tools/block-tools + vitest: + specifier: 'catalog:' + version: 4.1.3(@types/node@24.5.2)(@vitest/coverage-istanbul@4.1.3)(happy-dom@15.11.7)(jsdom@25.0.1)(vite@8.0.6(@types/node@24.5.2)(esbuild@0.27.3)(jiti@2.6.1)(sass@1.83.4)(tsx@4.19.1)(yaml@2.8.0)) + + etc/blocks/nonpure-output/software/random-gen: + devDependencies: + '@platforma-open/milaboratories.runenv-python-3': + specifier: 'catalog:' + version: 1.10.6 + '@platforma-sdk/package-builder': + specifier: workspace:* + version: link:../../../../../tools/package-builder + shx: + specifier: 'catalog:' + version: 0.4.0 + + etc/blocks/nonpure-output/ui: + dependencies: + '@milaboratories/milaboratories.test-nonpure-output.model': + specifier: workspace:* + version: link:../model + '@platforma-sdk/ui-vue': + specifier: workspace:* + version: link:../../../../sdk/ui-vue + '@types/node': + specifier: '*' + version: 24.5.2 + typescript: + specifier: '*' + version: 5.9.3 + vue: + specifier: 'catalog:' + version: 3.5.24(typescript@5.9.3) + devDependencies: + '@faker-js/faker': + specifier: 'catalog:' + version: 9.2.0 + '@milaboratories/build-configs': + specifier: workspace:* + version: link:../../../../tools/build-configs + '@milaboratories/helpers': + specifier: workspace:* + version: link:../../../../lib/util/helpers + '@milaboratories/ts-builder': + specifier: workspace:* + version: link:../../../../tools/ts-builder + '@milaboratories/ts-configs': + specifier: workspace:* + version: link:../../../../tools/ts-configs + vitest: + specifier: 'catalog:' + version: 4.1.3(@types/node@24.5.2)(@vitest/coverage-istanbul@4.1.3)(happy-dom@15.11.7)(jsdom@25.0.1)(vite@8.0.6(@types/node@24.5.2)(esbuild@0.27.3)(jiti@2.6.1)(sass@1.83.4)(tsx@4.19.1)(yaml@2.8.0)) + zod: + specifier: 'catalog:' + version: 3.25.76 + + etc/blocks/nonpure-output/workflow: + dependencies: + '@platforma-open/milaboratories.test-nonpure-output.random-gen': + specifier: workspace:* + version: link:../software/random-gen + '@platforma-sdk/workflow-tengo': + specifier: workspace:* + version: link:../../../../sdk/workflow-tengo + devDependencies: + '@platforma-sdk/tengo-builder': + specifier: workspace:* + version: link:../../../../tools/tengo-builder + '@platforma-sdk/test': + specifier: workspace:* + version: link:../../../../sdk/test + shx: + specifier: 'catalog:' + version: 0.4.0 + vitest: + specifier: 'catalog:' + version: 4.1.3(@types/node@24.5.2)(@vitest/coverage-istanbul@4.1.3)(happy-dom@15.11.7)(jsdom@25.0.1)(vite@8.0.6(@types/node@24.5.2)(esbuild@0.27.3)(jiti@2.6.1)(sass@1.83.4)(tsx@4.19.1)(yaml@2.8.0)) + etc/blocks/pool-explorer/block: devDependencies: '@milaboratories/milaboratories.pool-explorer.model': diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 28c0d5aa20..5a9f76a325 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -77,6 +77,12 @@ packages: - etc/blocks/sum-numbers/ui - etc/blocks/sum-numbers/block + - etc/blocks/nonpure-output/workflow + - etc/blocks/nonpure-output/model + - etc/blocks/nonpure-output/ui + - etc/blocks/nonpure-output/block + - etc/blocks/nonpure-output/software/random-gen + - etc/blocks/sum-numbers-v3/workflow - etc/blocks/sum-numbers-v3/model - etc/blocks/sum-numbers-v3/ui