@platforma-sdk/block-tools 2.14.2 → 2.14.4
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/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
Initial release.
|
|
16
|
-
`,Un=`@changesets/cli/changelog`,Wn=`restricted`,Gn=`main`,Kn=`patch`,qn=[`$schema`,`changelog`,`commit`,`fixed`,`linked`,`access`,`baseBranch`,`updateInternalDependencies`,`ignore`];function Jn(){return{$schema:`https://unpkg.com/@changesets/config@3.1.1/schema.json`,changelog:Un,commit:!1,fixed:[],linked:[],access:Wn,baseBranch:Gn,updateInternalDependencies:Kn,ignore:[]}}function Yn(){N(`changelog`,Un),N(`commit`,!1),N(`access`,Wn),N(`baseBranch`,Gn),N(`updateInternalDependencies`,Kn),U(qn)}function Xn(){g(`root`,()=>{_(({ctx:e})=>!e.isSdkInternal,()=>{b(`turbo.json`,E(()=>gn()),()=>{_n()}),y(`.vscode/settings.json`,w(`root/.vscode/settings.json`)),b(`package.json`,E(()=>dn()),()=>{fn()}),b(`pnpm-workspace.yaml`,E(e=>Rn(e)),()=>{zn()}),b(`.gitignore`,w(`root/.gitignore`),()=>{Vn()}),b(`.changeset/config.json`,E(()=>Jn()),()=>{Yn()}),S(`.changeset/scaffold.md`,Ne(Hn))})})}function Zn(e){return e.split(/[-_]+/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Qn(){g(`root`,()=>{_(({ctx:e})=>!e.isSdkInternal,()=>{y(`.github/workflows/build.yaml`,T(`workflows/build.tpl.yaml`,e=>{let t=e.blockVars.shortName;return{appName:`Block: ${Zn(t)}`,appNameSlug:`block-${t}`}})),y(`.github/workflows/mark-stable.yaml`,T(`workflows/mark-stable.tpl.yaml`,e=>({appName:`Block: ${Zn(e.blockVars.shortName)} - Mark Stable`})))})})}var $n={"@platforma-open":{s3:`s3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1`,serveUrl:`https://blocks.pl-open.science`},"@milaboratories":{s3:`s3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1`,serveUrl:`https://block.registry.platforma.bio/releases`}},er={s3:`s3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1`,serveUrl:`https://blocks.pl-open.science`},tr={s3:`s3://milab-euce1-prod-pkgs-s3-block-registry/aux/dev/?region=eu-central-1`,serveUrl:`https://aux-blocks.pl-open.science`};function nr(e,t){let n=t?tr:$n[e]??er;return`block-tools publish -r ${n.s3} --registry-serve-url ${n.serveUrl}`}function rr(e){let t={};for(let n of G(e,`workflow`))t.workflow=`${n.name}/dist/tengo/tpl/main.plj.gz`;for(let n of G(e,`model`))t.model=`${n.name}/dist/model.json`;for(let n of G(e,`ui`))t.ui=`${n.name}/dist`;return t}function ir(e,t){return{build:`ts-builder build --target block-facade && block-tools pack`,check:`ts-builder type-check --target block-facade`,prepublishOnly:nr(e,t),"do-pack":`shx rm -f package.tgz && pnpm pack && shx mv *.tgz package.tgz`}}var ar={"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,"@platforma-sdk/block-tools":`sdk:`,"@platforma-sdk/model":`sdk:`,shx:`catalog:`,typescript:`catalog:`},or={".":{sources:`./src/index.ts`,types:`./dist/index.d.ts`,default:`./dist/index.js`}};function sr(e){if(Object.keys(e.components).length===0)throw Error(`block.components is empty — no workflow/model/ui module was discovered`);let t=e.meta,n=[[`block.meta.title`,t.title],[`block.meta.description`,t.description],[`block.meta.logo`,t.logo],[`block.meta.organization.name`,t.organization?.name],[`block.meta.organization.url`,t.organization?.url],[`block.meta.organization.logo`,t.organization?.logo]];for(let[e,t]of n)if(typeof t!=`string`||t===``)throw Error(`required block field '${e}' is empty`)}function cr(e){let t=e.blockVars,n={...ar,...K(e,`model`),...K(e,`ui`),...K(e,`workflow`),...K(e,`kind`)},r={components:rr(e),meta:{title:t.shortName,description:`${t.shortName} block`,logo:`file:logos/block-logo.png`,organization:{name:t.orgScope,url:`https://example.com`,logo:`file:logos/organization-logo.png`}}};return sr(r),{name:`${t.facadeName}.block`,version:Y,type:`module`,files:[`dist`,`block-pack`],main:`./dist/index.js`,module:`./dist/index.js`,types:`./dist/index.d.ts`,exports:or,scripts:ir(t.npmOrg,e.isSdkInternal),dependencies:{},devDependencies:n,block:r}}function lr(e){let t=e.blockVars,n=G(e,`kind`);if(n.length!==1)throw Error(n.length===0?`block '${t.facadeName}' declares no kind — every block must have a sibling kind/ package`:`block '${t.facadeName}' declares ${n.length} kinds; exactly one is required`);N(`type`,`module`),N(`files`,[`dist`,`block-pack`]),N(`main`,`./dist/index.js`),N(`module`,`./dist/index.js`),N(`types`,`./dist/index.d.ts`),N(`exports`,or);let r=ir(t.npmOrg,e.isSdkInternal);for(let[e,t]of Object.entries(r))F(e,t);I(`mark-stable`),ft(`model`),ft(`ui`),ft(`workflow`),ft(`kind`),z(`@milaboratories/ts-builder`,`sdk:`),z(`@milaboratories/ts-configs`,`sdk:`),z(`@platforma-sdk/block-tools`,`sdk:`),z(`@platforma-sdk/model`,`sdk:`),z(`shx`,`catalog:`),z(`typescript`,`catalog:`),N(`block.components`,rr(e)),ot(`version`,`facade package.json must carry a 'version' (the facade publishes)`),W(`dependencies`),W(`devDependencies`),W(`peerDependencies`),W(`optionalDependencies`),U([...J])}function ur(e){let t=e.split(/[^A-Za-z0-9]+/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``);return/^[0-9]/.test(t)?`_${t}`:t}function dr(){g(`block`,()=>{C(`index.js`),C(`index.d.ts`),y(`src/index.ts`,T(`block/src/index.tpl.ts`,e=>({facadeName:e.blockVars.facadeName,pascalName:ur(e.blockVars.shortName)}))),y(`src/AGENTS.ts`,w(`block/src/AGENTS.ts`)),x(`src/block-extra.ts`,w(`block/src/block-extra.ts`)),x(`src/agents-extra.ts`,w(`block/src/agents-extra.ts`)),y(`tsconfig.json`,w(`block/tsconfig.json`)),S(`logos/block-logo.png`,Me(`block/logos/block-logo.png`)),S(`logos/organization-logo.png`,Me(`block/logos/organization-logo.png`)),b(`package.json`,E(e=>cr(e)),e=>{lr(e)})})}var Q=`src/**/*.test.ts`;function fr(e){return{name:`${e.blockVars.facadeName}.model`,version:Y,private:!0,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:{fmt:`ts-builder format`,watch:`ts-builder build --target block-model --watch`,build:`ts-builder build --target block-model && block-tools build-model`,check:`ts-builder check --target block-model`},dependencies:{"@platforma-sdk/model":`sdk:`,...K(e,`kind`)},devDependencies:{"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,"@platforma-sdk/block-tools":`sdk:`},peerDependencies:{"@types/node":`*`,typescript:`*`}}}function pr(){X(),N(`private`,!0),N(`type`,`module`),N(`main`,`dist/index.cjs`),N(`module`,`dist/index.js`),N(`types`,`dist/index.d.ts`),N(`exports`,{".":{types:`./dist/index.d.ts`,sources:`./src/index.ts`,import:`./dist/index.js`},"./dist/*":`./dist/*`}),F(`fmt`,`ts-builder format`),F(`watch`,`ts-builder build --target block-model --watch`),F(`build`,`ts-builder build --target block-model && block-tools build-model`),F(`check`,`ts-builder check --target block-model`),R(`@platforma-sdk/model`,`sdk:`),dt(`kind`),V({"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,"@platforma-sdk/block-tools":`sdk:`}),H({"@types/node":`*`,typescript:`*`}),_(({ctx:e})=>!e.isSdkInternal,()=>_(v(Q),()=>{F(`test`,`vitest run --passWithNoTests`),z(`vitest`,`catalog:`),z(`@types/node`,`*`)},()=>B(`vitest`))),Mn(),P(`tsup`),I(`lint`),W(`dependencies`),W(`devDependencies`),W(`peerDependencies`),W(`optionalDependencies`),U([...J])}function mr(){g(`model`,()=>{_(v(Q),()=>y(`tsconfig.json`,w(`model/tsconfig.node.json`)),()=>y(`tsconfig.json`,w(`model/tsconfig.json`))),y(`.oxlintrc.json`,w(`model/.oxlintrc.json`)),y(`.oxfmtrc.json`,w(`model/.oxfmtrc.json`)),S(`src/index.ts`,T(`model/src/index.tpl.ts`,e=>({kindPkg:`${e.blockVars.facadeName}.kind`}))),b(`package.json`,E(e=>fr(e)),()=>{pr()})})}var hr={".":{types:`./dist/index.d.ts`,sources:`./src/index.ts`,import:`./dist/index.js`,require:`./dist/index.cjs`,default:`./dist/index.js`}};function gr(e){return{name:`${e.blockVars.facadeName}.kind`,version:Y,private:!0,type:`module`,main:`./dist/index.cjs`,module:`./dist/index.js`,types:`./dist/index.d.ts`,exports:hr,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:{"@platforma-sdk/block-kind":`sdk:`},devDependencies:{"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,"@platforma-sdk/block-tools":`sdk:`},peerDependencies:{"@types/node":`*`,typescript:`*`}}}function _r(){X(),N(`private`,!0),N(`type`,`module`),N(`main`,`./dist/index.cjs`),N(`module`,`./dist/index.js`),N(`types`,`./dist/index.d.ts`),N(`exports`,hr),F(`fmt`,`ts-builder format`),F(`watch`,`ts-builder build --target block-kind --watch`),F(`build`,`ts-builder build --target block-kind && block-tools build-kind-manifest`),F(`check`,`ts-builder check --target block-kind`),I(`lint`),R(`@platforma-sdk/block-kind`,`sdk:`),V({"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,"@platforma-sdk/block-tools":`sdk:`}),H({"@types/node":`*`,typescript:`*`}),W(`dependencies`),W(`devDependencies`),W(`peerDependencies`),W(`optionalDependencies`),U([...J])}function vr(){g(`kind`,()=>{y(`tsconfig.json`,w(`kind/tsconfig.json`)),y(`.oxlintrc.json`,w(`kind/.oxlintrc.json`)),y(`.oxfmtrc.json`,w(`kind/.oxfmtrc.json`)),S(`src/index.ts`,w(`kind/src/index.ts`)),b(`package.json`,E(e=>gr(e)),()=>{_r()})})}function yr(e){return{name:`${e.blockVars.facadeName}.ui`,version:Y,private:!0,type:`module`,scripts:{fmt:`ts-builder format`,dev:`ts-builder serve --target block-ui`,watch:`ts-builder build --target block-ui --watch`,build:`ts-builder build --target block-ui`,check:`ts-builder check --target block-ui`},dependencies:{"@platforma-sdk/ui-vue":`sdk:`,vue:`catalog:`,...Qt(e,`model`)},devDependencies:{"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`},peerDependencies:{"@types/node":`*`,typescript:`*`}}}function br(){X(),N(`private`,!0),N(`type`,`module`),F(`fmt`,`ts-builder format`),F(`dev`,`ts-builder serve --target block-ui`),F(`watch`,`ts-builder build --target block-ui --watch`),F(`build`,`ts-builder build --target block-ui`),F(`check`,`ts-builder check --target block-ui`),R(`@platforma-sdk/ui-vue`,`sdk:`),R(`vue`,`catalog:`),dt(`model`),V({"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`}),Mn(),I(`preview`),I(`lint`),H({"@types/node":`*`,typescript:`*`}),_(({ctx:e})=>!e.isSdkInternal,()=>_(v(Q),()=>{F(`test`,`vitest run --passWithNoTests`),z(`vitest`,`catalog:`),z(`@types/node`,`*`)},()=>B(`vitest`))),W(`dependencies`),W(`devDependencies`),W(`peerDependencies`),W(`optionalDependencies`),U([...J])}function xr(){g(`ui`,()=>{_(v(Q),()=>y(`tsconfig.json`,w(`ui/tsconfig.node.json`)),()=>y(`tsconfig.json`,w(`ui/tsconfig.json`))),y(`.oxlintrc.json`,w(`ui/.oxlintrc.json`)),y(`.oxfmtrc.json`,w(`ui/.oxfmtrc.json`)),x(`index.html`,w(`ui/index.html`)),S(`src/main.ts`,w(`ui/src/main.ts`)),S(`src/app.ts`,T(`ui/src/app.tpl.ts`,e=>({modelPkg:`${e.blockVars.facadeName}.model`}))),S(`src/MainPage.vue`,T(`ui/src/MainPage.tpl.vue`,e=>({shortName:e.blockVars.shortName}))),b(`package.json`,E(e=>yr(e)),()=>{br()})})}function Sr(e){return{name:`${e.blockVars.facadeName}.workflow`,version:Y,private:!0,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-sdk/workflow-tengo":`sdk:`,...K(e,`software`)},devDependencies:{"@platforma-sdk/tengo-builder":`sdk:`,"@platforma-sdk/test":`sdk:`,shx:`catalog:`}}}function Cr(){X(),N(`private`,!0),N(`type`,`module`),F(`build`,`shx rm -rf dist && pl-tengo build`),F(`check`,`pl-tengo check`),F(`format`,`/usr/bin/env emacs --script ./format.el || echo 'No emacs.'`),_(({ctx:e})=>!e.isSdkInternal,()=>_(v(Q),()=>{F(`test`,`vitest run --passWithNoTests`),V({vitest:`catalog:`})},()=>B(`vitest`))),R(`@platforma-sdk/workflow-tengo`,`sdk:`),dt(`software`),V({"@platforma-sdk/tengo-builder":`sdk:`,"@platforma-sdk/test":`sdk:`,shx:`catalog:`}),Mn(),W(`dependencies`),W(`devDependencies`),W(`peerDependencies`),W(`optionalDependencies`),U([...J])}function wr(){g(`workflow`,()=>{y(`format.el`,w(`workflow/format.el`)),_(({ctx:e})=>!e.isSdkInternal,()=>_(v(Q),()=>{y(`tsconfig.json`,w(`workflow/tsconfig.json`)),x(`vitest.config.mts`,w(`workflow/vitest.config.mts`))},()=>{C(`tsconfig.json`),C(`vitest.config.mts`)})),C(`index.js`),C(`index.d.ts`),S(`src/main.tpl.tengo`,T(`workflow/src/main.tpl.tengo`,e=>({shortName:e.blockVars.shortName}))),b(`package.json`,E(e=>Sr(e)),()=>{Cr()})})}function Tr(e){return{name:`${e.blockVars.facadeName}.test`,version:Y,private:!0,type:`module`,scripts:{fmt:`ts-builder format`,check:`ts-builder check --target block-test`,test:`vitest run --passWithNoTests`},peerDependencies:{typescript:`*`},devDependencies:{"@platforma-sdk/test":`sdk:`,"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,vitest:`catalog:`}}}function Er(){X(),N(`private`,!0),N(`type`,`module`),F(`fmt`,`ts-builder format`),F(`check`,`ts-builder check --target block-test`),F(`test`,`vitest run --passWithNoTests`),I(`lint`),V({"@platforma-sdk/test":`sdk:`,"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,vitest:`catalog:`}),H({typescript:`*`}),B(`@types/node`),Mn(),W(`dependencies`),W(`devDependencies`),W(`peerDependencies`),W(`optionalDependencies`),U([...J])}function Dr(){g(`test`,()=>{y(`tsconfig.json`,w(`test/tsconfig.json`)),y(`.oxlintrc.json`,w(`test/.oxlintrc.json`)),y(`.oxfmtrc.json`,w(`test/.oxfmtrc.json`)),x(`vitest.config.mts`,w(`test/vitest.config.mts`)),S(`src/demo.test.ts`,Ne(`import { expect, test } from "vitest";
|
|
16
|
+
`,Un=`@changesets/cli/changelog`,Wn=`restricted`,Gn=`main`,Kn=`patch`,qn=[`$schema`,`changelog`,`commit`,`fixed`,`linked`,`access`,`baseBranch`,`updateInternalDependencies`,`ignore`];function Jn(){return{$schema:`https://unpkg.com/@changesets/config@3.1.1/schema.json`,changelog:Un,commit:!1,fixed:[],linked:[],access:Wn,baseBranch:Gn,updateInternalDependencies:Kn,ignore:[]}}function Yn(){N(`changelog`,Un),N(`commit`,!1),N(`access`,Wn),N(`baseBranch`,Gn),N(`updateInternalDependencies`,Kn),U(qn)}function Xn(){g(`root`,()=>{_(({ctx:e})=>!e.isSdkInternal,()=>{b(`turbo.json`,E(()=>gn()),()=>{_n()}),y(`.vscode/settings.json`,w(`root/.vscode/settings.json`)),b(`package.json`,E(()=>dn()),()=>{fn()}),b(`pnpm-workspace.yaml`,E(e=>Rn(e)),()=>{zn()}),b(`.gitignore`,w(`root/.gitignore`),()=>{Vn()}),b(`.changeset/config.json`,E(()=>Jn()),()=>{Yn()}),S(`.changeset/scaffold.md`,Ne(Hn))})})}function Zn(e){return e.split(/[-_]+/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Qn(){g(`root`,()=>{_(({ctx:e})=>!e.isSdkInternal,()=>{y(`.github/workflows/build.yaml`,T(`workflows/build.tpl.yaml`,e=>{let t=e.blockVars.shortName;return{appName:`Block: ${Zn(t)}`,appNameSlug:`block-${t}`}})),y(`.github/workflows/mark-stable.yaml`,T(`workflows/mark-stable.tpl.yaml`,e=>({appName:`Block: ${Zn(e.blockVars.shortName)} - Mark Stable`})))})})}var $n={"@platforma-open":{s3:`s3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1`,serveUrl:`https://blocks.pl-open.science`},"@milaboratories":{s3:`s3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1`,serveUrl:`https://block.registry.platforma.bio/releases`}},er={s3:`s3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1`,serveUrl:`https://blocks.pl-open.science`},tr={s3:`s3://milab-euce1-prod-pkgs-s3-block-registry/aux/dev/?region=eu-central-1`,serveUrl:`https://aux-blocks.pl-open.science`};function nr(e,t){let n=t?tr:$n[e]??er;return`block-tools publish -r ${n.s3} --registry-serve-url ${n.serveUrl}`}function rr(e){let t={};for(let n of G(e,`workflow`))t.workflow=`${n.name}/dist/tengo/tpl/main.plj.gz`;for(let n of G(e,`model`))t.model=`${n.name}/dist/model.json`;for(let n of G(e,`ui`))t.ui=`${n.name}/dist`;return t}function ir(e,t){return{build:`ts-builder build --target block-facade && block-tools pack`,check:`ts-builder type-check --target block-facade`,prepublishOnly:nr(e,t),"do-pack":`shx rm -f package.tgz && pnpm pack && shx mv *.tgz package.tgz`}}var ar={"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,"@platforma-sdk/block-tools":`sdk:`,"@platforma-sdk/model":`sdk:`,shx:`catalog:`,typescript:`catalog:`},or={".":{sources:`./src/index.ts`,types:`./dist/index.d.ts`,default:`./dist/index.js`}};function sr(e){if(Object.keys(e.components).length===0)throw Error(`block.components is empty — no workflow/model/ui module was discovered`);let t=e.meta,n=[[`block.meta.title`,t.title],[`block.meta.description`,t.description],[`block.meta.logo`,t.logo],[`block.meta.organization.name`,t.organization?.name],[`block.meta.organization.url`,t.organization?.url],[`block.meta.organization.logo`,t.organization?.logo]];for(let[e,t]of n)if(typeof t!=`string`||t===``)throw Error(`required block field '${e}' is empty`)}function cr(e){let t=e.blockVars,n={...ar,...K(e,`model`),...K(e,`ui`),...K(e,`workflow`),...K(e,`kind`)},r={components:rr(e),meta:{title:t.shortName,description:`${t.shortName} block`,logo:`file:logos/block-logo.png`,organization:{name:t.orgScope,url:`https://example.com`,logo:`file:logos/organization-logo.png`}}};return sr(r),{name:`${t.facadeName}.block`,version:Y,type:`module`,files:[`dist`,`block-pack`],main:`./dist/index.js`,module:`./dist/index.js`,types:`./dist/index.d.ts`,exports:or,scripts:ir(t.npmOrg,e.isSdkInternal),dependencies:{},devDependencies:n,block:r}}function lr(e){let t=e.blockVars,n=G(e,`kind`);if(n.length!==1)throw Error(n.length===0?`block '${t.facadeName}' declares no kind — every block must have a sibling kind/ package`:`block '${t.facadeName}' declares ${n.length} kinds; exactly one is required`);N(`type`,`module`),N(`files`,[`dist`,`block-pack`]),N(`main`,`./dist/index.js`),N(`module`,`./dist/index.js`),N(`types`,`./dist/index.d.ts`),N(`exports`,or);let r=ir(t.npmOrg,e.isSdkInternal);for(let[e,t]of Object.entries(r))F(e,t);ft(`model`),ft(`ui`),ft(`workflow`),ft(`kind`),z(`@milaboratories/ts-builder`,`sdk:`),z(`@milaboratories/ts-configs`,`sdk:`),z(`@platforma-sdk/block-tools`,`sdk:`),z(`@platforma-sdk/model`,`sdk:`),z(`shx`,`catalog:`),z(`typescript`,`catalog:`),N(`block.components`,rr(e)),ot(`version`,`facade package.json must carry a 'version' (the facade publishes)`),W(`dependencies`),W(`devDependencies`),W(`peerDependencies`),W(`optionalDependencies`),U([...J])}function ur(e){let t=e.split(/[^A-Za-z0-9]+/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``);return/^[0-9]/.test(t)?`_${t}`:t}function dr(){g(`block`,()=>{C(`index.js`),C(`index.d.ts`),y(`src/index.ts`,T(`block/src/index.tpl.ts`,e=>({facadeName:e.blockVars.facadeName,pascalName:ur(e.blockVars.shortName)}))),y(`src/AGENTS.ts`,w(`block/src/AGENTS.ts`)),x(`src/block-extra.ts`,w(`block/src/block-extra.ts`)),x(`src/agents-extra.ts`,w(`block/src/agents-extra.ts`)),y(`tsconfig.json`,w(`block/tsconfig.json`)),S(`logos/block-logo.png`,Me(`block/logos/block-logo.png`)),S(`logos/organization-logo.png`,Me(`block/logos/organization-logo.png`)),b(`package.json`,E(e=>cr(e)),e=>{lr(e)})})}var Q=`src/**/*.test.ts`;function fr(e){return{name:`${e.blockVars.facadeName}.model`,version:Y,private:!0,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:{fmt:`ts-builder format`,watch:`ts-builder build --target block-model --watch`,build:`ts-builder build --target block-model && block-tools build-model`,check:`ts-builder check --target block-model`},dependencies:{"@platforma-sdk/model":`sdk:`,...K(e,`kind`)},devDependencies:{"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,"@platforma-sdk/block-tools":`sdk:`},peerDependencies:{"@types/node":`*`,typescript:`*`}}}function pr(){X(),N(`private`,!0),N(`type`,`module`),N(`main`,`dist/index.cjs`),N(`module`,`dist/index.js`),N(`types`,`dist/index.d.ts`),N(`exports`,{".":{types:`./dist/index.d.ts`,sources:`./src/index.ts`,import:`./dist/index.js`},"./dist/*":`./dist/*`}),F(`fmt`,`ts-builder format`),F(`watch`,`ts-builder build --target block-model --watch`),F(`build`,`ts-builder build --target block-model && block-tools build-model`),F(`check`,`ts-builder check --target block-model`),R(`@platforma-sdk/model`,`sdk:`),dt(`kind`),V({"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,"@platforma-sdk/block-tools":`sdk:`}),H({"@types/node":`*`,typescript:`*`}),_(({ctx:e})=>!e.isSdkInternal,()=>_(v(Q),()=>{F(`test`,`vitest run --passWithNoTests`),z(`vitest`,`catalog:`),z(`@types/node`,`*`)},()=>B(`vitest`))),Mn(),P(`tsup`),I(`lint`),W(`dependencies`),W(`devDependencies`),W(`peerDependencies`),W(`optionalDependencies`),U([...J])}function mr(){g(`model`,()=>{_(v(Q),()=>y(`tsconfig.json`,w(`model/tsconfig.node.json`)),()=>y(`tsconfig.json`,w(`model/tsconfig.json`))),y(`.oxlintrc.json`,w(`model/.oxlintrc.json`)),y(`.oxfmtrc.json`,w(`model/.oxfmtrc.json`)),S(`src/index.ts`,T(`model/src/index.tpl.ts`,e=>({kindPkg:`${e.blockVars.facadeName}.kind`}))),b(`package.json`,E(e=>fr(e)),()=>{pr()})})}var hr={".":{types:`./dist/index.d.ts`,sources:`./src/index.ts`,import:`./dist/index.js`,require:`./dist/index.cjs`,default:`./dist/index.js`}};function gr(e){return{name:`${e.blockVars.facadeName}.kind`,version:Y,private:!0,type:`module`,main:`./dist/index.cjs`,module:`./dist/index.js`,types:`./dist/index.d.ts`,exports:hr,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:{"@platforma-sdk/block-kind":`sdk:`},devDependencies:{"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,"@platforma-sdk/block-tools":`sdk:`},peerDependencies:{"@types/node":`*`,typescript:`*`}}}function _r(){X(),N(`private`,!0),N(`type`,`module`),N(`main`,`./dist/index.cjs`),N(`module`,`./dist/index.js`),N(`types`,`./dist/index.d.ts`),N(`exports`,hr),F(`fmt`,`ts-builder format`),F(`watch`,`ts-builder build --target block-kind --watch`),F(`build`,`ts-builder build --target block-kind && block-tools build-kind-manifest`),F(`check`,`ts-builder check --target block-kind`),I(`lint`),R(`@platforma-sdk/block-kind`,`sdk:`),V({"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,"@platforma-sdk/block-tools":`sdk:`}),H({"@types/node":`*`,typescript:`*`}),W(`dependencies`),W(`devDependencies`),W(`peerDependencies`),W(`optionalDependencies`),U([...J])}function vr(){g(`kind`,()=>{y(`tsconfig.json`,w(`kind/tsconfig.json`)),y(`.oxlintrc.json`,w(`kind/.oxlintrc.json`)),y(`.oxfmtrc.json`,w(`kind/.oxfmtrc.json`)),S(`src/index.ts`,w(`kind/src/index.ts`)),b(`package.json`,E(e=>gr(e)),()=>{_r()})})}function yr(e){return{name:`${e.blockVars.facadeName}.ui`,version:Y,private:!0,type:`module`,scripts:{fmt:`ts-builder format`,dev:`ts-builder serve --target block-ui`,watch:`ts-builder build --target block-ui --watch`,build:`ts-builder build --target block-ui`,check:`ts-builder check --target block-ui`},dependencies:{"@platforma-sdk/ui-vue":`sdk:`,vue:`catalog:`,...Qt(e,`model`)},devDependencies:{"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`},peerDependencies:{"@types/node":`*`,typescript:`*`}}}function br(){X(),N(`private`,!0),N(`type`,`module`),F(`fmt`,`ts-builder format`),F(`dev`,`ts-builder serve --target block-ui`),F(`watch`,`ts-builder build --target block-ui --watch`),F(`build`,`ts-builder build --target block-ui`),F(`check`,`ts-builder check --target block-ui`),R(`@platforma-sdk/ui-vue`,`sdk:`),R(`vue`,`catalog:`),dt(`model`),V({"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`}),Mn(),I(`preview`),I(`lint`),H({"@types/node":`*`,typescript:`*`}),_(({ctx:e})=>!e.isSdkInternal,()=>_(v(Q),()=>{F(`test`,`vitest run --passWithNoTests`),z(`vitest`,`catalog:`),z(`@types/node`,`*`)},()=>B(`vitest`))),W(`dependencies`),W(`devDependencies`),W(`peerDependencies`),W(`optionalDependencies`),U([...J])}function xr(){g(`ui`,()=>{_(v(Q),()=>y(`tsconfig.json`,w(`ui/tsconfig.node.json`)),()=>y(`tsconfig.json`,w(`ui/tsconfig.json`))),y(`.oxlintrc.json`,w(`ui/.oxlintrc.json`)),y(`.oxfmtrc.json`,w(`ui/.oxfmtrc.json`)),x(`index.html`,w(`ui/index.html`)),S(`src/main.ts`,w(`ui/src/main.ts`)),S(`src/app.ts`,T(`ui/src/app.tpl.ts`,e=>({modelPkg:`${e.blockVars.facadeName}.model`}))),S(`src/MainPage.vue`,T(`ui/src/MainPage.tpl.vue`,e=>({shortName:e.blockVars.shortName}))),b(`package.json`,E(e=>yr(e)),()=>{br()})})}function Sr(e){return{name:`${e.blockVars.facadeName}.workflow`,version:Y,private:!0,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-sdk/workflow-tengo":`sdk:`,...K(e,`software`)},devDependencies:{"@platforma-sdk/tengo-builder":`sdk:`,"@platforma-sdk/test":`sdk:`,shx:`catalog:`}}}function Cr(){X(),N(`private`,!0),N(`type`,`module`),F(`build`,`shx rm -rf dist && pl-tengo build`),F(`check`,`pl-tengo check`),F(`format`,`/usr/bin/env emacs --script ./format.el || echo 'No emacs.'`),_(({ctx:e})=>!e.isSdkInternal,()=>_(v(Q),()=>{F(`test`,`vitest run --passWithNoTests`),V({vitest:`catalog:`})},()=>B(`vitest`))),R(`@platforma-sdk/workflow-tengo`,`sdk:`),dt(`software`),V({"@platforma-sdk/tengo-builder":`sdk:`,"@platforma-sdk/test":`sdk:`,shx:`catalog:`}),Mn(),W(`dependencies`),W(`devDependencies`),W(`peerDependencies`),W(`optionalDependencies`),U([...J])}function wr(){g(`workflow`,()=>{y(`format.el`,w(`workflow/format.el`)),_(({ctx:e})=>!e.isSdkInternal,()=>_(v(Q),()=>{y(`tsconfig.json`,w(`workflow/tsconfig.json`)),x(`vitest.config.mts`,w(`workflow/vitest.config.mts`))},()=>{C(`tsconfig.json`),C(`vitest.config.mts`)})),C(`index.js`),C(`index.d.ts`),S(`src/main.tpl.tengo`,T(`workflow/src/main.tpl.tengo`,e=>({shortName:e.blockVars.shortName}))),b(`package.json`,E(e=>Sr(e)),()=>{Cr()})})}function Tr(e){return{name:`${e.blockVars.facadeName}.test`,version:Y,private:!0,type:`module`,scripts:{fmt:`ts-builder format`,check:`ts-builder check --target block-test`,test:`vitest run --passWithNoTests`},peerDependencies:{typescript:`*`},devDependencies:{"@platforma-sdk/test":`sdk:`,"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,vitest:`catalog:`}}}function Er(){X(),N(`private`,!0),N(`type`,`module`),F(`fmt`,`ts-builder format`),F(`check`,`ts-builder check --target block-test`),F(`test`,`vitest run --passWithNoTests`),I(`lint`),V({"@platforma-sdk/test":`sdk:`,"@milaboratories/ts-builder":`sdk:`,"@milaboratories/ts-configs":`sdk:`,vitest:`catalog:`}),H({typescript:`*`}),B(`@types/node`),Mn(),W(`dependencies`),W(`devDependencies`),W(`peerDependencies`),W(`optionalDependencies`),U([...J])}function Dr(){g(`test`,()=>{y(`tsconfig.json`,w(`test/tsconfig.json`)),y(`.oxlintrc.json`,w(`test/.oxlintrc.json`)),y(`.oxfmtrc.json`,w(`test/.oxfmtrc.json`)),x(`vitest.config.mts`,w(`test/vitest.config.mts`)),S(`src/demo.test.ts`,Ne(`import { expect, test } from "vitest";
|
|
17
17
|
|
|
18
18
|
test("scaffolded block sanity check", () => {
|
|
19
19
|
expect(true).toBe(true);
|