diff --git a/.github/workflows/regression-build.yml b/.github/workflows/regression-build.yml index b182fbe..f2e49ea 100644 --- a/.github/workflows/regression-build.yml +++ b/.github/workflows/regression-build.yml @@ -4,16 +4,16 @@ on: workflow_dispatch: inputs: linux: - description: Linux runner ('-' to skip) + description: Linux runner ('-' to skip) default: ubuntu-latest win: - description: Windows runner ('-' to skip) + description: Windows runner ('-' to skip) default: windows-latest mac: - description: MacOS runner ('-' to skip) + description: MacOS runner ('-' to skip) default: macos-latest - - + + schedule: - cron: '0 2 */2 * *' @@ -25,7 +25,7 @@ jobs: uses: ./.github/workflows/test-build-angular.yml with: os: ${{ inputs.linux }} - + win-angular: name: "Windows: Angular" if: ${{ always() && inputs.win != '-' }} @@ -33,7 +33,7 @@ jobs: uses: ./.github/workflows/test-build-angular.yml with: os: ${{ inputs.win }} - + mac-angular: name: "MacOS: Angular" if: ${{ always() && inputs.mac != '-' }} @@ -41,7 +41,7 @@ jobs: uses: ./.github/workflows/test-build-angular.yml with: os: ${{ inputs.mac }} - + # React linux-react: name: "Ubuntu: React" @@ -49,7 +49,7 @@ jobs: uses: ./.github/workflows/test-build-react.yml with: os: ${{ inputs.linux }} - + win-react: name: "Windows: React" if: ${{ always() && inputs.win != '-' }} @@ -57,7 +57,7 @@ jobs: uses: ./.github/workflows/test-build-react.yml with: os: ${{ inputs.win }} - + mac-react: name: "MacOS: React" if: ${{ always() && inputs.mac != '-' }} @@ -65,7 +65,7 @@ jobs: uses: ./.github/workflows/test-build-react.yml with: os: ${{ inputs.mac }} - + # Vue linux-vue: name: "Ubuntu: Vue" @@ -73,7 +73,7 @@ jobs: uses: ./.github/workflows/test-build-vue.yml with: os: ${{ inputs.linux }} - + win-vue: name: "Windows: Vue" if: ${{ always() && inputs.win != '-' }} @@ -81,7 +81,7 @@ jobs: uses: ./.github/workflows/test-build-vue.yml with: os: ${{ inputs.win }} - + mac-vue: name: "MacOS: Vue" if: ${{ always() && inputs.mac != '-' }} @@ -89,7 +89,7 @@ jobs: uses: ./.github/workflows/test-build-vue.yml with: os: ${{ inputs.mac }} - + # Svelte linux-svelte: @@ -98,7 +98,7 @@ jobs: uses: ./.github/workflows/test-build-svelte.yml with: os: ${{ inputs.linux }} - + win-svelte: name: "Windows: Svelte" if: ${{ always() && inputs.win != '-' }} @@ -106,7 +106,7 @@ jobs: uses: ./.github/workflows/test-build-svelte.yml with: os: ${{ inputs.win }} - + mac-svelte: name: "MacOS: Svelte" if: ${{ always() && inputs.mac != '-' }} @@ -114,7 +114,7 @@ jobs: uses: ./.github/workflows/test-build-svelte.yml with: os: ${{ inputs.mac }} - + # Vite linux-vite: name: "Ubuntu: Vite" @@ -122,7 +122,7 @@ jobs: uses: ./.github/workflows/test-build-vite.yml with: os: ${{ inputs.linux }} - + win-vite: name: "Windows: Vite" if: ${{ always() && inputs.win != '-' }} @@ -130,7 +130,7 @@ jobs: uses: ./.github/workflows/test-build-vite.yml with: os: ${{ inputs.win }} - + mac-vite: name: "MacOS: Vite" if: ${{ always() && inputs.mac != '-' }} @@ -138,7 +138,7 @@ jobs: uses: ./.github/workflows/test-build-vite.yml with: os: ${{ inputs.mac }} - + # React Vite linux-react-vite: name: "Ubuntu: React Vite" @@ -146,7 +146,7 @@ jobs: uses: ./.github/workflows/test-build-react-vite.yml with: os: ${{ inputs.linux }} - + win-react-vite: name: "Windows: React Vite" if: ${{ always() && inputs.win != '-' }} @@ -154,7 +154,7 @@ jobs: uses: ./.github/workflows/test-build-react-vite.yml with: os: ${{ inputs.win }} - + mac-react-vite: name: "MacOS: React Vite" if: ${{ always() && inputs.mac != '-' }} @@ -162,7 +162,7 @@ jobs: uses: ./.github/workflows/test-build-react-vite.yml with: os: ${{ inputs.mac }} - + # Vue Vite linux-vue-vite: name: "Ubuntu: Vue Vite" @@ -170,7 +170,7 @@ jobs: uses: ./.github/workflows/test-build-vue-vite.yml with: os: ${{ inputs.linux }} - + win-vue-vite: name: "Windows: Vue Vite" if: ${{ always() && inputs.win != '-' }} @@ -178,7 +178,7 @@ jobs: uses: ./.github/workflows/test-build-vue-vite.yml with: os: ${{ inputs.win }} - + mac-vue-vite: name: "MacOS: Vue Vite" if: ${{ always() && inputs.mac != '-' }} @@ -186,7 +186,7 @@ jobs: uses: ./.github/workflows/test-build-vue-vite.yml with: os: ${{ inputs.mac }} - + # Next linux-next: name: "Ubuntu: Next" @@ -194,7 +194,7 @@ jobs: uses: ./.github/workflows/test-build-next.yml with: os: ${{ inputs.linux }} - + win-next: name: "Windows: Next" if: ${{ always() && inputs.win != '-' }} @@ -202,7 +202,7 @@ jobs: uses: ./.github/workflows/test-build-next.yml with: os: ${{ inputs.win }} - + mac-next: name: "MacOS: Next" if: ${{ always() && inputs.mac != '-' }} @@ -210,7 +210,7 @@ jobs: uses: ./.github/workflows/test-build-next.yml with: os: ${{ inputs.mac }} - + # Nuxt linux-nuxt: name: "Ubuntu: Nuxt" @@ -218,7 +218,7 @@ jobs: uses: ./.github/workflows/test-build-nuxt.yml with: os: ${{ inputs.linux }} - + win-nuxt: name: "Windows: Nuxt" if: ${{ always() && inputs.win != '-' }} @@ -226,7 +226,7 @@ jobs: uses: ./.github/workflows/test-build-nuxt.yml with: os: ${{ inputs.win }} - + mac-nuxt: name: "MacOS: Nuxt" if: ${{ always() && inputs.mac != '-' }} @@ -234,3 +234,27 @@ jobs: uses: ./.github/workflows/test-build-nuxt.yml with: os: ${{ inputs.mac }} + +# Lit + linux-lit: + name: "Ubuntu: Lit" + if: ${{ always() && inputs.linux != '-' }} + uses: ./.github/workflows/test-build-lit.yml + with: + os: ${{ inputs.linux }} + + win-lit: + name: "Windows: Lit" + if: ${{ always() && inputs.win != '-' }} + needs: linux-lit + uses: ./.github/workflows/test-build-lit.yml + with: + os: ${{ inputs.win }} + + mac-lit: + name: "MacOS: Lit" + if: ${{ always() && inputs.mac != '-' }} + needs: win-lit + uses: ./.github/workflows/test-build-lit.yml + with: + os: ${{ inputs.mac }} diff --git a/.github/workflows/test-build-lit-vite.yml b/.github/workflows/test-build-lit-vite.yml new file mode 100644 index 0000000..cfe0d8f --- /dev/null +++ b/.github/workflows/test-build-lit-vite.yml @@ -0,0 +1,36 @@ +name: Test Lit Vite build +run-name: Test Lit Vite build for ${{ inputs.os }} + +on: + workflow_call: + inputs: + os: + description: 'OS' + required: true + type: string + workflow_dispatch: + inputs: + os: + description: 'OS' + required: true + type: choice + options: + - ubuntu-latest + - windows-latest + - macos-latest + +jobs: + lit-vite: + name: Lit vite + strategy: + fail-fast: false + max-parallel: 3 + matrix: + version: [3,2] + uses: ./.github/workflows/test-build.yml + with: + os: ${{ inputs.os }} + stack: lit-vite + version: ${{ matrix.version }} + node: 18 + features: "Lit render,${{ vars.FEATURES }}" diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 971bea0..95290f3 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -24,6 +24,14 @@ on: description: 'Node version' type: string required: true + kit-source: + description: 'Rete Kit version source (npm or github)' + type: string + default: 'npm' + kit-version: + description: 'Rete Kit version/reference' + type: string + default: 'latest' workflow_dispatch: inputs: os: @@ -47,6 +55,7 @@ on: - vite - next - nuxt + - lit-vite version: description: 'Stack version' type: number @@ -59,7 +68,17 @@ on: description: 'Node version' type: string required: true - + kit-source: + description: 'Rete Kit version source (npm or github)' + type: choice + options: + - npm + - github + default: 'npm' + kit-version: + description: 'Rete Kit version/reference' + type: string + default: 'latest' jobs: build-app: @@ -70,8 +89,21 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ inputs.node }} - - name: Install Rete Kit - run: npm i -g rete-kit + - name: Install Rete Kit from NPM + if: inputs.kit-source == 'npm' + run: npm i -g rete-kit@${{ inputs.kit-version }} + - uses: actions/checkout@v3 + if: inputs.kit-source == 'github' + with: + repository: retejs/rete-kit + token: ${{ secrets.RETE_QA_PUBLIC_PULL }} + ref: ${{ inputs.kit-version }} + - name: Install Rete Kit from GitHub + if: inputs.kit-source == 'github' + run: | + npm ci + npm run build + npm i -g . - name: Rete Kit version run: rete-kit -V - name: Bootstrapp application @@ -84,4 +116,4 @@ jobs: env: CI: "" working-directory: ./app - + diff --git a/assets/app/templates/scopes b/assets/app/templates/scopes index 09b4f38..594115b 100644 --- a/assets/app/templates/scopes +++ b/assets/app/templates/scopes @@ -7,6 +7,7 @@ import { Area2D, /* [import-area-extensions] AreaExtensions, [/import-area-exten /* [vue-render] import { VuePlugin, VueArea2D, Presets as VuePresets } from 'rete-vue-plugin/* [vue2] /vue2 [/vue2] */' [/vue-render] */ /* [angular-render] import { AngularPlugin, AngularArea2D, Presets as AngularPresets } from 'rete-angular-plugin/* [angular12] /12 [/angular12] *//* [angular13] /13 [/angular13] *//* [angular14] /14 [/angular14] *//* [angular15] /15 [/angular15] *//* [angular16] /16 [/angular16] *//* [angular17] /17 [/angular17] */' [/angular-render] */ /* [svelte-render] import { SveltePlugin, SvelteArea2D, Presets as SveltePresets } from 'rete-svelte-plugin' [/svelte-render] */ +/* [lit-render] import { LitPlugin, LitArea2D, Presets as LitPresets } from '@retejs/lit-plugin' [/lit-render] */ import { ScopesPlugin, Presets as ScopesPresets } from "rete-scopes-plugin"; /* [context-menu] import { ContextMenuPlugin, ContextMenuExtra, Presets as ContextMenuPresets } from 'rete-context-menu-plugin' [/context-menu] */ /* [arrange] import { AutoArrangePlugin, Presets as ArrangePresets } from 'rete-auto-arrange-plugin' [/arrange] */ @@ -64,6 +65,7 @@ type AreaExtra = /* [vue-render] | VueArea2D [/vue-render] */ /* [angular-render] | AngularArea2D [/angular-render] */ /* [svelte-render] | SvelteArea2D [/svelte-render] */ + /* [lit-render] | LitArea2D [/lit-render] */ /* [context-menu] | ContextMenuExtra [/context-menu] */ export async function createEditor(container: HTMLElement/* [stack-angular] , injector: Injector [/stack-angular] */) { @@ -74,6 +76,7 @@ export async function createEditor(container: HTMLElement/* [stack-angular] , in /* [vue-render] const vueRender = new VuePlugin() [/vue-render] */ /* [angular-render] const angularRender = new AngularPlugin({ injector }) [/angular-render] */ /* [svelte-render] const svelteRender = new SveltePlugin() [/svelte-render] */ + /* [lit-render] const litRender = new LitPlugin() [/lit-render] */ /* [readonly] const readonly = new ReadonlyPlugin() [/readonly] */ const scopes = new ScopesPlugin(); /* [context-menu] const contextMenu = new ContextMenuPlugin({ @@ -111,6 +114,11 @@ export async function createEditor(container: HTMLElement/* [stack-angular] , in /* [context-menu] svelteRender.addPreset(SveltePresets.contextMenu.setup()) [/context-menu] */ [/svelte-render] */ + /* [lit-render] + litRender.addPreset(LitPresets.classic.setup()) + /* [context-menu] litRender.addPreset(LitPresets.contextMenu.setup()) [/context-menu] */ + [/lit-render] */ + /* [!readonly] connection.addPreset(ConnectionPresets.classic.setup()) [/!readonly] */ scopes.addPreset(ScopesPresets.classic.setup()); @@ -123,6 +131,7 @@ export async function createEditor(container: HTMLElement/* [stack-angular] , in /* [vue-render] area.use(vueRender) [/vue-render] */ /* [angular-render] area.use(angularRender) [/angular-render] */ /* [svelte-render] area.use(svelteRender) [/svelte-render] */ + /* [lit-render] area.use(litRender) [/lit-render] */ area.use(scopes); /* [context-menu] area.use(contextMenu) [/context-menu] */ diff --git a/src/app/stack/lit/vite.ts b/src/app/stack/lit/vite.ts index eea0bf7..4675013 100644 --- a/src/app/stack/lit/vite.ts +++ b/src/app/stack/lit/vite.ts @@ -25,19 +25,9 @@ export class LitViteBuilder implements AppBuilder { } async putAssets(name: string) { - const customization = join(assetsStack, 'react', 'modules', 'vite', 'customization') - const assets = join(assetsStack, 'react', 'modules', 'vite', 'assets') const modules = join(assetsStack, 'lit', 'modules') const src = join(name, 'src') - await fse.copy(customization, join(src, 'customization'), { - recursive: true, - overwrite: true - }) - await fse.copy(assets, join(src, 'assets'), { - recursive: true, - overwrite: true - }) await fse.copy(modules, src, { recursive: true, overwrite: true