@ccslabs/xtend 0.1.0-rc.1 → 0.1.2
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/CHANGELOG.md +2 -0
- package/README.md +4 -0
- package/catalog/component-catalog-coverage.js +2 -0
- package/catalog/epic13-package-export-lock.js +11 -1
- package/catalog/epic13-rmt-production-readiness.js +0 -1
- package/catalog/epic18-rmt-action-effect-runtime.d.ts +36 -0
- package/catalog/epic18-rmt-action-effect-runtime.js +249 -0
- package/catalog/epic18-rmt-app-platform-authoring.d.ts +39 -0
- package/catalog/epic18-rmt-app-platform-authoring.js +319 -0
- package/catalog/epic18-rmt-app-platform-fixture.d.ts +33 -0
- package/catalog/epic18-rmt-app-platform-fixture.js +221 -0
- package/catalog/epic18-rmt-app-platform-release-handoff.d.ts +30 -0
- package/catalog/epic18-rmt-app-platform-release-handoff.js +231 -0
- package/catalog/epic18-rmt-app-platform-tooling.d.ts +38 -0
- package/catalog/epic18-rmt-app-platform-tooling.js +242 -0
- package/catalog/epic18-rmt-component-template-primitives.d.ts +33 -0
- package/catalog/epic18-rmt-component-template-primitives.js +240 -0
- package/catalog/epic18-rmt-dom-descriptor-renderer.d.ts +35 -0
- package/catalog/epic18-rmt-dom-descriptor-renderer.js +232 -0
- package/catalog/epic18-rmt-event-routing-runtime.d.ts +35 -0
- package/catalog/epic18-rmt-event-routing-runtime.js +234 -0
- package/catalog/epic18-rmt-state-selector-runtime.d.ts +34 -0
- package/catalog/epic18-rmt-state-selector-runtime.js +216 -0
- package/catalog/epic18-rmt-surface-resource-graph-runtime.d.ts +36 -0
- package/catalog/epic18-rmt-surface-resource-graph-runtime.js +256 -0
- package/catalog/surface-manager-controller.js +5 -1
- package/catalog/surface-manager-materialization.js +7 -1
- package/catalog/surface-manager-overlay-bridge.js +41 -6
- package/catalog/surface-manager-workbench-fixture.js +1 -1
- package/catalog/surface-type-capability-matrix.d.ts +61 -0
- package/catalog/surface-type-capability-matrix.js +183 -0
- package/catalog/type-exports-rmt.js +37 -1
- package/catalog/type-exports.js +3 -3
- package/components/icon-packs/lucide.js +4 -0
- package/components/manifest.json +2 -0
- package/components/prism-rmt.d.ts +34 -0
- package/components/prism-rmt.js +130 -0
- package/components/xcards.js +15 -0
- package/components/xcode.d.ts +36 -1
- package/components/xcode.js +215 -20
- package/components/xfooter.js +17 -0
- package/components/xheader.js +14 -0
- package/components/xhero.js +16 -1
- package/components/xlink.js +97 -14
- package/components/xmasonry.js +15 -0
- package/components/xplayer.d.ts +44 -2
- package/components/xplayer.js +242 -15
- package/components/xrouter.js +27 -2
- package/components/xsection.js +15 -0
- package/components/xsidepanel.js +10 -2
- package/components/xsurfacemanager-controller.d.ts +2 -1
- package/components/xsurfacemanager-controller.js +27 -3
- package/components/xsurfacemanager.d.ts +2 -0
- package/components/xsurfacemanager.js +20 -8
- package/components/xsurfaceoverlay-bridge.d.ts +20 -5
- package/components/xsurfaceoverlay-bridge.js +114 -18
- package/components/xsurfaceportal.d.ts +29 -0
- package/components/xsurfaceportal.js +122 -0
- package/components/xsurfaceregion.d.ts +50 -0
- package/components/xsurfaceregion.js +285 -0
- package/components/xsurfacewindow.js +2 -1
- package/components/xtooltip.js +89 -23
- package/docs/README.md +222 -298
- package/docs/changelog.md +107 -0
- package/docs/component-catalog-coverage.md +9 -9
- package/docs/component-platform.md +19 -1
- package/docs/component-ux-app-authoring.md +56 -63
- package/docs/components/xcode.md +83 -53
- package/docs/components/xsurfaceportal.md +32 -0
- package/docs/components/xsurfaceregion.md +37 -0
- package/docs/components.md +105 -69
- package/docs/de/README.md +264 -0
- package/docs/de/XTend-ADR.md +221 -0
- package/docs/de/a11y-keyboard-smokes.md +62 -0
- package/docs/de/about.md +18 -0
- package/docs/de/api.md +157 -0
- package/docs/de/best-practices.md +76 -0
- package/docs/de/changelog.md +107 -0
- package/docs/de/component-catalog-coverage.md +58 -0
- package/docs/de/component-lab.md +103 -0
- package/docs/de/component-long-tail-migration.md +41 -0
- package/docs/de/component-platform.md +177 -0
- package/docs/de/component-ux-app-authoring.md +123 -0
- package/docs/de/component-ux-authoring.md +96 -0
- package/docs/de/component-ux-gates.md +45 -0
- package/docs/de/components/x-rmt-lifecycle-demo-build.md +60 -0
- package/docs/de/components/xalert.md +81 -0
- package/docs/de/components/xbutton.md +103 -0
- package/docs/de/components/xcalendar.md +82 -0
- package/docs/de/components/xcards.md +128 -0
- package/docs/de/components/xcheckbox.md +102 -0
- package/docs/de/components/xcode.md +156 -0
- package/docs/de/components/xdialog.md +92 -0
- package/docs/de/components/xdrawer.md +84 -0
- package/docs/de/components/xfooter.md +126 -0
- package/docs/de/components/xform.md +128 -0
- package/docs/de/components/xheader.md +308 -0
- package/docs/de/components/xhero.md +142 -0
- package/docs/de/components/xicon.md +125 -0
- package/docs/de/components/xinput.md +129 -0
- package/docs/de/components/xlightbox.md +98 -0
- package/docs/de/components/xlink.md +109 -0
- package/docs/de/components/xmasonry.md +124 -0
- package/docs/de/components/xmenu.md +158 -0
- package/docs/de/components/xmodal.md +82 -0
- package/docs/de/components/xplayer.md +104 -0
- package/docs/de/components/xpopover.md +67 -0
- package/docs/de/components/xprogress.md +56 -0
- package/docs/de/components/xradio.md +103 -0
- package/docs/de/components/xrouter.md +260 -0
- package/docs/de/components/xsection.md +125 -0
- package/docs/de/components/xselect.md +105 -0
- package/docs/de/components/xsidepanel.md +30 -0
- package/docs/de/components/xspinner.md +102 -0
- package/docs/de/components/xstate.md +148 -0
- package/docs/de/components/xstatus.md +55 -0
- package/docs/de/components/xsummary.md +78 -0
- package/docs/de/components/xsurfacemanager.md +27 -0
- package/docs/de/components/xsurfacewindow.md +21 -0
- package/docs/de/components/xtabs.md +160 -0
- package/docs/de/components/xtextarea.md +98 -0
- package/docs/de/components/xtheme.md +167 -0
- package/docs/de/components/xtoast.md +62 -0
- package/docs/de/components/xtooltip.md +66 -0
- package/docs/de/components/xtype.md +82 -0
- package/docs/de/components/xutils.md +144 -0
- package/docs/de/components/xwriter.md +94 -0
- package/docs/de/components.md +153 -0
- package/docs/de/conditional-network-evidence-ci.md +38 -0
- package/docs/de/conditional-network-evidence.md +50 -0
- package/docs/de/core-migration-guide.md +110 -0
- package/docs/de/design-tokens.md +116 -0
- package/docs/de/docs-rmt-production-hardening.md +31 -0
- package/docs/de/enterprise-adoption.md +413 -0
- package/docs/de/enterprise-component-flex-release-handoff.md +129 -0
- package/docs/de/epic10-platform-gates.md +62 -0
- package/docs/de/epic10-release-handoff.md +81 -0
- package/docs/de/epic11-enterprise-ux-handoff.md +70 -0
- package/docs/de/epic12-rc0-handoff.md +61 -0
- package/docs/de/epic18-media-manager-vendor-upstream.md +318 -0
- package/docs/de/epic18-rmt-app-platform-release-handoff.md +67 -0
- package/docs/de/epic18-vendor-bugfixes.md +34 -0
- package/docs/de/existing-component-metadata.md +67 -0
- package/docs/de/hydration-performance-closure.md +34 -0
- package/docs/de/hydration-policies.md +71 -0
- package/docs/de/known-residual-triage.md +22 -0
- package/docs/de/manifest-import-policy.md +79 -0
- package/docs/de/manifest.md +112 -0
- package/docs/de/motion-contrast.md +67 -0
- package/docs/de/package-export-lock.md +44 -0
- package/docs/de/performance-measurements.md +106 -0
- package/docs/de/performance-regression.md +89 -0
- package/docs/de/performance.md +94 -0
- package/docs/de/previews/README.md +17 -0
- package/docs/de/prod-browser-csp-smokes.md +40 -0
- package/docs/de/public-component-types.md +79 -0
- package/docs/de/quick-start-guide.md +220 -0
- package/docs/de/rc0-adoption-guide.md +102 -0
- package/docs/de/rc0-gate-matrix.md +58 -0
- package/docs/de/rc1-gate-matrix-ci-handoff.md +56 -0
- package/docs/de/rc1-migration-notes.md +69 -0
- package/docs/de/rc1-readiness.md +46 -0
- package/docs/de/release-owner-acceptance.md +56 -0
- package/docs/de/release-report-pack-dry-run-evidence.md +39 -0
- package/docs/de/rmt-action-effect-runtime.md +81 -0
- package/docs/de/rmt-app-platform-authoring.md +54 -0
- package/docs/de/rmt-app-platform-fixture.md +46 -0
- package/docs/de/rmt-app-platform-migration-guide.md +88 -0
- package/docs/de/rmt-app-platform-tooling.md +79 -0
- package/docs/de/rmt-component-template-primitives.md +57 -0
- package/docs/de/rmt-dom-descriptor-renderer.md +64 -0
- package/docs/de/rmt-dsl-authoring-polish.md +145 -0
- package/docs/de/rmt-event-routing-runtime.md +81 -0
- package/docs/de/rmt-first-demo-app.md +77 -0
- package/docs/de/rmt-first-xtend-apps.md +129 -0
- package/docs/de/rmt-kernel-panic-recovery-incident-handoff.md +61 -0
- package/docs/de/rmt-kernel-security-hardening-migration.md +50 -0
- package/docs/de/rmt-kernel-trusted-output-authoring.md +69 -0
- package/docs/de/rmt-language-server.md +234 -0
- package/docs/de/rmt-lifecycle-demo.md +24 -0
- package/docs/de/rmt-linter.md +140 -0
- package/docs/de/rmt-node-ssr-adapter.md +100 -0
- package/docs/de/rmt-php-ssr-adapter.md +120 -0
- package/docs/de/rmt-production-readiness.md +63 -0
- package/docs/de/rmt-state-selector-runtime.md +47 -0
- package/docs/de/rmt-surface-resource-graph-runtime.md +92 -0
- package/docs/de/rmt-tooling-release-gates.md +77 -0
- package/docs/de/rmt-vnext-authoring.md +170 -0
- package/docs/de/rmt-vnext-component-primitives.md +188 -0
- package/docs/de/rmt-vnext-cross-surface-events.md +68 -0
- package/docs/de/rmt-vnext-enterprise-mfe-handoff.md +70 -0
- package/docs/de/rmt-vnext-fabric-bridge-evidence.md +81 -0
- package/docs/de/rmt-vnext-migration-notes.md +62 -0
- package/docs/de/rmt-vnext-primitive-authoring-tooling.md +247 -0
- package/docs/de/rmt-vnext-primitive-grammar-design.md +289 -0
- package/docs/de/rmt-vnext-primitive-lowering.md +108 -0
- package/docs/de/rmt-vnext-primitive-migration.md +119 -0
- package/docs/de/rmt-vnext-primitive-parser-ast.md +76 -0
- package/docs/de/rmt-vnext-primitive-semantic-graph.md +118 -0
- package/docs/de/rmt-vnext-primitives-compiler-backlog.md +739 -0
- package/docs/de/rmt-vnext-release-handoff.md +83 -0
- package/docs/de/rmt-vnext-remote-surfaces.md +90 -0
- package/docs/de/rmt-vnext-source-to-sea-gate.md +612 -0
- package/docs/de/rmt-vnext-surface-registry-enterprise.md +76 -0
- package/docs/de/screenreader-signals.md +56 -0
- package/docs/de/supply-chain-gates.md +100 -0
- package/docs/de/surface-manager-authoring-guide.md +94 -0
- package/docs/de/surface-manager-browser-lab.md +45 -0
- package/docs/de/surface-manager-component-lab.md +43 -0
- package/docs/de/surface-manager-controller.md +66 -0
- package/docs/de/surface-manager-layout-engines.md +32 -0
- package/docs/de/surface-manager-lazy-hydration.md +63 -0
- package/docs/de/surface-manager-migration-guide.md +122 -0
- package/docs/de/surface-manager-native-rmt-surfaces.md +38 -0
- package/docs/de/surface-manager-overlay-bridge.md +53 -0
- package/docs/de/surface-manager-persistence.md +30 -0
- package/docs/de/surface-manager-quality-gates.md +51 -0
- package/docs/de/surface-manager-release-handoff.md +68 -0
- package/docs/de/surface-manager-remote-policy.md +54 -0
- package/docs/de/surface-manager-rmt-authoring.md +102 -0
- package/docs/de/surface-manager-route-lifecycle.md +59 -0
- package/docs/de/surface-manager-runtime-release-handoff.md +69 -0
- package/docs/de/surface-manager-side-panel-runtime.md +36 -0
- package/docs/de/surface-manager-stack-policy.md +39 -0
- package/docs/de/surface-manager-window-runtime.md +47 -0
- package/docs/de/surface-manager-workbench-fixture.md +43 -0
- package/docs/de/third-party-design-authoring.md +406 -0
- package/docs/de/trusted-dom-boundary-browser-proof.md +32 -0
- package/docs/de/trusted-dom-sanitizing.md +110 -0
- package/docs/de/type-exports.md +61 -0
- package/docs/de/typescript-components.md +63 -0
- package/docs/de/visual-browser-regression.md +83 -0
- package/docs/de/visual-owner-artifacts.md +46 -0
- package/docs/de/visual-snapshot-automation.md +87 -0
- package/docs/de/xtend-api-types.md +55 -0
- package/docs/de/xtend-builder-types.md +55 -0
- package/docs/de/xtend-catalog-types.md +44 -0
- package/docs/de/xtend-fabric-rmt-lane-mapping.md +143 -0
- package/docs/de/xtend-fabric.md +474 -0
- package/docs/de/xtend-loader-types.md +58 -0
- package/docs/de/xtend-loader.md +265 -0
- package/docs/de/xtend-policy-types.md +38 -0
- package/docs/de/xtend-rmt-types.md +40 -0
- package/docs/de/xtend-vendor-types.md +36 -0
- package/docs/de/xtendrmt-app-dsl.md +334 -0
- package/docs/de/xtendrmt-migration-guide.md +266 -0
- package/docs/de/xtendrmt-native-authoring.md +333 -0
- package/docs/de/xtendrmt-overview.md +109 -0
- package/docs/de/xtendrmt-parsedown-scheduling.md +301 -0
- package/docs/de/xtendrmt-runtime-bridge.md +155 -0
- package/docs/en/README.md +163 -0
- package/docs/en/XTend-ADR.md +221 -0
- package/docs/en/a11y-keyboard-smokes.md +68 -0
- package/docs/en/about.md +25 -0
- package/docs/en/api.md +171 -0
- package/docs/en/best-practices.md +125 -0
- package/docs/en/changelog.md +104 -0
- package/docs/en/component-catalog-coverage.md +104 -0
- package/docs/en/component-lab.md +103 -0
- package/docs/en/component-long-tail-migration.md +41 -0
- package/docs/en/component-platform.md +243 -0
- package/docs/en/component-ux-app-authoring.md +118 -0
- package/docs/en/component-ux-authoring.md +96 -0
- package/docs/en/component-ux-gates.md +45 -0
- package/docs/en/components/x-rmt-lifecycle-demo-build.md +75 -0
- package/docs/en/components/xalert.md +94 -0
- package/docs/en/components/xbutton.md +118 -0
- package/docs/en/components/xcalendar.md +95 -0
- package/docs/en/components/xcards.md +139 -0
- package/docs/en/components/xcheckbox.md +118 -0
- package/docs/en/components/xcode.md +153 -0
- package/docs/en/components/xdialog.md +108 -0
- package/docs/en/components/xdrawer.md +110 -0
- package/docs/en/components/xfooter.md +138 -0
- package/docs/en/components/xform.md +147 -0
- package/docs/en/components/xheader.md +308 -0
- package/docs/en/components/xhero.md +157 -0
- package/docs/en/components/xicon.md +149 -0
- package/docs/en/components/xinput.md +147 -0
- package/docs/en/components/xlightbox.md +113 -0
- package/docs/en/components/xlink.md +130 -0
- package/docs/en/components/xmasonry.md +136 -0
- package/docs/en/components/xmenu.md +185 -0
- package/docs/en/components/xmodal.md +102 -0
- package/docs/en/components/xplayer.md +114 -0
- package/docs/en/components/xpopover.md +87 -0
- package/docs/en/components/xprogress.md +73 -0
- package/docs/en/components/xradio.md +119 -0
- package/docs/en/components/xrouter.md +260 -0
- package/docs/en/components/xsection.md +136 -0
- package/docs/en/components/xselect.md +122 -0
- package/docs/en/components/xsidepanel.md +48 -0
- package/docs/en/components/xspinner.md +118 -0
- package/docs/en/components/xstate.md +163 -0
- package/docs/en/components/xstatus.md +71 -0
- package/docs/en/components/xsummary.md +90 -0
- package/docs/en/components/xsurfacemanager.md +42 -0
- package/docs/en/components/xsurfacewindow.md +31 -0
- package/docs/en/components/xtabs.md +187 -0
- package/docs/en/components/xtextarea.md +115 -0
- package/docs/en/components/xtheme.md +203 -0
- package/docs/en/components/xtoast.md +78 -0
- package/docs/en/components/xtooltip.md +85 -0
- package/docs/en/components/xtype.md +91 -0
- package/docs/en/components/xutils.md +161 -0
- package/docs/en/components/xwriter.md +106 -0
- package/docs/en/components.md +151 -0
- package/docs/en/conditional-network-evidence-ci.md +38 -0
- package/docs/en/conditional-network-evidence.md +50 -0
- package/docs/en/core-migration-guide.md +110 -0
- package/docs/en/design-tokens.md +137 -0
- package/docs/en/docs-rmt-production-hardening.md +31 -0
- package/docs/en/enterprise-adoption.md +413 -0
- package/docs/en/enterprise-component-flex-release-handoff.md +129 -0
- package/docs/en/epic10-platform-gates.md +62 -0
- package/docs/en/epic10-release-handoff.md +81 -0
- package/docs/en/epic11-enterprise-ux-handoff.md +70 -0
- package/docs/en/epic12-rc0-handoff.md +61 -0
- package/docs/en/epic18-media-manager-vendor-upstream.md +232 -0
- package/docs/en/epic18-rmt-app-platform-release-handoff.md +60 -0
- package/docs/en/epic18-vendor-bugfixes.md +29 -0
- package/docs/en/existing-component-metadata.md +67 -0
- package/docs/en/hydration-performance-closure.md +34 -0
- package/docs/en/hydration-policies.md +75 -0
- package/docs/en/known-residual-triage.md +22 -0
- package/docs/en/manifest-import-policy.md +81 -0
- package/docs/en/manifest.md +135 -0
- package/docs/en/motion-contrast.md +67 -0
- package/docs/en/package-export-lock.md +44 -0
- package/docs/en/performance-measurements.md +106 -0
- package/docs/en/performance-regression.md +89 -0
- package/docs/en/performance.md +132 -0
- package/docs/en/previews/README.md +17 -0
- package/docs/en/prod-browser-csp-smokes.md +40 -0
- package/docs/en/public-component-types.md +79 -0
- package/docs/en/quick-start-guide.md +189 -0
- package/docs/en/rc0-adoption-guide.md +102 -0
- package/docs/en/rc0-gate-matrix.md +58 -0
- package/docs/en/rc1-gate-matrix-ci-handoff.md +56 -0
- package/docs/en/rc1-migration-notes.md +69 -0
- package/docs/en/rc1-readiness.md +46 -0
- package/docs/en/release-owner-acceptance.md +56 -0
- package/docs/en/release-report-pack-dry-run-evidence.md +39 -0
- package/docs/en/rmt-action-effect-runtime.md +101 -0
- package/docs/en/rmt-app-platform-authoring.md +47 -0
- package/docs/en/rmt-app-platform-fixture.md +35 -0
- package/docs/en/rmt-app-platform-migration-guide.md +75 -0
- package/docs/en/rmt-app-platform-tooling.md +58 -0
- package/docs/en/rmt-component-template-primitives.md +49 -0
- package/docs/en/rmt-dom-descriptor-renderer.md +54 -0
- package/docs/en/rmt-dsl-authoring-polish.md +143 -0
- package/docs/en/rmt-event-routing-runtime.md +98 -0
- package/docs/en/rmt-first-demo-app.md +87 -0
- package/docs/en/rmt-first-xtend-apps.md +127 -0
- package/docs/en/rmt-kernel-panic-recovery-incident-handoff.md +60 -0
- package/docs/en/rmt-kernel-security-hardening-migration.md +49 -0
- package/docs/en/rmt-kernel-trusted-output-authoring.md +68 -0
- package/docs/en/rmt-language-server.md +243 -0
- package/docs/en/rmt-lifecycle-demo.md +23 -0
- package/docs/en/rmt-linter.md +146 -0
- package/docs/en/rmt-node-ssr-adapter.md +99 -0
- package/docs/en/rmt-php-ssr-adapter.md +118 -0
- package/docs/en/rmt-production-readiness.md +63 -0
- package/docs/en/rmt-state-selector-runtime.md +34 -0
- package/docs/en/rmt-surface-resource-graph-runtime.md +68 -0
- package/docs/en/rmt-tooling-release-gates.md +77 -0
- package/docs/en/rmt-vnext-authoring.md +102 -0
- package/docs/en/rmt-vnext-component-primitives.md +185 -0
- package/docs/en/rmt-vnext-cross-surface-events.md +59 -0
- package/docs/en/rmt-vnext-enterprise-mfe-handoff.md +62 -0
- package/docs/en/rmt-vnext-fabric-bridge-evidence.md +64 -0
- package/docs/en/rmt-vnext-migration-notes.md +62 -0
- package/docs/en/rmt-vnext-primitive-authoring-tooling.md +174 -0
- package/docs/en/rmt-vnext-primitive-grammar-design.md +268 -0
- package/docs/en/rmt-vnext-primitive-lowering.md +91 -0
- package/docs/en/rmt-vnext-primitive-migration.md +93 -0
- package/docs/en/rmt-vnext-primitive-parser-ast.md +59 -0
- package/docs/en/rmt-vnext-primitive-semantic-graph.md +103 -0
- package/docs/en/rmt-vnext-primitives-compiler-backlog.md +327 -0
- package/docs/en/rmt-vnext-release-handoff.md +83 -0
- package/docs/en/rmt-vnext-remote-surfaces.md +81 -0
- package/docs/en/rmt-vnext-source-to-sea-gate.md +482 -0
- package/docs/en/rmt-vnext-surface-registry-enterprise.md +68 -0
- package/docs/en/screenreader-signals.md +56 -0
- package/docs/en/supply-chain-gates.md +106 -0
- package/docs/en/surface-manager-authoring-guide.md +94 -0
- package/docs/en/surface-manager-browser-lab.md +45 -0
- package/docs/en/surface-manager-component-lab.md +43 -0
- package/docs/en/surface-manager-controller.md +66 -0
- package/docs/en/surface-manager-layout-engines.md +32 -0
- package/docs/en/surface-manager-lazy-hydration.md +63 -0
- package/docs/en/surface-manager-migration-guide.md +113 -0
- package/docs/en/surface-manager-native-rmt-surfaces.md +38 -0
- package/docs/en/surface-manager-overlay-bridge.md +53 -0
- package/docs/en/surface-manager-persistence.md +30 -0
- package/docs/en/surface-manager-quality-gates.md +51 -0
- package/docs/en/surface-manager-release-handoff.md +68 -0
- package/docs/en/surface-manager-remote-policy.md +54 -0
- package/docs/en/surface-manager-rmt-authoring.md +89 -0
- package/docs/en/surface-manager-route-lifecycle.md +59 -0
- package/docs/en/surface-manager-runtime-release-handoff.md +69 -0
- package/docs/en/surface-manager-side-panel-runtime.md +36 -0
- package/docs/en/surface-manager-stack-policy.md +39 -0
- package/docs/en/surface-manager-window-runtime.md +47 -0
- package/docs/en/surface-manager-workbench-fixture.md +43 -0
- package/docs/en/third-party-design-authoring.md +406 -0
- package/docs/en/trusted-dom-boundary-browser-proof.md +32 -0
- package/docs/en/trusted-dom-sanitizing.md +124 -0
- package/docs/en/type-exports.md +61 -0
- package/docs/en/typescript-components.md +63 -0
- package/docs/en/visual-browser-regression.md +83 -0
- package/docs/en/visual-owner-artifacts.md +46 -0
- package/docs/en/visual-snapshot-automation.md +87 -0
- package/docs/en/xtend-api-types.md +55 -0
- package/docs/en/xtend-builder-types.md +55 -0
- package/docs/en/xtend-catalog-types.md +44 -0
- package/docs/en/xtend-fabric-rmt-lane-mapping.md +143 -0
- package/docs/en/xtend-fabric.md +474 -0
- package/docs/en/xtend-loader-types.md +58 -0
- package/docs/en/xtend-loader.md +265 -0
- package/docs/en/xtend-policy-types.md +38 -0
- package/docs/en/xtend-rmt-types.md +40 -0
- package/docs/en/xtend-vendor-types.md +36 -0
- package/docs/en/xtendrmt-app-dsl.md +331 -0
- package/docs/en/xtendrmt-migration-guide.md +256 -0
- package/docs/en/xtendrmt-native-authoring.md +336 -0
- package/docs/en/xtendrmt-overview.md +63 -0
- package/docs/en/xtendrmt-parsedown-scheduling.md +301 -0
- package/docs/en/xtendrmt-runtime-bridge.md +155 -0
- package/docs/enterprise-adoption.md +4 -2
- package/docs/epic18-media-manager-vendor-upstream.md +318 -0
- package/docs/epic18-rmt-app-platform-release-handoff.md +67 -0
- package/docs/epic18-vendor-bugfixes.md +34 -0
- package/docs/index.php +1056 -109
- package/docs/manifest.md +8 -2
- package/docs/menu.json +986 -133
- package/docs/package-export-lock.md +2 -2
- package/docs/public-component-types.md +2 -2
- package/docs/quick-start-guide.md +126 -58
- package/docs/rmt-action-effect-runtime.md +101 -0
- package/docs/rmt-app-platform-authoring.md +54 -0
- package/docs/rmt-app-platform-fixture.md +46 -0
- package/docs/rmt-app-platform-migration-guide.md +88 -0
- package/docs/rmt-app-platform-tooling.md +79 -0
- package/docs/rmt-component-template-primitives.md +57 -0
- package/docs/rmt-dom-descriptor-renderer.md +64 -0
- package/docs/rmt-dsl-authoring-polish.md +67 -44
- package/docs/rmt-event-routing-runtime.md +98 -0
- package/docs/rmt-first-demo-app.md +2 -2
- package/docs/rmt-first-xtend-apps.md +70 -46
- package/docs/rmt-language-server.md +61 -4
- package/docs/rmt-lifecycle-demo.md +1 -2
- package/docs/rmt-node-ssr-adapter.md +144 -0
- package/docs/rmt-php-ssr-adapter.md +158 -0
- package/docs/rmt-state-selector-runtime.md +47 -0
- package/docs/rmt-surface-resource-graph-runtime.md +92 -0
- package/docs/rmt-vnext-authoring.md +128 -18
- package/docs/rmt-vnext-component-primitives.md +188 -0
- package/docs/rmt-vnext-fabric-bridge-evidence.md +81 -0
- package/docs/rmt-vnext-primitive-authoring-tooling.md +247 -0
- package/docs/rmt-vnext-primitive-grammar-design.md +289 -0
- package/docs/rmt-vnext-primitive-lowering.md +108 -0
- package/docs/rmt-vnext-primitive-migration.md +119 -0
- package/docs/rmt-vnext-primitive-parser-ast.md +76 -0
- package/docs/rmt-vnext-primitive-semantic-graph.md +118 -0
- package/docs/rmt-vnext-primitives-compiler-backlog.md +742 -0
- package/docs/rmt-vnext-release-handoff.md +14 -0
- package/docs/rmt-vnext-source-to-sea-gate.md +629 -0
- package/docs/surface-manager-migration-guide.md +34 -6
- package/docs/surface-manager-overlay-bridge.md +9 -4
- package/docs/surface-manager-rmt-authoring.md +50 -34
- package/docs/surface-manager-workbench-fixture.md +1 -2
- package/docs/third-party-design-authoring.md +1 -1
- package/docs/type-exports.md +3 -3
- package/docs/utils/pageloader.js +811 -62
- package/docs/visual-browser-regression.md +1 -1
- package/docs/xtend-rmt-types.md +3 -2
- package/docs/xtendrmt-app-dsl.md +187 -122
- package/docs/xtendrmt-docs-shell-vnext.rmt +165 -0
- package/docs/xtendrmt-migration-guide.md +48 -17
- package/docs/xtendrmt-native-authoring.md +213 -217
- package/docs/xtendrmt-overview.md +81 -61
- package/docs/xtendrmt-parsedown-scheduling.md +23 -8
- package/fabric/package.json +1 -1
- package/package.json +684 -21
- package/tools/package.json +5 -1
- package/tools/rmt-editor/vscode/README.md +72 -5
- package/tools/rmt-editor/vscode/XTend-Logo.png +0 -0
- package/tools/rmt-editor/vscode/extension.d.ts +33 -0
- package/tools/rmt-editor/vscode/extension.js +1816 -7
- package/tools/rmt-editor/vscode/language-configuration.json +2 -1
- package/tools/rmt-editor/vscode/package.json +193 -2
- package/tools/rmt-editor/vscode/snippets/rmt.code-snippets +41 -0
- package/tools/rmt-editor/vscode/syntaxes/rmt.tmLanguage.json +103 -1
- package/tools/rmt-editor/vscode/templates/launch.json +70 -0
- package/tools/rmt-editor/vscode/templates/tasks.json +172 -0
- package/tools/rmt-editor/vscode/xtend-rmt-language-0.0.0-enterprise-readiness.vsix +0 -0
- package/tools/rmt-language/app-platform-tooling.d.ts +128 -0
- package/tools/rmt-language/app-platform-tooling.js +677 -0
- package/tools/rmt-language/completions.d.ts +5 -0
- package/tools/rmt-language/completions.js +185 -3
- package/tools/rmt-language/diagnostics.js +54 -0
- package/tools/rmt-language/hover.js +36 -0
- package/tools/rmt-language/rmt-tooling-public-types.d.ts +7 -0
- package/tools/rmt-language/rules/app-platform-policy.js +39 -0
- package/tools/rmt-language/rules/index.js +5 -1
- package/tools/rmt-language/semantic-graph.d.ts +6 -0
- package/tools/rmt-language/semantic-graph.js +928 -0
- package/tools/rmt-language/snippets/index.js +44 -0
- package/tools/rmt-language/snippets/rmt.code-snippets +41 -0
- package/tools/rmt-language/vnext-compatibility.d.ts +10 -0
- package/tools/rmt-language/vnext-compatibility.js +642 -0
- package/tools/rmt-language/vnext-compiler.d.ts +5 -0
- package/tools/rmt-language/vnext-compiler.js +863 -17
- package/tools/rmt-language/vnext-parser.js +725 -9
- package/tools/rmt-language/vnext-release.d.ts +1 -0
- package/tools/rmt-language/vnext-release.js +20 -0
- package/tools/rmt-language/vnext-source-to-sea.d.ts +33 -0
- package/tools/rmt-language/vnext-source-to-sea.js +2227 -0
- package/tools/rmt-language/vnext-surfaces.js +111 -52
- package/tools/rmt-language/vnext-tooling.d.ts +19 -1
- package/tools/rmt-language/vnext-tooling.js +1247 -5
- package/tools/rmt-language-server/protocol.js +3 -0
- package/tools/rmt-language-server/server.d.ts +2 -0
- package/tools/rmt-language-server/server.js +176 -22
- package/tools/rmt-linter/cli.d.ts +2 -0
- package/tools/rmt-linter/cli.js +62 -0
- package/xtend-builder/generators/registry.js +11 -0
- package/xtend-builder/generators/rmt-app-platform.js +239 -0
- package/xtend-builder/generators/rmt-lifecycle-demo.js +3 -11
- package/xtend-builder/lib/cli.js +38 -0
- package/xtend-builder/package.json +3 -3
- package/xtend-builder/scaffold.config.js +29 -2
- package/xtend.css +49 -2
- package/xtendrmt/package.json +49 -1
- package/xtendrmt/rmt-action-effect-runtime.d.ts +126 -0
- package/xtendrmt/rmt-action-effect-runtime.js +494 -0
- package/xtendrmt/rmt-component-capability-registry.d.ts +180 -0
- package/xtendrmt/rmt-component-capability-registry.js +636 -0
- package/xtendrmt/rmt-core.d.ts +6 -0
- package/xtendrmt/rmt-core.esm.js +32 -6
- package/xtendrmt/rmt-dom-descriptor-renderer.d.ts +107 -0
- package/xtendrmt/rmt-dom-descriptor-renderer.js +1066 -0
- package/xtendrmt/rmt-event-routing-runtime.d.ts +144 -0
- package/xtendrmt/rmt-event-routing-runtime.js +666 -0
- package/xtendrmt/rmt-lifecycle-demo.app.js +2 -2
- package/xtendrmt/rmt-lifecycle-demo.core.json +4 -0
- package/xtendrmt/rmt-lifecycle-demo.rmt-build.app.js +1 -1
- package/xtendrmt/rmt-lifecycle-demo.rmt-build.scaffold.json +2 -2
- package/xtendrmt/rmt-lifecycle-demo.scaffold.json +4 -4
- package/xtendrmt/rmt-native-shell-runtime.d.ts +77 -0
- package/xtendrmt/rmt-native-shell-runtime.js +309 -0
- package/xtendrmt/rmt-node-ssr-adapter.d.ts +197 -0
- package/xtendrmt/rmt-node-ssr-adapter.js +1006 -0
- package/xtendrmt/rmt-php-ssr-adapter.php +976 -0
- package/xtendrmt/rmt-runtime.browser.js +32 -6
- package/xtendrmt/rmt-runtime.esm.js +32 -6
- package/xtendrmt/rmt-state-selector-runtime.d.ts +166 -0
- package/xtendrmt/rmt-state-selector-runtime.js +866 -0
- package/xtendrmt/rmt-surface-resource-graph-runtime.d.ts +224 -0
- package/xtendrmt/rmt-surface-resource-graph-runtime.js +932 -0
- package/xtendrmt/rmt-vnext-enterprise-mfe-demo.core.json +3 -0
- package/xtendrmt/rmt-vnext-reference-demo.core.json +3 -0
- package/xtendrmt/xtendrmt-bestcase-demo.core.json +3420 -372
- package/xtendrmt/xtendrmt-bestcase-demo.js +424 -8
- package/xtendrmt/xtendrmt-bestcase-demo.rmt +214 -6
|
@@ -1,8 +1,50 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
1
2
|
const path = require('path');
|
|
3
|
+
const { pathToFileURL } = require('url');
|
|
2
4
|
|
|
3
5
|
const RMT_VSCODE_BRIDGE_SCHEMA = 'xtend.rmt.editor.vscode-bridge.v1';
|
|
6
|
+
const RMT_VSCODE_PRIMITIVE_AUTHORING_EXPERIENCE_SCHEMA = 'xtend.rmt.editor.vscode-primitive-authoring-experience.v1';
|
|
7
|
+
const RMT_VSCODE_DX_SCHEMA = 'xtend.rmt.editor.vscode-dx.v1';
|
|
8
|
+
const RMT_VSCODE_TASKS_SCHEMA = 'xtend.rmt.editor.vscode-tasks.v1';
|
|
9
|
+
const RMT_VSCODE_LAUNCH_SCHEMA = 'xtend.rmt.editor.vscode-launch.v1';
|
|
4
10
|
const RMT_VSCODE_BRIDGE_WORKPACKAGE = 'WP-E14-12';
|
|
11
|
+
const RMT_VSCODE_PRIMITIVE_AUTHORING_WORKPACKAGE = 'RMT-VNEXT-PRIM-07';
|
|
12
|
+
const RMT_VSCODE_DX_WORKPACKAGE = 'RMT-VSCODE-DX-01';
|
|
5
13
|
const DEFAULT_SERVER_RELATIVE_PATH = '../../rmt-language-server/server.js';
|
|
14
|
+
const DEFAULT_XTEND_CLI_RELATIVE_PATH = '../../../xtend-builder/scaffold.js';
|
|
15
|
+
const DEFAULT_XTEND_CLI_ARGS = Object.freeze(['${workspaceFolder}/xtend-builder/scaffold.js']);
|
|
16
|
+
const TASKS_TEMPLATE_RELATIVE_PATH = 'templates/tasks.json';
|
|
17
|
+
const LAUNCH_TEMPLATE_RELATIVE_PATH = 'templates/launch.json';
|
|
18
|
+
const RMT_VNEXT_PRIMITIVE_FIX_ALL_KIND = 'source.fixAll.rmt.vnext.primitives';
|
|
19
|
+
const RMT_VNEXT_PRIMITIVE_KERNEL_BOUNDARY_COMMAND = 'xtend.rmt.vnext.extractKernelImport';
|
|
20
|
+
const RMT_VSCODE_PRIMITIVE_SAFE_FIX_ALL_COMMAND = 'xtendRmt.rmtVNext.applySafePrimitiveFixAll';
|
|
21
|
+
const RMT_VSCODE_PRIMITIVE_AUTHORING_COMMANDS = Object.freeze([
|
|
22
|
+
'xtendRmt.rmtVNext.showPrimitiveAuthoringApplyExperience',
|
|
23
|
+
'xtendRmt.rmtVNext.showCodeActionPreview',
|
|
24
|
+
'xtendRmt.rmtVNext.showCommandHandoff',
|
|
25
|
+
RMT_VSCODE_PRIMITIVE_SAFE_FIX_ALL_COMMAND
|
|
26
|
+
]);
|
|
27
|
+
const RMT_VSCODE_DX_COMMANDS = Object.freeze([
|
|
28
|
+
'xtendRmt.restartLanguageServer',
|
|
29
|
+
'xtendRmt.runActiveLint',
|
|
30
|
+
'xtendRmt.runWorkspaceLint',
|
|
31
|
+
'xtendRmt.runRmtBuildCheck',
|
|
32
|
+
'xtendRmt.runScaffoldVerify',
|
|
33
|
+
'xtendRmt.debugLanguageServer',
|
|
34
|
+
'xtendRmt.debugActiveLint',
|
|
35
|
+
'xtendRmt.debugActiveBuild',
|
|
36
|
+
'xtendRmt.openCliTerminal',
|
|
37
|
+
'xtendRmt.runCliCommandPalette',
|
|
38
|
+
'xtendRmt.runAgentRepairReport',
|
|
39
|
+
'xtendRmt.runRmtBuildWrite',
|
|
40
|
+
'xtendRmt.openTasksTemplate',
|
|
41
|
+
'xtendRmt.openLaunchTemplate'
|
|
42
|
+
]);
|
|
43
|
+
let activeLanguageClientState = null;
|
|
44
|
+
|
|
45
|
+
function toArray(value) {
|
|
46
|
+
return Array.isArray(value) ? value : [];
|
|
47
|
+
}
|
|
6
48
|
|
|
7
49
|
function resolveServerModule(context = {}, options = {}) {
|
|
8
50
|
if (options.serverModule) {
|
|
@@ -18,7 +60,7 @@ function createServerCommand(context = {}, options = {}) {
|
|
|
18
60
|
schema: RMT_VSCODE_BRIDGE_SCHEMA,
|
|
19
61
|
workpackage: RMT_VSCODE_BRIDGE_WORKPACKAGE,
|
|
20
62
|
command: options.command || 'node',
|
|
21
|
-
args: [resolveServerModule(context, options)],
|
|
63
|
+
args: options.args ? toArray(options.args) : [resolveServerModule(context, options)],
|
|
22
64
|
transport: 'stdio-json-rpc',
|
|
23
65
|
languageId: 'rmt',
|
|
24
66
|
sourceOfTruth: 'tools/rmt-language-server/server.js',
|
|
@@ -27,29 +69,1796 @@ function createServerCommand(context = {}, options = {}) {
|
|
|
27
69
|
};
|
|
28
70
|
}
|
|
29
71
|
|
|
72
|
+
function createVsCodeLanguageClientConfig(context = {}, options = {}) {
|
|
73
|
+
const serverCommand = createServerCommand(context, options);
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
77
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
78
|
+
clientId: 'xtendRmtLanguageServer',
|
|
79
|
+
clientName: 'XTendRMT Language Server',
|
|
80
|
+
languageId: 'rmt',
|
|
81
|
+
serverOptions: {
|
|
82
|
+
command: serverCommand.command,
|
|
83
|
+
args: toArray(options.args || serverCommand.args),
|
|
84
|
+
transport: 'stdio'
|
|
85
|
+
},
|
|
86
|
+
clientOptions: {
|
|
87
|
+
documentSelector: [
|
|
88
|
+
{ scheme: 'file', language: 'rmt' },
|
|
89
|
+
{ scheme: 'untitled', language: 'rmt' }
|
|
90
|
+
],
|
|
91
|
+
synchronize: {
|
|
92
|
+
configurationSection: 'xtendRmt'
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
sourceOfTruth: serverCommand.sourceOfTruth,
|
|
96
|
+
networkRequired: false,
|
|
97
|
+
kernelBoundary: serverCommand.kernelBoundary
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function createRuntimeLanguageClientServerOptions(languageClientModule = {}, serverOptions = {}) {
|
|
102
|
+
const runtimeOptions = { ...serverOptions };
|
|
103
|
+
|
|
104
|
+
if (runtimeOptions.transport === 'stdio') {
|
|
105
|
+
if (
|
|
106
|
+
languageClientModule.TransportKind &&
|
|
107
|
+
Object.prototype.hasOwnProperty.call(languageClientModule.TransportKind, 'stdio')
|
|
108
|
+
) {
|
|
109
|
+
runtimeOptions.transport = languageClientModule.TransportKind.stdio;
|
|
110
|
+
} else {
|
|
111
|
+
delete runtimeOptions.transport;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return runtimeOptions;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
function normalizeProblemMatcherSeverity(severity) {
|
|
120
|
+
return severity === 'hint' ? 'info' : severity;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function createVsCodeProblemMatcher() {
|
|
124
|
+
return {
|
|
125
|
+
schema: RMT_VSCODE_TASKS_SCHEMA,
|
|
126
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
127
|
+
name: 'xtend-rmt-lint',
|
|
128
|
+
owner: 'xtendRmt',
|
|
129
|
+
fileLocation: ['relative', '${workspaceFolder}'],
|
|
130
|
+
pattern: {
|
|
131
|
+
regexp: '^(error|warning|info)\\s+([A-Za-z0-9_.-]+)\\s+(.+):(\\d+):(\\d+)\\s+(.*)$',
|
|
132
|
+
severity: 1,
|
|
133
|
+
code: 2,
|
|
134
|
+
file: 3,
|
|
135
|
+
line: 4,
|
|
136
|
+
column: 5,
|
|
137
|
+
message: 6
|
|
138
|
+
},
|
|
139
|
+
severityPolicy: {
|
|
140
|
+
hint: normalizeProblemMatcherSeverity('hint')
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function taskPresentation() {
|
|
146
|
+
return {
|
|
147
|
+
reveal: 'always',
|
|
148
|
+
panel: 'shared',
|
|
149
|
+
clear: false,
|
|
150
|
+
group: 'xtend'
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function createXtendCliArgs(commandArgs = []) {
|
|
155
|
+
return ['${workspaceFolder}/xtend-builder/scaffold.js'].concat(commandArgs);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function createXtendCliWorkflowDefinitions(options = {}) {
|
|
159
|
+
const failOn = options.failOn || 'warning';
|
|
160
|
+
|
|
161
|
+
return [
|
|
162
|
+
{
|
|
163
|
+
id: 'open-terminal',
|
|
164
|
+
label: 'XTendRMT: Open XTend CLI Terminal',
|
|
165
|
+
description: 'Open a terminal at the resolved XTend CLI workspace root.',
|
|
166
|
+
args: [],
|
|
167
|
+
requiresFile: false
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: 'lint-active',
|
|
171
|
+
label: 'XTendRMT: Lint active RMT',
|
|
172
|
+
description: 'Run xt rmt lint for the active .rmt file.',
|
|
173
|
+
args: ['rmt', 'lint', '${file}', '--format', 'problem-matcher', '--fail-on', failOn],
|
|
174
|
+
requiresFile: true
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
id: 'lint-workspace',
|
|
178
|
+
label: 'XTendRMT: Lint workspace RMT',
|
|
179
|
+
description: 'Run xt rmt lint for the current workspace.',
|
|
180
|
+
args: ['rmt', 'lint', '${workspaceFolder}', '--format', 'problem-matcher', '--fail-on', failOn],
|
|
181
|
+
requiresFile: false
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
id: 'agent-repair-report',
|
|
185
|
+
label: 'XTendRMT: Agent repair report',
|
|
186
|
+
description: 'Render the AI-agent repair report for the active .rmt file.',
|
|
187
|
+
args: ['rmt', 'lint', '${file}', '--agent'],
|
|
188
|
+
requiresFile: true
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
id: 'rmt-build-check',
|
|
192
|
+
label: 'XTendRMT: RMT build check',
|
|
193
|
+
description: 'Compile the active RMT file in check mode.',
|
|
194
|
+
args: ['rmt-build', '--source', '${file}', '--check', '--json'],
|
|
195
|
+
requiresFile: true
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: 'rmt-build-write',
|
|
199
|
+
label: 'XTendRMT: RMT build write',
|
|
200
|
+
description: 'Compile the active RMT file and write generated artifacts.',
|
|
201
|
+
args: ['rmt-build', '--source', '${file}', '--write', '--json'],
|
|
202
|
+
requiresFile: true
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: 'scaffold-verify',
|
|
206
|
+
label: 'XTendRMT: Scaffold verify',
|
|
207
|
+
description: 'Run the local XTend scaffold verification plan.',
|
|
208
|
+
args: ['verify', '--json'],
|
|
209
|
+
requiresFile: false
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
id: 'scaffold-dry-run',
|
|
213
|
+
label: 'XTendRMT: Scaffold dry-run component',
|
|
214
|
+
description: 'Render a dry-run component scaffold plan.',
|
|
215
|
+
args: ['component-files', '--tag', 'x-example', '--profile', 'display', '--feature', 'state', '--json'],
|
|
216
|
+
requiresFile: false
|
|
217
|
+
}
|
|
218
|
+
];
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function createVsCodeTaskDefinitions(options = {}) {
|
|
222
|
+
const failOn = options.failOn || 'warning';
|
|
223
|
+
const presentation = taskPresentation();
|
|
224
|
+
const workflows = Object.fromEntries(createXtendCliWorkflowDefinitions({ failOn }).map((workflow) => [workflow.id, workflow]));
|
|
225
|
+
|
|
226
|
+
return {
|
|
227
|
+
schema: RMT_VSCODE_TASKS_SCHEMA,
|
|
228
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
229
|
+
taskType: 'xtendRmt',
|
|
230
|
+
problemMatcher: '$xtend-rmt-lint',
|
|
231
|
+
tasks: [
|
|
232
|
+
{
|
|
233
|
+
id: 'lint-active',
|
|
234
|
+
type: 'xtendRmt',
|
|
235
|
+
label: 'XTendRMT: Lint active RMT',
|
|
236
|
+
command: 'node',
|
|
237
|
+
args: createXtendCliArgs(workflows['lint-active'].args),
|
|
238
|
+
requiresFile: true,
|
|
239
|
+
problemMatcher: ['$xtend-rmt-lint'],
|
|
240
|
+
group: 'build',
|
|
241
|
+
presentation
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
id: 'lint-workspace',
|
|
245
|
+
type: 'xtendRmt',
|
|
246
|
+
label: 'XTendRMT: Lint workspace RMT',
|
|
247
|
+
command: 'node',
|
|
248
|
+
args: createXtendCliArgs(workflows['lint-workspace'].args),
|
|
249
|
+
requiresFile: false,
|
|
250
|
+
problemMatcher: ['$xtend-rmt-lint'],
|
|
251
|
+
group: 'build',
|
|
252
|
+
presentation
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
id: 'agent-repair-report',
|
|
256
|
+
type: 'xtendRmt',
|
|
257
|
+
label: 'XTendRMT: Agent repair report',
|
|
258
|
+
command: 'node',
|
|
259
|
+
args: createXtendCliArgs(workflows['agent-repair-report'].args),
|
|
260
|
+
requiresFile: true,
|
|
261
|
+
problemMatcher: [],
|
|
262
|
+
group: 'test',
|
|
263
|
+
presentation
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
id: 'rmt-build-check',
|
|
267
|
+
type: 'xtendRmt',
|
|
268
|
+
label: 'XTendRMT: RMT build check',
|
|
269
|
+
command: 'node',
|
|
270
|
+
args: createXtendCliArgs(workflows['rmt-build-check'].args),
|
|
271
|
+
requiresFile: true,
|
|
272
|
+
problemMatcher: [],
|
|
273
|
+
group: 'build',
|
|
274
|
+
presentation
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
id: 'rmt-build-write',
|
|
278
|
+
type: 'xtendRmt',
|
|
279
|
+
label: 'XTendRMT: RMT build write',
|
|
280
|
+
command: 'node',
|
|
281
|
+
args: createXtendCliArgs(workflows['rmt-build-write'].args),
|
|
282
|
+
requiresFile: true,
|
|
283
|
+
problemMatcher: [],
|
|
284
|
+
group: 'build',
|
|
285
|
+
presentation
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
id: 'scaffold-verify',
|
|
289
|
+
type: 'xtendRmt',
|
|
290
|
+
label: 'XTend: Scaffold verify',
|
|
291
|
+
command: 'node',
|
|
292
|
+
args: createXtendCliArgs(workflows['scaffold-verify'].args),
|
|
293
|
+
requiresFile: false,
|
|
294
|
+
problemMatcher: [],
|
|
295
|
+
group: 'test',
|
|
296
|
+
presentation
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
id: 'scaffold-dry-run',
|
|
300
|
+
type: 'xtendRmt',
|
|
301
|
+
label: 'XTend: Scaffold dry-run component',
|
|
302
|
+
command: 'node',
|
|
303
|
+
args: createXtendCliArgs(workflows['scaffold-dry-run'].args),
|
|
304
|
+
requiresFile: false,
|
|
305
|
+
problemMatcher: [],
|
|
306
|
+
group: 'test',
|
|
307
|
+
presentation
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
id: 'vnext-primitive-gate',
|
|
311
|
+
type: 'xtendRmt',
|
|
312
|
+
label: 'XTendRMT: vNext primitive gate',
|
|
313
|
+
command: 'npm',
|
|
314
|
+
args: ['run', 'test:rmt-vnext-primitives:report'],
|
|
315
|
+
problemMatcher: [],
|
|
316
|
+
group: 'test',
|
|
317
|
+
presentation
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
function createVsCodeLaunchConfigurations() {
|
|
324
|
+
return {
|
|
325
|
+
schema: RMT_VSCODE_LAUNCH_SCHEMA,
|
|
326
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
327
|
+
version: '0.2.0',
|
|
328
|
+
configurations: [
|
|
329
|
+
{
|
|
330
|
+
type: 'node',
|
|
331
|
+
request: 'launch',
|
|
332
|
+
name: 'XTendRMT: Debug Language Server',
|
|
333
|
+
program: '${workspaceFolder}/tools/rmt-language-server/server.js',
|
|
334
|
+
cwd: '${workspaceFolder}',
|
|
335
|
+
console: 'internalConsole',
|
|
336
|
+
outputCapture: 'std',
|
|
337
|
+
skipFiles: ['<node_internals>/**']
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
type: 'node',
|
|
341
|
+
request: 'launch',
|
|
342
|
+
name: 'XTendRMT: Debug Active RMT Lint',
|
|
343
|
+
program: '${workspaceFolder}/xtend-builder/scaffold.js',
|
|
344
|
+
args: ['rmt', 'lint', '${file}', '--json'],
|
|
345
|
+
cwd: '${workspaceFolder}',
|
|
346
|
+
console: 'internalConsole',
|
|
347
|
+
outputCapture: 'std',
|
|
348
|
+
skipFiles: ['<node_internals>/**']
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
type: 'node',
|
|
352
|
+
request: 'launch',
|
|
353
|
+
name: 'XTendRMT: Debug Active RMT Build',
|
|
354
|
+
program: '${workspaceFolder}/xtend-builder/scaffold.js',
|
|
355
|
+
args: ['rmt-build', '--source', '${file}', '--check', '--json'],
|
|
356
|
+
cwd: '${workspaceFolder}',
|
|
357
|
+
console: 'internalConsole',
|
|
358
|
+
outputCapture: 'std',
|
|
359
|
+
skipFiles: ['<node_internals>/**']
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
type: 'node',
|
|
363
|
+
request: 'launch',
|
|
364
|
+
name: 'XTendRMT: Debug Scaffold Verify',
|
|
365
|
+
program: '${workspaceFolder}/xtend-builder/scaffold.js',
|
|
366
|
+
args: ['verify', '--json'],
|
|
367
|
+
cwd: '${workspaceFolder}',
|
|
368
|
+
console: 'internalConsole',
|
|
369
|
+
outputCapture: 'std',
|
|
370
|
+
skipFiles: ['<node_internals>/**']
|
|
371
|
+
}
|
|
372
|
+
]
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
function getActionPreview(action = {}) {
|
|
377
|
+
return action.preview || (action.data && action.data.preview) || null;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
function getActionSafeFlag(action = {}) {
|
|
381
|
+
if (action.safe === false) return false;
|
|
382
|
+
if (action.data && action.data.safe === false) return false;
|
|
383
|
+
return true;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
function getActionDiagnosticCode(action = {}) {
|
|
387
|
+
return action.diagnosticCode || (action.data && action.data.diagnosticCode) || null;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
function classifyPrimitiveAuthoringAction(action = {}) {
|
|
391
|
+
const kind = action.kind || 'quickfix';
|
|
392
|
+
const command = action.command || null;
|
|
393
|
+
const preview = getActionPreview(action);
|
|
394
|
+
|
|
395
|
+
if (kind === RMT_VNEXT_PRIMITIVE_FIX_ALL_KIND) {
|
|
396
|
+
return 'fix-all';
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if (command && command.command === RMT_VNEXT_PRIMITIVE_KERNEL_BOUNDARY_COMMAND) {
|
|
400
|
+
return 'manual-command';
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
if (preview && preview.status === 'manual-command') {
|
|
404
|
+
return 'manual-command';
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
if (action.edit) {
|
|
408
|
+
return getActionSafeFlag(action) ? 'workspace-edit' : 'unsafe-edit';
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
return command ? 'command' : 'inspect';
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
function summarizePrimitiveAuthoringAction(action = {}, index = 0) {
|
|
415
|
+
const preview = getActionPreview(action);
|
|
416
|
+
const mode = classifyPrimitiveAuthoringAction(action);
|
|
417
|
+
|
|
418
|
+
return {
|
|
419
|
+
index,
|
|
420
|
+
title: action.title || `RMT vNext Primitive Action ${index + 1}`,
|
|
421
|
+
kind: action.kind || 'quickfix',
|
|
422
|
+
mode,
|
|
423
|
+
diagnosticCode: getActionDiagnosticCode(action),
|
|
424
|
+
safe: getActionSafeFlag(action),
|
|
425
|
+
hasEdit: !!action.edit,
|
|
426
|
+
hasCommand: !!action.command,
|
|
427
|
+
command: action.command ? action.command.command || null : null,
|
|
428
|
+
previewStatus: preview ? preview.status || null : null,
|
|
429
|
+
previewSchema: preview ? preview.schema || null : null,
|
|
430
|
+
changedLineCount: preview && Number.isInteger(preview.changedLineCount) ? preview.changedLineCount : 0,
|
|
431
|
+
firstChangedLine: preview && Number.isInteger(preview.firstChangedLine) ? preview.firstChangedLine : null,
|
|
432
|
+
previewAfter: preview ? toArray(preview.after).slice(0, 4) : [],
|
|
433
|
+
source: 'xtend-rmt-vscode-primitive-authoring'
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
function normalizeDocumentUri(uri) {
|
|
438
|
+
if (!uri) {
|
|
439
|
+
return 'untitled:rmt-vnext-active-document';
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
if (typeof uri === 'string') {
|
|
443
|
+
return uri;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
if (typeof uri.toString === 'function') {
|
|
447
|
+
return uri.toString();
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
return String(uri);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
function normalizeDocumentFilePath(document = {}) {
|
|
454
|
+
if (document.fileName) return document.fileName;
|
|
455
|
+
if (document.filePath) return document.filePath;
|
|
456
|
+
if (document.uri && document.uri.fsPath) return document.uri.fsPath;
|
|
457
|
+
return null;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
function normalizeTextDocument(document = {}) {
|
|
461
|
+
const text = typeof document.getText === 'function'
|
|
462
|
+
? document.getText()
|
|
463
|
+
: (typeof document.text === 'string' ? document.text : '');
|
|
464
|
+
const uri = normalizeDocumentUri(document.uri || (document.filePath ? pathToFileURL(document.filePath).toString() : null));
|
|
465
|
+
|
|
466
|
+
return {
|
|
467
|
+
uri,
|
|
468
|
+
filePath: normalizeDocumentFilePath(document),
|
|
469
|
+
languageId: document.languageId || 'rmt',
|
|
470
|
+
version: Number.isInteger(document.version) ? document.version : 0,
|
|
471
|
+
text
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
function resolveWorkspaceRoot(vscodeApi, document = {}, options = {}) {
|
|
476
|
+
if (options.rootDir) {
|
|
477
|
+
return path.resolve(options.rootDir);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
if (vscodeApi && vscodeApi.workspace && typeof vscodeApi.workspace.getWorkspaceFolder === 'function') {
|
|
481
|
+
const workspaceFolder = vscodeApi.workspace.getWorkspaceFolder(document.uri);
|
|
482
|
+
if (workspaceFolder && workspaceFolder.uri && workspaceFolder.uri.fsPath) {
|
|
483
|
+
return workspaceFolder.uri.fsPath;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
const filePath = normalizeDocumentFilePath(document);
|
|
488
|
+
return filePath ? path.dirname(filePath) : process.cwd();
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
function activeRmtTextDocument(vscodeApi, options = {}) {
|
|
492
|
+
if (options.document) {
|
|
493
|
+
return options.document;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
const activeEditor = vscodeApi && vscodeApi.window && vscodeApi.window.activeTextEditor;
|
|
497
|
+
return activeEditor ? activeEditor.document : null;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
function getWorkspaceFolder(vscodeApi, document = null) {
|
|
501
|
+
if (!vscodeApi || !vscodeApi.workspace) {
|
|
502
|
+
return null;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
if (document && document.uri && typeof vscodeApi.workspace.getWorkspaceFolder === 'function') {
|
|
506
|
+
const folder = vscodeApi.workspace.getWorkspaceFolder(document.uri);
|
|
507
|
+
if (folder) return folder;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
return Array.isArray(vscodeApi.workspace.workspaceFolders) && vscodeApi.workspace.workspaceFolders.length > 0
|
|
511
|
+
? vscodeApi.workspace.workspaceFolders[0]
|
|
512
|
+
: null;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
function normalizeWorkspaceFolderPath(folder) {
|
|
516
|
+
return folder && folder.uri && folder.uri.fsPath ? folder.uri.fsPath : process.cwd();
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
function pathExists(filePath, options = {}) {
|
|
520
|
+
if (!filePath) return false;
|
|
521
|
+
if (typeof options.fileExists === 'function') {
|
|
522
|
+
return !!options.fileExists(filePath);
|
|
523
|
+
}
|
|
524
|
+
return fs.existsSync(filePath);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
function isAbsoluteOrRelativePath(value) {
|
|
528
|
+
return typeof value === 'string' && (
|
|
529
|
+
path.isAbsolute(value) ||
|
|
530
|
+
value.startsWith('./') ||
|
|
531
|
+
value.startsWith('../') ||
|
|
532
|
+
value.includes(path.sep)
|
|
533
|
+
);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
function resolveWorkspacePath(value, workspaceFolderPath) {
|
|
537
|
+
if (!value) return '';
|
|
538
|
+
const normalized = String(value);
|
|
539
|
+
return path.isAbsolute(normalized) ? normalized : path.resolve(workspaceFolderPath, normalized);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
function shellQuote(value) {
|
|
543
|
+
const text = String(value || '');
|
|
544
|
+
if (/^[A-Za-z0-9_./:@%+=,-]+$/.test(text)) {
|
|
545
|
+
return text;
|
|
546
|
+
}
|
|
547
|
+
return `'${text.replace(/'/g, "'\\''")}'`;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
function normalizeExecutablePath(filePath) {
|
|
551
|
+
if (process.platform === 'win32' && filePath && !/\.(cmd|exe|bat)$/i.test(filePath)) {
|
|
552
|
+
return `${filePath}.cmd`;
|
|
553
|
+
}
|
|
554
|
+
return filePath;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
function substituteVariables(value, variables = {}) {
|
|
558
|
+
if (Array.isArray(value)) {
|
|
559
|
+
return value.map((entry) => substituteVariables(entry, variables));
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
if (value && typeof value === 'object') {
|
|
563
|
+
return Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, substituteVariables(entry, variables)]));
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
if (typeof value !== 'string') {
|
|
567
|
+
return value;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
return value
|
|
571
|
+
.replace(/\$\{workspaceFolder\}/g, variables.workspaceFolder || '')
|
|
572
|
+
.replace(/\$\{file\}/g, variables.file || '');
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
function getConfigurationValue(vscodeApi, key, fallback) {
|
|
576
|
+
const workspace = vscodeApi && vscodeApi.workspace;
|
|
577
|
+
const configuration = workspace && typeof workspace.getConfiguration === 'function'
|
|
578
|
+
? workspace.getConfiguration('xtendRmt')
|
|
579
|
+
: null;
|
|
580
|
+
|
|
581
|
+
if (configuration && typeof configuration.get === 'function') {
|
|
582
|
+
const configured = configuration.get(key);
|
|
583
|
+
if (configured !== undefined && configured !== null) {
|
|
584
|
+
return configured;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
return fallback;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
function getWorkspaceContext(vscodeApi, options = {}) {
|
|
592
|
+
const document = activeRmtTextDocument(vscodeApi, options);
|
|
593
|
+
const workspaceFolder = getWorkspaceFolder(vscodeApi, document);
|
|
594
|
+
const workspaceFolderPath = path.resolve(options.workspaceFolderPath || normalizeWorkspaceFolderPath(workspaceFolder));
|
|
595
|
+
const activeFile = normalizeDocumentFilePath(document || {}) || options.file || '';
|
|
596
|
+
|
|
597
|
+
return {
|
|
598
|
+
document,
|
|
599
|
+
workspaceFolder,
|
|
600
|
+
workspaceFolderPath,
|
|
601
|
+
activeFile,
|
|
602
|
+
variables: {
|
|
603
|
+
workspaceFolder: workspaceFolderPath,
|
|
604
|
+
file: activeFile
|
|
605
|
+
}
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
function isActiveRmtFile(activeFile, document = {}) {
|
|
610
|
+
if (document && document.languageId === 'rmt') return true;
|
|
611
|
+
return typeof activeFile === 'string' && activeFile.toLowerCase().endsWith('.rmt');
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
function createCliCandidate(input = {}, workspace = {}, options = {}) {
|
|
615
|
+
const command = substituteVariables(input.command || 'node', workspace.variables || {});
|
|
616
|
+
const args = substituteVariables(toArray(input.args), workspace.variables || {});
|
|
617
|
+
const executablePath = input.executablePath
|
|
618
|
+
? resolveWorkspacePath(substituteVariables(input.executablePath, workspace.variables || {}), workspace.workspaceFolderPath)
|
|
619
|
+
: null;
|
|
620
|
+
const nodeProgramPath = input.nodeProgramPath
|
|
621
|
+
? resolveWorkspacePath(substituteVariables(input.nodeProgramPath, workspace.variables || {}), workspace.workspaceFolderPath)
|
|
622
|
+
: (command === 'node' && args[0] && isAbsoluteOrRelativePath(args[0])
|
|
623
|
+
? resolveWorkspacePath(args[0], workspace.workspaceFolderPath)
|
|
624
|
+
: null);
|
|
625
|
+
const probePath = input.probePath
|
|
626
|
+
? resolveWorkspacePath(substituteVariables(input.probePath, workspace.variables || {}), workspace.workspaceFolderPath)
|
|
627
|
+
: (nodeProgramPath || executablePath);
|
|
628
|
+
const exists = input.unverified === true ? true : pathExists(probePath, options);
|
|
629
|
+
|
|
630
|
+
return {
|
|
631
|
+
id: input.id,
|
|
632
|
+
label: input.label,
|
|
633
|
+
source: input.source,
|
|
634
|
+
command,
|
|
635
|
+
args,
|
|
636
|
+
exists,
|
|
637
|
+
executablePath,
|
|
638
|
+
nodeProgramPath,
|
|
639
|
+
probePath,
|
|
640
|
+
debugSupported: !!nodeProgramPath && exists
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
function createXtendCliCandidates(vscodeApi, context = {}, options = {}) {
|
|
645
|
+
const workspace = getWorkspaceContext(vscodeApi, options);
|
|
646
|
+
const configuredPath = substituteVariables(getConfigurationValue(vscodeApi, 'xtendCli.path', options.configuredPath || ''), workspace.variables);
|
|
647
|
+
const configuredCommand = options.command || getConfigurationValue(vscodeApi, 'xtendCli.command', 'node');
|
|
648
|
+
const configuredArgs = options.args || getConfigurationValue(vscodeApi, 'xtendCli.args', DEFAULT_XTEND_CLI_ARGS.slice());
|
|
649
|
+
const defaultConfigured = configuredCommand === 'node' &&
|
|
650
|
+
JSON.stringify(toArray(configuredArgs)) === JSON.stringify(DEFAULT_XTEND_CLI_ARGS);
|
|
651
|
+
const workspaceScaffold = path.join(workspace.workspaceFolderPath, 'xtend-builder', 'scaffold.js');
|
|
652
|
+
const binXt = normalizeExecutablePath(path.join(workspace.workspaceFolderPath, 'node_modules', '.bin', 'xt'));
|
|
653
|
+
const packageScaffold = path.join(workspace.workspaceFolderPath, 'node_modules', '@ccslabs', 'xtend-cli', 'scaffold.js');
|
|
654
|
+
const extensionFallback = path.resolve(context.extensionPath || __dirname, DEFAULT_XTEND_CLI_RELATIVE_PATH);
|
|
655
|
+
const candidates = [];
|
|
656
|
+
|
|
657
|
+
if (configuredPath) {
|
|
658
|
+
const absoluteConfigured = resolveWorkspacePath(configuredPath, workspace.workspaceFolderPath);
|
|
659
|
+
const configuredIsNodeProgram = absoluteConfigured.endsWith('.js');
|
|
660
|
+
candidates.push(createCliCandidate({
|
|
661
|
+
id: 'configured-path',
|
|
662
|
+
label: 'Configured XTend CLI path',
|
|
663
|
+
source: 'setting:xtendRmt.xtendCli.path',
|
|
664
|
+
command: configuredIsNodeProgram ? 'node' : absoluteConfigured,
|
|
665
|
+
args: configuredIsNodeProgram ? [absoluteConfigured] : [],
|
|
666
|
+
probePath: absoluteConfigured,
|
|
667
|
+
nodeProgramPath: configuredIsNodeProgram ? absoluteConfigured : null,
|
|
668
|
+
executablePath: configuredIsNodeProgram ? null : absoluteConfigured
|
|
669
|
+
}, workspace, options));
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
if (!defaultConfigured) {
|
|
673
|
+
const configuredNodeProgram = configuredCommand === 'node' && toArray(configuredArgs)[0] && isAbsoluteOrRelativePath(toArray(configuredArgs)[0])
|
|
674
|
+
? resolveWorkspacePath(substituteVariables(toArray(configuredArgs)[0], workspace.variables), workspace.workspaceFolderPath)
|
|
675
|
+
: null;
|
|
676
|
+
candidates.push(createCliCandidate({
|
|
677
|
+
id: 'configured-command',
|
|
678
|
+
label: 'Configured XTend CLI command',
|
|
679
|
+
source: 'settings:xtendRmt.xtendCli.command,args',
|
|
680
|
+
command: configuredCommand,
|
|
681
|
+
args: configuredArgs,
|
|
682
|
+
probePath: configuredNodeProgram,
|
|
683
|
+
nodeProgramPath: configuredNodeProgram,
|
|
684
|
+
unverified: !configuredNodeProgram
|
|
685
|
+
}, workspace, options));
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
candidates.push(createCliCandidate({
|
|
689
|
+
id: 'workspace-scaffold',
|
|
690
|
+
label: 'Workspace xtend-builder scaffold',
|
|
691
|
+
source: 'workspace',
|
|
692
|
+
command: 'node',
|
|
693
|
+
args: [workspaceScaffold],
|
|
694
|
+
probePath: workspaceScaffold,
|
|
695
|
+
nodeProgramPath: workspaceScaffold
|
|
696
|
+
}, workspace, options));
|
|
697
|
+
|
|
698
|
+
candidates.push(createCliCandidate({
|
|
699
|
+
id: 'workspace-bin',
|
|
700
|
+
label: 'Workspace node_modules/.bin/xt',
|
|
701
|
+
source: 'workspace-node-modules-bin',
|
|
702
|
+
command: binXt,
|
|
703
|
+
args: [],
|
|
704
|
+
probePath: binXt,
|
|
705
|
+
executablePath: binXt
|
|
706
|
+
}, workspace, options));
|
|
707
|
+
|
|
708
|
+
candidates.push(createCliCandidate({
|
|
709
|
+
id: 'scoped-package',
|
|
710
|
+
label: 'Workspace @ccslabs/xtend-cli scaffold',
|
|
711
|
+
source: 'workspace-node-modules-package',
|
|
712
|
+
command: 'node',
|
|
713
|
+
args: [packageScaffold],
|
|
714
|
+
probePath: packageScaffold,
|
|
715
|
+
nodeProgramPath: packageScaffold
|
|
716
|
+
}, workspace, options));
|
|
717
|
+
|
|
718
|
+
candidates.push(createCliCandidate({
|
|
719
|
+
id: 'extension-fallback',
|
|
720
|
+
label: 'Extension development fallback scaffold',
|
|
721
|
+
source: 'extension-development-fallback',
|
|
722
|
+
command: 'node',
|
|
723
|
+
args: [extensionFallback],
|
|
724
|
+
probePath: extensionFallback,
|
|
725
|
+
nodeProgramPath: extensionFallback
|
|
726
|
+
}, workspace, options));
|
|
727
|
+
|
|
728
|
+
const order = ['workspace-scaffold', 'workspace-bin', 'scoped-package', 'configured-path', 'configured-command', 'extension-fallback'];
|
|
729
|
+
candidates.sort((left, right) => order.indexOf(left.id) - order.indexOf(right.id));
|
|
730
|
+
|
|
731
|
+
return {
|
|
732
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
733
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
734
|
+
...workspace,
|
|
735
|
+
candidates
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
function resolveXtendCliInvocation(vscodeApi, context = {}, options = {}) {
|
|
740
|
+
const resolution = createXtendCliCandidates(vscodeApi, context, options);
|
|
741
|
+
const selected = resolution.candidates.find((candidate) => {
|
|
742
|
+
if (!candidate.exists) return false;
|
|
743
|
+
if (options.requireNodeProgram && !candidate.debugSupported) return false;
|
|
744
|
+
return true;
|
|
745
|
+
}) || null;
|
|
746
|
+
|
|
747
|
+
return {
|
|
748
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
749
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
750
|
+
status: selected ? 'resolved' : 'missing',
|
|
751
|
+
ok: !!selected,
|
|
752
|
+
command: selected ? selected.command : 'node',
|
|
753
|
+
args: selected ? selected.args : [],
|
|
754
|
+
source: selected ? selected.source : null,
|
|
755
|
+
selected,
|
|
756
|
+
candidates: resolution.candidates,
|
|
757
|
+
workspaceFolder: resolution.workspaceFolder,
|
|
758
|
+
workspaceFolderPath: resolution.workspaceFolderPath,
|
|
759
|
+
activeFile: resolution.activeFile,
|
|
760
|
+
document: resolution.document,
|
|
761
|
+
requiresNodeProgram: !!options.requireNodeProgram,
|
|
762
|
+
nodeProgramPath: selected ? selected.nodeProgramPath : null
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
function resolveLanguageServerInvocation(vscodeApi, context = {}, options = {}) {
|
|
767
|
+
const document = activeRmtTextDocument(vscodeApi, options);
|
|
768
|
+
const workspaceFolder = getWorkspaceFolder(vscodeApi, document);
|
|
769
|
+
const workspaceFolderPath = normalizeWorkspaceFolderPath(workspaceFolder);
|
|
770
|
+
const fallbackServerPath = resolveServerModule(context, options);
|
|
771
|
+
const command = options.command || getConfigurationValue(vscodeApi, 'languageServer.command', 'node');
|
|
772
|
+
const configuredArgs = options.args || getConfigurationValue(vscodeApi, 'languageServer.args', ['${workspaceFolder}/tools/rmt-language-server/server.js']);
|
|
773
|
+
const args = substituteVariables(toArray(configuredArgs), {
|
|
774
|
+
workspaceFolder: workspaceFolderPath,
|
|
775
|
+
file: normalizeDocumentFilePath(document || {}) || ''
|
|
776
|
+
});
|
|
777
|
+
|
|
778
|
+
return {
|
|
779
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
780
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
781
|
+
command,
|
|
782
|
+
args: args.length > 0 ? args : [fallbackServerPath],
|
|
783
|
+
workspaceFolder,
|
|
784
|
+
workspaceFolderPath,
|
|
785
|
+
fallbackServerPath
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
function resolveTaskDefinition(taskId, options = {}) {
|
|
790
|
+
const tasks = createVsCodeTaskDefinitions(options).tasks;
|
|
791
|
+
return tasks.find((task) => task.id === taskId || task.label === taskId) || null;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
function commandArgsFromTaskDefinition(definition = {}) {
|
|
795
|
+
const args = toArray(definition.args);
|
|
796
|
+
return definition.command === 'node' && args[0] === '${workspaceFolder}/xtend-builder/scaffold.js'
|
|
797
|
+
? args.slice(1)
|
|
798
|
+
: args;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
function createCliUnavailableResult(cli = {}, options = {}) {
|
|
802
|
+
return {
|
|
803
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
804
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
805
|
+
status: 'missing-cli',
|
|
806
|
+
ok: false,
|
|
807
|
+
reason: options.reason || 'xtend-cli-not-found',
|
|
808
|
+
message: 'XTend CLI konnte nicht im Workspace gefunden werden. Installiere @ccslabs/xtend-cli oder setze xtendRmt.xtendCli.path.',
|
|
809
|
+
candidates: toArray(cli.candidates).map((candidate) => ({
|
|
810
|
+
id: candidate.id,
|
|
811
|
+
label: candidate.label,
|
|
812
|
+
probePath: candidate.probePath,
|
|
813
|
+
exists: candidate.exists,
|
|
814
|
+
debugSupported: candidate.debugSupported
|
|
815
|
+
}))
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
function createActiveFileUnavailableResult(options = {}) {
|
|
820
|
+
return {
|
|
821
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
822
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
823
|
+
status: 'missing-active-rmt',
|
|
824
|
+
ok: false,
|
|
825
|
+
reason: 'active-rmt-file-required',
|
|
826
|
+
message: 'Dieser XTendRMT Befehl braucht eine aktive .rmt Datei.',
|
|
827
|
+
taskId: options.taskId || null
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
function showDxProblem(vscodeApi, output, result = {}) {
|
|
832
|
+
const message = result.message || result.reason || 'XTendRMT command failed.';
|
|
833
|
+
|
|
834
|
+
if (output && typeof output.appendLine === 'function') {
|
|
835
|
+
output.appendLine(message);
|
|
836
|
+
toArray(result.candidates).forEach((candidate) => {
|
|
837
|
+
output.appendLine(`- ${candidate.exists ? 'found' : 'missing'} ${candidate.id}: ${candidate.probePath || candidate.label}`);
|
|
838
|
+
});
|
|
839
|
+
if (typeof output.show === 'function') output.show(true);
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
if (vscodeApi && vscodeApi.window && typeof vscodeApi.window.showErrorMessage === 'function') {
|
|
843
|
+
vscodeApi.window.showErrorMessage(message);
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
return result;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
function toVsCodeTask(vscodeApi, context = {}, definition = {}, options = {}) {
|
|
850
|
+
if (!vscodeApi || !vscodeApi.Task || !vscodeApi.ShellExecution) {
|
|
851
|
+
return {
|
|
852
|
+
schema: RMT_VSCODE_TASKS_SCHEMA,
|
|
853
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
854
|
+
status: 'dry-run',
|
|
855
|
+
ok: true,
|
|
856
|
+
definition
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
const workspaceContext = getWorkspaceContext(vscodeApi, options);
|
|
861
|
+
const workspaceFolder = workspaceContext.workspaceFolder;
|
|
862
|
+
const workspaceFolderPath = workspaceContext.workspaceFolderPath;
|
|
863
|
+
const activeFile = workspaceContext.activeFile;
|
|
864
|
+
const cli = resolveXtendCliInvocation(vscodeApi, context, options);
|
|
865
|
+
if (!cli.ok) {
|
|
866
|
+
return createCliUnavailableResult(cli);
|
|
867
|
+
}
|
|
868
|
+
const variables = {
|
|
869
|
+
workspaceFolder: workspaceFolderPath,
|
|
870
|
+
file: activeFile
|
|
871
|
+
};
|
|
872
|
+
const usesDefaultXtendCli = definition.command === 'node' && toArray(definition.args)[0] === '${workspaceFolder}/xtend-builder/scaffold.js';
|
|
873
|
+
const command = substituteVariables(usesDefaultXtendCli ? cli.command : (definition.command || cli.command), variables);
|
|
874
|
+
const rawArgs = usesDefaultXtendCli ? cli.args.concat(commandArgsFromTaskDefinition(definition)) : toArray(definition.args);
|
|
875
|
+
const args = substituteVariables(rawArgs, variables);
|
|
876
|
+
const scope = workspaceFolder || vscodeApi.TaskScope.Workspace;
|
|
877
|
+
const task = new vscodeApi.Task(
|
|
878
|
+
{ type: 'xtendRmt', task: definition.id },
|
|
879
|
+
scope,
|
|
880
|
+
definition.label,
|
|
881
|
+
'XTendRMT',
|
|
882
|
+
new vscodeApi.ShellExecution(command, args, { cwd: workspaceFolderPath }),
|
|
883
|
+
toArray(definition.problemMatcher)
|
|
884
|
+
);
|
|
885
|
+
|
|
886
|
+
if (definition.group === 'build') task.group = vscodeApi.TaskGroup.Build;
|
|
887
|
+
if (definition.group === 'test') task.group = vscodeApi.TaskGroup.Test;
|
|
888
|
+
task.presentationOptions = definition.presentation || taskPresentation();
|
|
889
|
+
return task;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
function createVsCodeTaskProvider(vscodeApi, context = {}, options = {}) {
|
|
893
|
+
return {
|
|
894
|
+
provideTasks() {
|
|
895
|
+
return createVsCodeTaskDefinitions(options).tasks
|
|
896
|
+
.map((definition) => toVsCodeTask(vscodeApi, context, definition, options))
|
|
897
|
+
.filter((task) => task && task.ok !== false && task.status !== 'dry-run');
|
|
898
|
+
},
|
|
899
|
+
resolveTask(task) {
|
|
900
|
+
const taskId = task && task.definition ? task.definition.task : null;
|
|
901
|
+
const definition = resolveTaskDefinition(taskId, options);
|
|
902
|
+
const resolved = definition ? toVsCodeTask(vscodeApi, context, definition, options) : undefined;
|
|
903
|
+
return resolved && resolved.ok !== false && resolved.status !== 'dry-run' ? resolved : undefined;
|
|
904
|
+
}
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
function runXtendRmtTask(vscodeApi, context = {}, taskId, options = {}) {
|
|
909
|
+
const definition = resolveTaskDefinition(taskId, {
|
|
910
|
+
failOn: options.failOn || getConfigurationValue(vscodeApi, 'tasks.defaultFailOn', 'warning')
|
|
911
|
+
});
|
|
912
|
+
|
|
913
|
+
if (!definition) {
|
|
914
|
+
return {
|
|
915
|
+
schema: RMT_VSCODE_TASKS_SCHEMA,
|
|
916
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
917
|
+
status: 'not-found',
|
|
918
|
+
ok: false,
|
|
919
|
+
taskId
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
const task = toVsCodeTask(vscodeApi, context, definition, options);
|
|
924
|
+
|
|
925
|
+
const activeDocument = activeRmtTextDocument(vscodeApi, options) || {};
|
|
926
|
+
const activeFile = normalizeDocumentFilePath(activeDocument) || options.file || '';
|
|
927
|
+
if (vscodeApi && definition.requiresFile && !isActiveRmtFile(activeFile, activeDocument)) {
|
|
928
|
+
const activeResult = createActiveFileUnavailableResult({ taskId: definition.id });
|
|
929
|
+
return showDxProblem(vscodeApi, options.output, activeResult);
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
if (task && task.ok === false) {
|
|
933
|
+
return showDxProblem(vscodeApi, options.output, task);
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
if (vscodeApi && vscodeApi.tasks && typeof vscodeApi.tasks.executeTask === 'function') {
|
|
937
|
+
const execution = vscodeApi.tasks.executeTask(task);
|
|
938
|
+
return {
|
|
939
|
+
schema: RMT_VSCODE_TASKS_SCHEMA,
|
|
940
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
941
|
+
status: 'started',
|
|
942
|
+
ok: true,
|
|
943
|
+
taskId: definition.id,
|
|
944
|
+
label: definition.label,
|
|
945
|
+
execution
|
|
946
|
+
};
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
return {
|
|
950
|
+
schema: RMT_VSCODE_TASKS_SCHEMA,
|
|
951
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
952
|
+
status: 'dry-run',
|
|
953
|
+
ok: true,
|
|
954
|
+
taskId: definition.id,
|
|
955
|
+
label: definition.label,
|
|
956
|
+
task
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
function createTerminalCommandLine(cli = {}, commandArgs = [], variables = {}) {
|
|
961
|
+
const args = cli.args.concat(substituteVariables(commandArgs, variables));
|
|
962
|
+
return [cli.command].concat(args).map(shellQuote).join(' ');
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
function openXtendCliTerminal(vscodeApi, context = {}, options = {}) {
|
|
966
|
+
const cli = resolveXtendCliInvocation(vscodeApi, context, options);
|
|
967
|
+
|
|
968
|
+
if (!cli.ok) {
|
|
969
|
+
return showDxProblem(vscodeApi, options.output, createCliUnavailableResult(cli));
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
if (!vscodeApi || !vscodeApi.window || typeof vscodeApi.window.createTerminal !== 'function') {
|
|
973
|
+
return {
|
|
974
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
975
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
976
|
+
status: 'dry-run',
|
|
977
|
+
ok: true,
|
|
978
|
+
cli
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
const terminal = vscodeApi.window.createTerminal({
|
|
983
|
+
name: options.name || 'XTendRMT CLI',
|
|
984
|
+
cwd: cli.workspaceFolderPath
|
|
985
|
+
});
|
|
986
|
+
if (typeof terminal.show === 'function') terminal.show(true);
|
|
987
|
+
|
|
988
|
+
return {
|
|
989
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
990
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
991
|
+
status: 'opened',
|
|
992
|
+
ok: true,
|
|
993
|
+
cli,
|
|
994
|
+
terminal
|
|
995
|
+
};
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
function runXtendCliInTerminal(vscodeApi, context = {}, workflowId, options = {}) {
|
|
999
|
+
const failOn = options.failOn || getConfigurationValue(vscodeApi, 'tasks.defaultFailOn', 'warning');
|
|
1000
|
+
const workflow = createXtendCliWorkflowDefinitions({ failOn }).find((entry) => entry.id === workflowId);
|
|
1001
|
+
|
|
1002
|
+
if (!workflow) {
|
|
1003
|
+
return {
|
|
1004
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
1005
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1006
|
+
status: 'not-found',
|
|
1007
|
+
ok: false,
|
|
1008
|
+
workflowId
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
const cli = resolveXtendCliInvocation(vscodeApi, context, options);
|
|
1013
|
+
if (!cli.ok) {
|
|
1014
|
+
return showDxProblem(vscodeApi, options.output, createCliUnavailableResult(cli));
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
if (workflow.requiresFile && !isActiveRmtFile(cli.activeFile, cli.document || {})) {
|
|
1018
|
+
return showDxProblem(vscodeApi, options.output, createActiveFileUnavailableResult({ taskId: workflow.id }));
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
if (!vscodeApi || !vscodeApi.window || typeof vscodeApi.window.createTerminal !== 'function') {
|
|
1022
|
+
return {
|
|
1023
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
1024
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1025
|
+
status: 'dry-run',
|
|
1026
|
+
ok: true,
|
|
1027
|
+
workflowId,
|
|
1028
|
+
commandLine: createTerminalCommandLine(cli, workflow.args, {
|
|
1029
|
+
workspaceFolder: cli.workspaceFolderPath,
|
|
1030
|
+
file: cli.activeFile
|
|
1031
|
+
}),
|
|
1032
|
+
cli
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
const terminal = vscodeApi.window.createTerminal({
|
|
1037
|
+
name: 'XTendRMT CLI',
|
|
1038
|
+
cwd: cli.workspaceFolderPath
|
|
1039
|
+
});
|
|
1040
|
+
const commandLine = createTerminalCommandLine(cli, workflow.args, {
|
|
1041
|
+
workspaceFolder: cli.workspaceFolderPath,
|
|
1042
|
+
file: cli.activeFile
|
|
1043
|
+
});
|
|
1044
|
+
|
|
1045
|
+
if (typeof terminal.show === 'function') terminal.show(true);
|
|
1046
|
+
if (typeof terminal.sendText === 'function') terminal.sendText(commandLine);
|
|
1047
|
+
|
|
1048
|
+
return {
|
|
1049
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
1050
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1051
|
+
status: 'started',
|
|
1052
|
+
ok: true,
|
|
1053
|
+
workflowId,
|
|
1054
|
+
commandLine,
|
|
1055
|
+
cli,
|
|
1056
|
+
terminal
|
|
1057
|
+
};
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
async function showXtendCliCommandPalette(vscodeApi, context = {}, options = {}) {
|
|
1061
|
+
const failOn = options.failOn || getConfigurationValue(vscodeApi, 'tasks.defaultFailOn', 'warning');
|
|
1062
|
+
const workflows = createXtendCliWorkflowDefinitions({ failOn });
|
|
1063
|
+
const items = workflows.map((workflow) => ({
|
|
1064
|
+
label: workflow.label,
|
|
1065
|
+
description: workflow.description,
|
|
1066
|
+
workflow
|
|
1067
|
+
})).concat({
|
|
1068
|
+
label: 'XTendRMT: Custom XTend CLI command',
|
|
1069
|
+
description: 'Run a custom command after the resolved XTend CLI.',
|
|
1070
|
+
workflow: { id: 'custom', args: [], requiresFile: false }
|
|
1071
|
+
});
|
|
1072
|
+
|
|
1073
|
+
if (!vscodeApi || !vscodeApi.window || typeof vscodeApi.window.showQuickPick !== 'function') {
|
|
1074
|
+
return {
|
|
1075
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
1076
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1077
|
+
status: 'dry-run',
|
|
1078
|
+
ok: true,
|
|
1079
|
+
items: items.map((item) => item.workflow.id)
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
const selected = await vscodeApi.window.showQuickPick(items, {
|
|
1084
|
+
placeHolder: 'XTend CLI Workflow im VS Code Terminal starten'
|
|
1085
|
+
});
|
|
1086
|
+
if (!selected) {
|
|
1087
|
+
return {
|
|
1088
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
1089
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1090
|
+
status: 'cancelled',
|
|
1091
|
+
ok: true
|
|
1092
|
+
};
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
if (selected.workflow.id === 'open-terminal') {
|
|
1096
|
+
return openXtendCliTerminal(vscodeApi, context, options);
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
if (selected.workflow.id === 'custom') {
|
|
1100
|
+
const value = typeof vscodeApi.window.showInputBox === 'function'
|
|
1101
|
+
? await vscodeApi.window.showInputBox({
|
|
1102
|
+
prompt: 'XTend CLI Argumente, z.B. rmt lint app.rmt --json',
|
|
1103
|
+
placeHolder: 'rmt lint app.rmt --json'
|
|
1104
|
+
})
|
|
1105
|
+
: '';
|
|
1106
|
+
if (!value) {
|
|
1107
|
+
return {
|
|
1108
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
1109
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1110
|
+
status: 'cancelled',
|
|
1111
|
+
ok: true
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
const cli = resolveXtendCliInvocation(vscodeApi, context, options);
|
|
1115
|
+
if (!cli.ok) {
|
|
1116
|
+
return showDxProblem(vscodeApi, options.output, createCliUnavailableResult(cli));
|
|
1117
|
+
}
|
|
1118
|
+
const terminal = vscodeApi.window.createTerminal({
|
|
1119
|
+
name: 'XTendRMT CLI',
|
|
1120
|
+
cwd: cli.workspaceFolderPath
|
|
1121
|
+
});
|
|
1122
|
+
const commandLine = [cli.command].concat(cli.args).map(shellQuote).join(' ') + ` ${value}`;
|
|
1123
|
+
terminal.show(true);
|
|
1124
|
+
terminal.sendText(commandLine);
|
|
1125
|
+
return {
|
|
1126
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
1127
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1128
|
+
status: 'started',
|
|
1129
|
+
ok: true,
|
|
1130
|
+
workflowId: 'custom',
|
|
1131
|
+
commandLine,
|
|
1132
|
+
cli,
|
|
1133
|
+
terminal
|
|
1134
|
+
};
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
return runXtendCliInTerminal(vscodeApi, context, selected.workflow.id, options);
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
function resolveDebugConfiguration(debugId) {
|
|
1141
|
+
const launch = createVsCodeLaunchConfigurations();
|
|
1142
|
+
return launch.configurations.find((config) => config.name === debugId || config.name.toLowerCase().includes(String(debugId).toLowerCase())) || null;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
function startXtendRmtDebugSession(vscodeApi, context = {}, debugId, options = {}) {
|
|
1146
|
+
const configuration = resolveDebugConfiguration(debugId);
|
|
1147
|
+
|
|
1148
|
+
if (!configuration) {
|
|
1149
|
+
return {
|
|
1150
|
+
schema: RMT_VSCODE_LAUNCH_SCHEMA,
|
|
1151
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1152
|
+
status: 'not-found',
|
|
1153
|
+
ok: false,
|
|
1154
|
+
debugId
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
const workspaceContext = getWorkspaceContext(vscodeApi, options);
|
|
1159
|
+
const workspaceFolder = workspaceContext.workspaceFolder;
|
|
1160
|
+
const workspaceFolderPath = workspaceContext.workspaceFolderPath;
|
|
1161
|
+
const activeFile = workspaceContext.activeFile;
|
|
1162
|
+
const resolved = substituteVariables(configuration, {
|
|
1163
|
+
workspaceFolder: workspaceFolderPath,
|
|
1164
|
+
file: activeFile
|
|
1165
|
+
});
|
|
1166
|
+
const needsXtendCli = resolved.program && String(resolved.program).includes('xtend-builder/scaffold.js');
|
|
1167
|
+
|
|
1168
|
+
if (needsXtendCli) {
|
|
1169
|
+
const cli = resolveXtendCliInvocation(vscodeApi, context, {
|
|
1170
|
+
...options,
|
|
1171
|
+
requireNodeProgram: true
|
|
1172
|
+
});
|
|
1173
|
+
|
|
1174
|
+
if (!cli.ok) {
|
|
1175
|
+
return showDxProblem(vscodeApi, options.output, createCliUnavailableResult(cli, {
|
|
1176
|
+
reason: 'debug-node-cli-not-found'
|
|
1177
|
+
}));
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
if (/Active RMT/.test(resolved.name || '') && !isActiveRmtFile(cli.activeFile, cli.document || {})) {
|
|
1181
|
+
return showDxProblem(vscodeApi, options.output, createActiveFileUnavailableResult({ taskId: resolved.name }));
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
resolved.program = cli.nodeProgramPath;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
if (vscodeApi && vscodeApi.debug && typeof vscodeApi.debug.startDebugging === 'function') {
|
|
1188
|
+
const started = vscodeApi.debug.startDebugging(workspaceFolder, resolved);
|
|
1189
|
+
return {
|
|
1190
|
+
schema: RMT_VSCODE_LAUNCH_SCHEMA,
|
|
1191
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1192
|
+
status: 'started',
|
|
1193
|
+
ok: true,
|
|
1194
|
+
debugId,
|
|
1195
|
+
configuration: resolved,
|
|
1196
|
+
started
|
|
1197
|
+
};
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
return {
|
|
1201
|
+
schema: RMT_VSCODE_LAUNCH_SCHEMA,
|
|
1202
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1203
|
+
status: 'dry-run',
|
|
1204
|
+
ok: true,
|
|
1205
|
+
debugId,
|
|
1206
|
+
configuration: resolved,
|
|
1207
|
+
contextPath: context.extensionPath || __dirname
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
function openVsCodeTemplate(vscodeApi, context = {}, relativePath) {
|
|
1212
|
+
const templatePath = path.resolve(context.extensionPath || __dirname, relativePath);
|
|
1213
|
+
|
|
1214
|
+
if (!vscodeApi || !vscodeApi.workspace || typeof vscodeApi.workspace.openTextDocument !== 'function') {
|
|
1215
|
+
return {
|
|
1216
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
1217
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1218
|
+
status: 'dry-run',
|
|
1219
|
+
ok: true,
|
|
1220
|
+
templatePath
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
return vscodeApi.workspace.openTextDocument(templatePath).then((document) => {
|
|
1225
|
+
if (vscodeApi.window && typeof vscodeApi.window.showTextDocument === 'function') {
|
|
1226
|
+
return vscodeApi.window.showTextDocument(document);
|
|
1227
|
+
}
|
|
1228
|
+
return document;
|
|
1229
|
+
});
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
function startLanguageClient(vscodeApi, context = {}, output = null, options = {}) {
|
|
1233
|
+
const config = createVsCodeLanguageClientConfig(context, options);
|
|
1234
|
+
let languageClientModule = options.languageClientModule || null;
|
|
1235
|
+
|
|
1236
|
+
if (!languageClientModule) {
|
|
1237
|
+
try {
|
|
1238
|
+
languageClientModule = require('vscode-languageclient/node');
|
|
1239
|
+
} catch (error) {
|
|
1240
|
+
if (output && typeof output.appendLine === 'function') {
|
|
1241
|
+
output.appendLine(`XTendRMT LanguageClient dependency missing: ${error.message}`);
|
|
1242
|
+
}
|
|
1243
|
+
return {
|
|
1244
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
1245
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1246
|
+
status: 'missing-dependency',
|
|
1247
|
+
ok: false,
|
|
1248
|
+
error: error.message,
|
|
1249
|
+
config
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
const serverOptions = createRuntimeLanguageClientServerOptions(languageClientModule, config.serverOptions);
|
|
1255
|
+
const client = new languageClientModule.LanguageClient(
|
|
1256
|
+
config.clientId,
|
|
1257
|
+
config.clientName,
|
|
1258
|
+
serverOptions,
|
|
1259
|
+
config.clientOptions
|
|
1260
|
+
);
|
|
1261
|
+
const started = typeof client.start === 'function' ? client.start() : null;
|
|
1262
|
+
if (started && typeof started.catch === 'function') {
|
|
1263
|
+
started.catch((error) => {
|
|
1264
|
+
if (output && typeof output.appendLine === 'function') {
|
|
1265
|
+
output.appendLine(`XTendRMT Language Server client start failed: ${error && error.message ? error.message : String(error)}`);
|
|
1266
|
+
}
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
if (output && typeof output.appendLine === 'function') {
|
|
1271
|
+
output.appendLine('XTendRMT Language Server client started.');
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
return {
|
|
1275
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
1276
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1277
|
+
status: 'started',
|
|
1278
|
+
ok: true,
|
|
1279
|
+
client,
|
|
1280
|
+
started,
|
|
1281
|
+
config: {
|
|
1282
|
+
...config,
|
|
1283
|
+
serverOptions
|
|
1284
|
+
}
|
|
1285
|
+
};
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
function stopLanguageClientState(state = null, output = null) {
|
|
1289
|
+
const client = state && state.client ? state.client : null;
|
|
1290
|
+
if (!client) {
|
|
1291
|
+
return {
|
|
1292
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
1293
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1294
|
+
status: 'no-client',
|
|
1295
|
+
ok: true
|
|
1296
|
+
};
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
const stopped = {
|
|
1300
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
1301
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1302
|
+
status: 'stopped',
|
|
1303
|
+
ok: true
|
|
1304
|
+
};
|
|
1305
|
+
const toFailure = (error) => {
|
|
1306
|
+
const message = error && error.message ? error.message : String(error);
|
|
1307
|
+
if (output && typeof output.appendLine === 'function') {
|
|
1308
|
+
output.appendLine(`XTendRMT Language Server client stop failed: ${message}`);
|
|
1309
|
+
}
|
|
1310
|
+
return {
|
|
1311
|
+
schema: RMT_VSCODE_DX_SCHEMA,
|
|
1312
|
+
workpackage: RMT_VSCODE_DX_WORKPACKAGE,
|
|
1313
|
+
status: 'stop-failed',
|
|
1314
|
+
ok: false,
|
|
1315
|
+
error: message
|
|
1316
|
+
};
|
|
1317
|
+
};
|
|
1318
|
+
|
|
1319
|
+
try {
|
|
1320
|
+
let stopResult = null;
|
|
1321
|
+
if (typeof client.stop === 'function') {
|
|
1322
|
+
stopResult = client.stop();
|
|
1323
|
+
} else if (typeof client.dispose === 'function') {
|
|
1324
|
+
stopResult = client.dispose();
|
|
1325
|
+
}
|
|
1326
|
+
return stopResult && typeof stopResult.then === 'function'
|
|
1327
|
+
? stopResult.then(() => stopped, toFailure)
|
|
1328
|
+
: stopped;
|
|
1329
|
+
} catch (error) {
|
|
1330
|
+
return toFailure(error);
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
function createLanguageServer(context = {}, options = {}) {
|
|
1335
|
+
if (options.server) {
|
|
1336
|
+
return options.server;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
if (typeof options.serverFactory === 'function') {
|
|
1340
|
+
return options.serverFactory(options);
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
const serverModulePath = resolveServerModule(context, options);
|
|
1344
|
+
const serverModule = require(serverModulePath);
|
|
1345
|
+
return serverModule.createRmtLanguageServer({
|
|
1346
|
+
rootDir: options.rootDir || process.cwd()
|
|
1347
|
+
});
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
function documentFullRange(document = {}) {
|
|
1351
|
+
const lines = String(document.text || '').split(/\r\n|\r|\n/u);
|
|
1352
|
+
const lastLine = Math.max(0, lines.length - 1);
|
|
1353
|
+
|
|
1354
|
+
return {
|
|
1355
|
+
start: { line: 0, character: 0 },
|
|
1356
|
+
end: { line: lastLine, character: lines[lastLine] ? lines[lastLine].length : 0 }
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
function requestPrimitiveCodeActionsForDocument(document = {}, context = {}, options = {}) {
|
|
1361
|
+
const normalized = normalizeTextDocument(document);
|
|
1362
|
+
const rootDir = resolveWorkspaceRoot(options.vscode, document, options);
|
|
1363
|
+
const server = createLanguageServer(context, {
|
|
1364
|
+
...options,
|
|
1365
|
+
rootDir
|
|
1366
|
+
});
|
|
1367
|
+
const initializeResponse = server.handleMessage({
|
|
1368
|
+
jsonrpc: '2.0',
|
|
1369
|
+
id: 1,
|
|
1370
|
+
method: 'initialize',
|
|
1371
|
+
params: {
|
|
1372
|
+
rootUri: pathToFileURL(rootDir).toString()
|
|
1373
|
+
}
|
|
1374
|
+
})[0];
|
|
1375
|
+
const openResponses = server.handleMessage({
|
|
1376
|
+
jsonrpc: '2.0',
|
|
1377
|
+
method: 'textDocument/didOpen',
|
|
1378
|
+
params: {
|
|
1379
|
+
textDocument: {
|
|
1380
|
+
uri: normalized.uri,
|
|
1381
|
+
languageId: normalized.languageId,
|
|
1382
|
+
version: normalized.version,
|
|
1383
|
+
text: normalized.text
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
});
|
|
1387
|
+
const diagnostics = openResponses
|
|
1388
|
+
.filter((response) => response && response.method === 'textDocument/publishDiagnostics')
|
|
1389
|
+
.flatMap((response) => toArray(response.params && response.params.diagnostics));
|
|
1390
|
+
const codeActionResponse = server.handleMessage({
|
|
1391
|
+
jsonrpc: '2.0',
|
|
1392
|
+
id: 2,
|
|
1393
|
+
method: 'textDocument/codeAction',
|
|
1394
|
+
params: {
|
|
1395
|
+
textDocument: { uri: normalized.uri },
|
|
1396
|
+
range: options.range || documentFullRange(normalized),
|
|
1397
|
+
context: {
|
|
1398
|
+
diagnostics
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
})[0];
|
|
1402
|
+
|
|
1403
|
+
return {
|
|
1404
|
+
schema: 'xtend.rmt.editor.vscode-active-document-code-actions.v1',
|
|
1405
|
+
workpackage: RMT_VSCODE_PRIMITIVE_AUTHORING_WORKPACKAGE,
|
|
1406
|
+
status: codeActionResponse && codeActionResponse.result ? 'ready' : 'empty',
|
|
1407
|
+
ok: !!(codeActionResponse && codeActionResponse.result),
|
|
1408
|
+
rootDir,
|
|
1409
|
+
document: normalized,
|
|
1410
|
+
diagnostics,
|
|
1411
|
+
actions: toArray(codeActionResponse && codeActionResponse.result),
|
|
1412
|
+
initialize: initializeResponse ? initializeResponse.result : null
|
|
1413
|
+
};
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
function createPrimitiveAuthoringApplyExperience(input = {}, options = {}) {
|
|
1417
|
+
const actions = toArray(input.actions || (input.report && input.report.actions) || input);
|
|
1418
|
+
const summaries = actions.map(summarizePrimitiveAuthoringAction);
|
|
1419
|
+
const fixAll = summaries.filter((entry) => entry.mode === 'fix-all');
|
|
1420
|
+
const safeQuickFixes = summaries.filter((entry) => entry.mode === 'workspace-edit' && entry.safe);
|
|
1421
|
+
const manualHandoffs = summaries.filter((entry) => entry.mode === 'manual-command');
|
|
1422
|
+
const previews = summaries.filter((entry) => entry.previewSchema);
|
|
1423
|
+
|
|
1424
|
+
return {
|
|
1425
|
+
schema: RMT_VSCODE_PRIMITIVE_AUTHORING_EXPERIENCE_SCHEMA,
|
|
1426
|
+
bridgeSchema: RMT_VSCODE_BRIDGE_SCHEMA,
|
|
1427
|
+
workpackage: RMT_VSCODE_PRIMITIVE_AUTHORING_WORKPACKAGE,
|
|
1428
|
+
bridgeWorkpackage: RMT_VSCODE_BRIDGE_WORKPACKAGE,
|
|
1429
|
+
status: summaries.length > 0 ? 'ready' : 'empty',
|
|
1430
|
+
ok: true,
|
|
1431
|
+
languageId: 'rmt',
|
|
1432
|
+
source: options.source || 'vscode-bridge',
|
|
1433
|
+
commandIds: RMT_VSCODE_PRIMITIVE_AUTHORING_COMMANDS.slice(),
|
|
1434
|
+
actionCount: summaries.length,
|
|
1435
|
+
quickFixCount: summaries.filter((entry) => entry.kind === 'quickfix').length,
|
|
1436
|
+
safeQuickFixCount: safeQuickFixes.length,
|
|
1437
|
+
fixAllCount: fixAll.length,
|
|
1438
|
+
manualHandoffCount: manualHandoffs.length,
|
|
1439
|
+
previewCount: previews.length,
|
|
1440
|
+
applyPlan: {
|
|
1441
|
+
defaultMode: fixAll.length > 0 ? 'fix-all' : (safeQuickFixes.length > 0 ? 'workspace-edit' : (manualHandoffs.length > 0 ? 'manual-command' : 'inspect')),
|
|
1442
|
+
safeAutomationAvailable: fixAll.length > 0 || safeQuickFixes.length > 0,
|
|
1443
|
+
manualReviewRequired: manualHandoffs.length > 0,
|
|
1444
|
+
kernelBoundaryCommand: RMT_VNEXT_PRIMITIVE_KERNEL_BOUNDARY_COMMAND
|
|
1445
|
+
},
|
|
1446
|
+
actions: summaries
|
|
1447
|
+
};
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
function createActiveDocumentPrimitiveAuthoringExperience(context = {}, options = {}) {
|
|
1451
|
+
const vscodeApi = options.vscode || null;
|
|
1452
|
+
const document = activeRmtTextDocument(vscodeApi, options);
|
|
1453
|
+
|
|
1454
|
+
if (!document) {
|
|
1455
|
+
const emptyExperience = createPrimitiveAuthoringApplyExperience([], {
|
|
1456
|
+
source: 'vscode-active-document'
|
|
1457
|
+
});
|
|
1458
|
+
return {
|
|
1459
|
+
...emptyExperience,
|
|
1460
|
+
status: 'no-active-document',
|
|
1461
|
+
ok: false,
|
|
1462
|
+
activeDocument: null,
|
|
1463
|
+
lsp: {
|
|
1464
|
+
status: 'not_requested',
|
|
1465
|
+
diagnosticCount: 0,
|
|
1466
|
+
codeActionCount: 0
|
|
1467
|
+
},
|
|
1468
|
+
rawActions: []
|
|
1469
|
+
};
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
const request = requestPrimitiveCodeActionsForDocument(document, context, options);
|
|
1473
|
+
const experience = createPrimitiveAuthoringApplyExperience({
|
|
1474
|
+
actions: request.actions
|
|
1475
|
+
}, {
|
|
1476
|
+
source: 'vscode-active-document'
|
|
1477
|
+
});
|
|
1478
|
+
|
|
1479
|
+
return {
|
|
1480
|
+
...experience,
|
|
1481
|
+
activeDocument: {
|
|
1482
|
+
uri: request.document.uri,
|
|
1483
|
+
filePath: request.document.filePath,
|
|
1484
|
+
languageId: request.document.languageId,
|
|
1485
|
+
version: request.document.version
|
|
1486
|
+
},
|
|
1487
|
+
lsp: {
|
|
1488
|
+
status: request.status,
|
|
1489
|
+
diagnosticCount: request.diagnostics.length,
|
|
1490
|
+
codeActionCount: request.actions.length,
|
|
1491
|
+
serverInfo: request.initialize ? request.initialize.serverInfo || null : null
|
|
1492
|
+
},
|
|
1493
|
+
rawActions: options.includeRawActions === false ? [] : request.actions
|
|
1494
|
+
};
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
function renderPrimitiveAuthoringApplyExperience(experience = {}) {
|
|
1498
|
+
const lines = [
|
|
1499
|
+
'XTendRMT vNext Primitive Authoring',
|
|
1500
|
+
`Status: ${experience.status || 'unknown'}`,
|
|
1501
|
+
`Actions: ${experience.actionCount || 0}`,
|
|
1502
|
+
`Safe Quick-Fixes: ${experience.safeQuickFixCount || 0}`,
|
|
1503
|
+
`Fix-All: ${experience.fixAllCount || 0}`,
|
|
1504
|
+
`Manual Handoffs: ${experience.manualHandoffCount || 0}`,
|
|
1505
|
+
`Default Apply Path: ${experience.applyPlan ? experience.applyPlan.defaultMode : 'inspect'}`
|
|
1506
|
+
];
|
|
1507
|
+
|
|
1508
|
+
toArray(experience.actions).forEach((action) => {
|
|
1509
|
+
lines.push(`- ${action.mode}: ${action.title}`);
|
|
1510
|
+
if (action.diagnosticCode) lines.push(` diagnostic: ${action.diagnosticCode}`);
|
|
1511
|
+
if (action.command) lines.push(` command: ${action.command}`);
|
|
1512
|
+
if (action.previewStatus) lines.push(` preview: ${action.previewStatus}, changed lines: ${action.changedLineCount}`);
|
|
1513
|
+
toArray(action.previewAfter).forEach((line) => lines.push(` > ${line}`));
|
|
1514
|
+
});
|
|
1515
|
+
|
|
1516
|
+
return lines;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
function isSafeWorkspaceEditAction(action = {}) {
|
|
1520
|
+
return !!(action && action.edit && getActionSafeFlag(action) && classifyPrimitiveAuthoringAction(action) !== 'manual-command');
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
function workspaceEditEntryCount(edit = {}) {
|
|
1524
|
+
return Object.values(edit && edit.changes ? edit.changes : {}).reduce((count, edits) => count + toArray(edits).length, 0);
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
function toVscodeRange(vscodeApi, range = {}) {
|
|
1528
|
+
return new vscodeApi.Range(
|
|
1529
|
+
new vscodeApi.Position(range.start ? range.start.line : 0, range.start ? range.start.character : 0),
|
|
1530
|
+
new vscodeApi.Position(range.end ? range.end.line : 0, range.end ? range.end.character : 0)
|
|
1531
|
+
);
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
function toVscodeWorkspaceEdit(vscodeApi, edit = {}) {
|
|
1535
|
+
const workspaceEdit = new vscodeApi.WorkspaceEdit();
|
|
1536
|
+
|
|
1537
|
+
Object.entries(edit.changes || {}).forEach(([uri, edits]) => {
|
|
1538
|
+
const vscodeUri = vscodeApi.Uri.parse(uri);
|
|
1539
|
+
toArray(edits).forEach((entry) => {
|
|
1540
|
+
workspaceEdit.replace(vscodeUri, toVscodeRange(vscodeApi, entry.range), entry.newText || '');
|
|
1541
|
+
});
|
|
1542
|
+
});
|
|
1543
|
+
|
|
1544
|
+
return workspaceEdit;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
function applyPrimitiveAuthoringWorkspaceEdit(actionOrEdit = {}, options = {}) {
|
|
1548
|
+
const looksLikeAction = actionOrEdit && (
|
|
1549
|
+
Object.prototype.hasOwnProperty.call(actionOrEdit, 'edit') ||
|
|
1550
|
+
Object.prototype.hasOwnProperty.call(actionOrEdit, 'command') ||
|
|
1551
|
+
Object.prototype.hasOwnProperty.call(actionOrEdit, 'kind')
|
|
1552
|
+
);
|
|
1553
|
+
const action = looksLikeAction ? actionOrEdit : {
|
|
1554
|
+
title: options.title || 'RMT vNext Primitive WorkspaceEdit',
|
|
1555
|
+
kind: options.kind || 'quickfix',
|
|
1556
|
+
safe: options.safe !== false,
|
|
1557
|
+
edit: actionOrEdit
|
|
1558
|
+
};
|
|
1559
|
+
const edit = action.edit || null;
|
|
1560
|
+
const editCount = workspaceEditEntryCount(edit);
|
|
1561
|
+
|
|
1562
|
+
if (!isSafeWorkspaceEditAction(action)) {
|
|
1563
|
+
return {
|
|
1564
|
+
schema: 'xtend.rmt.editor.vscode-primitive-workspace-edit-apply.v1',
|
|
1565
|
+
workpackage: RMT_VSCODE_PRIMITIVE_AUTHORING_WORKPACKAGE,
|
|
1566
|
+
status: 'blocked',
|
|
1567
|
+
ok: false,
|
|
1568
|
+
reason: action.command ? 'manual-command' : 'unsafe-or-empty-action',
|
|
1569
|
+
title: action.title || null,
|
|
1570
|
+
editCount
|
|
1571
|
+
};
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
if (!options.vscode || !options.vscode.workspace || typeof options.vscode.workspace.applyEdit !== 'function') {
|
|
1575
|
+
return {
|
|
1576
|
+
schema: 'xtend.rmt.editor.vscode-primitive-workspace-edit-apply.v1',
|
|
1577
|
+
workpackage: RMT_VSCODE_PRIMITIVE_AUTHORING_WORKPACKAGE,
|
|
1578
|
+
status: 'dry-run',
|
|
1579
|
+
ok: true,
|
|
1580
|
+
title: action.title || null,
|
|
1581
|
+
kind: action.kind || 'quickfix',
|
|
1582
|
+
editCount
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
const workspaceEdit = toVscodeWorkspaceEdit(options.vscode, edit);
|
|
1587
|
+
const applied = options.vscode.workspace.applyEdit(workspaceEdit);
|
|
1588
|
+
const toResult = (success) => ({
|
|
1589
|
+
schema: 'xtend.rmt.editor.vscode-primitive-workspace-edit-apply.v1',
|
|
1590
|
+
workpackage: RMT_VSCODE_PRIMITIVE_AUTHORING_WORKPACKAGE,
|
|
1591
|
+
status: success ? 'applied' : 'rejected',
|
|
1592
|
+
ok: success === true,
|
|
1593
|
+
title: action.title || null,
|
|
1594
|
+
kind: action.kind || 'quickfix',
|
|
1595
|
+
editCount
|
|
1596
|
+
});
|
|
1597
|
+
|
|
1598
|
+
return applied && typeof applied.then === 'function'
|
|
1599
|
+
? applied.then(toResult)
|
|
1600
|
+
: toResult(applied);
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
function showPrimitiveAuthoringApplyExperience(output, input = {}, options = {}) {
|
|
1604
|
+
const experience = input && input.schema === RMT_VSCODE_PRIMITIVE_AUTHORING_EXPERIENCE_SCHEMA
|
|
1605
|
+
? input
|
|
1606
|
+
: createPrimitiveAuthoringApplyExperience(input, options);
|
|
1607
|
+
|
|
1608
|
+
if (output && typeof output.clear === 'function') output.clear();
|
|
1609
|
+
renderPrimitiveAuthoringApplyExperience(experience).forEach((line) => {
|
|
1610
|
+
if (output && typeof output.appendLine === 'function') output.appendLine(line);
|
|
1611
|
+
});
|
|
1612
|
+
if (output && typeof output.show === 'function') output.show(true);
|
|
1613
|
+
|
|
1614
|
+
return experience;
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
function actionQuickPickItems(experience = {}, rawActions = []) {
|
|
1618
|
+
return toArray(experience.actions).map((summary) => ({
|
|
1619
|
+
label: summary.mode === 'fix-all' ? 'Apply Fix-All' : summary.title,
|
|
1620
|
+
description: summary.mode,
|
|
1621
|
+
detail: summary.previewStatus ? `preview: ${summary.previewStatus}` : summary.diagnosticCode || '',
|
|
1622
|
+
action: rawActions[summary.index],
|
|
1623
|
+
summary
|
|
1624
|
+
}));
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
function showPrimitiveAuthoringHandoff(output, action = {}, handoff = null) {
|
|
1628
|
+
const lines = [
|
|
1629
|
+
'XTendRMT vNext Primitive Command Handoff',
|
|
1630
|
+
`Command: ${action.command ? action.command.command : action.command || RMT_VNEXT_PRIMITIVE_KERNEL_BOUNDARY_COMMAND}`,
|
|
1631
|
+
'Status: manual_handoff',
|
|
1632
|
+
'WorkspaceEdit: none'
|
|
1633
|
+
];
|
|
1634
|
+
|
|
1635
|
+
if (handoff && handoff.target) lines.push(`Target: ${handoff.target}`);
|
|
1636
|
+
if (handoff && handoff.boundary) lines.push(`Boundary: ${handoff.boundary}`);
|
|
1637
|
+
if (action.title) lines.push(`Action: ${action.title}`);
|
|
1638
|
+
if (output && typeof output.clear === 'function') output.clear();
|
|
1639
|
+
lines.forEach((line) => {
|
|
1640
|
+
if (output && typeof output.appendLine === 'function') output.appendLine(line);
|
|
1641
|
+
});
|
|
1642
|
+
if (output && typeof output.show === 'function') output.show(true);
|
|
1643
|
+
|
|
1644
|
+
return {
|
|
1645
|
+
schema: 'xtend.rmt.editor.vscode-primitive-command-handoff-view.v1',
|
|
1646
|
+
workpackage: RMT_VSCODE_PRIMITIVE_AUTHORING_WORKPACKAGE,
|
|
1647
|
+
status: 'manual_handoff',
|
|
1648
|
+
ok: true,
|
|
1649
|
+
action,
|
|
1650
|
+
handoff
|
|
1651
|
+
};
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
function executePrimitiveCommandHandoff(action = {}, context = {}, options = {}) {
|
|
1655
|
+
const command = action.command && action.command.command ? action.command.command : RMT_VNEXT_PRIMITIVE_KERNEL_BOUNDARY_COMMAND;
|
|
1656
|
+
const args = action.command && Array.isArray(action.command.arguments) ? action.command.arguments : [];
|
|
1657
|
+
const server = createLanguageServer(context, options);
|
|
1658
|
+
const response = server.handleMessage({
|
|
1659
|
+
jsonrpc: '2.0',
|
|
1660
|
+
id: 3,
|
|
1661
|
+
method: 'workspace/executeCommand',
|
|
1662
|
+
params: {
|
|
1663
|
+
command,
|
|
1664
|
+
arguments: args
|
|
1665
|
+
}
|
|
1666
|
+
})[0];
|
|
1667
|
+
|
|
1668
|
+
return response ? response.result : null;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
30
1671
|
function activate(context) {
|
|
31
1672
|
const vscode = require('vscode');
|
|
32
1673
|
const output = vscode.window.createOutputChannel('XTendRMT');
|
|
33
|
-
const
|
|
1674
|
+
const serverInvocation = resolveLanguageServerInvocation(vscode, context);
|
|
1675
|
+
const serverCommand = createServerCommand(context, serverInvocation);
|
|
1676
|
+
let languageClientState = startLanguageClient(vscode, context, output, serverInvocation);
|
|
1677
|
+
activeLanguageClientState = languageClientState;
|
|
1678
|
+
if (languageClientState.client) {
|
|
1679
|
+
context.subscriptions.push(languageClientState.client);
|
|
1680
|
+
}
|
|
34
1681
|
const disposable = vscode.commands.registerCommand('xtendRmt.showLanguageServerCommand', () => {
|
|
35
1682
|
output.clear();
|
|
36
1683
|
output.appendLine('XTendRMT Language Server');
|
|
37
1684
|
output.appendLine(`${serverCommand.command} ${serverCommand.args.join(' ')}`);
|
|
38
|
-
output.appendLine(
|
|
1685
|
+
output.appendLine(`LanguageClient: ${languageClientState.status}`);
|
|
39
1686
|
output.show(true);
|
|
40
1687
|
});
|
|
1688
|
+
const restartLanguageServerDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[0], async () => {
|
|
1689
|
+
await stopLanguageClientState(languageClientState, output);
|
|
1690
|
+
languageClientState = startLanguageClient(vscode, context, output, resolveLanguageServerInvocation(vscode, context));
|
|
1691
|
+
activeLanguageClientState = languageClientState;
|
|
1692
|
+
if (languageClientState.client) {
|
|
1693
|
+
context.subscriptions.push(languageClientState.client);
|
|
1694
|
+
}
|
|
1695
|
+
return languageClientState;
|
|
1696
|
+
});
|
|
1697
|
+
const taskProviderDisposable = vscode.tasks && typeof vscode.tasks.registerTaskProvider === 'function'
|
|
1698
|
+
? vscode.tasks.registerTaskProvider('xtendRmt', createVsCodeTaskProvider(vscode, context))
|
|
1699
|
+
: null;
|
|
1700
|
+
const runActiveLintDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[1], () => {
|
|
1701
|
+
return runXtendRmtTask(vscode, context, 'lint-active', { output });
|
|
1702
|
+
});
|
|
1703
|
+
const runWorkspaceLintDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[2], () => {
|
|
1704
|
+
return runXtendRmtTask(vscode, context, 'lint-workspace', { output });
|
|
1705
|
+
});
|
|
1706
|
+
const runRmtBuildCheckDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[3], () => {
|
|
1707
|
+
return runXtendRmtTask(vscode, context, 'rmt-build-check', { output });
|
|
1708
|
+
});
|
|
1709
|
+
const runScaffoldVerifyDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[4], () => {
|
|
1710
|
+
return runXtendRmtTask(vscode, context, 'scaffold-verify', { output });
|
|
1711
|
+
});
|
|
1712
|
+
const debugLanguageServerDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[5], () => {
|
|
1713
|
+
return startXtendRmtDebugSession(vscode, context, 'Debug Language Server', { output });
|
|
1714
|
+
});
|
|
1715
|
+
const debugActiveLintDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[6], () => {
|
|
1716
|
+
return startXtendRmtDebugSession(vscode, context, 'Debug Active RMT Lint', { output });
|
|
1717
|
+
});
|
|
1718
|
+
const debugActiveBuildDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[7], () => {
|
|
1719
|
+
return startXtendRmtDebugSession(vscode, context, 'Debug Active RMT Build', { output });
|
|
1720
|
+
});
|
|
1721
|
+
const openCliTerminalDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[8], () => {
|
|
1722
|
+
return openXtendCliTerminal(vscode, context, { output });
|
|
1723
|
+
});
|
|
1724
|
+
const runCliCommandPaletteDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[9], () => {
|
|
1725
|
+
return showXtendCliCommandPalette(vscode, context, { output });
|
|
1726
|
+
});
|
|
1727
|
+
const runAgentRepairReportDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[10], () => {
|
|
1728
|
+
return runXtendCliInTerminal(vscode, context, 'agent-repair-report', { output });
|
|
1729
|
+
});
|
|
1730
|
+
const runRmtBuildWriteDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[11], () => {
|
|
1731
|
+
return runXtendCliInTerminal(vscode, context, 'rmt-build-write', { output });
|
|
1732
|
+
});
|
|
1733
|
+
const openTasksTemplateDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[12], () => {
|
|
1734
|
+
return openVsCodeTemplate(vscode, context, TASKS_TEMPLATE_RELATIVE_PATH);
|
|
1735
|
+
});
|
|
1736
|
+
const openLaunchTemplateDisposable = vscode.commands.registerCommand(RMT_VSCODE_DX_COMMANDS[13], () => {
|
|
1737
|
+
return openVsCodeTemplate(vscode, context, LAUNCH_TEMPLATE_RELATIVE_PATH);
|
|
1738
|
+
});
|
|
1739
|
+
const applyExperienceDisposable = vscode.commands.registerCommand(RMT_VSCODE_PRIMITIVE_AUTHORING_COMMANDS[0], async (input = {}) => {
|
|
1740
|
+
if (!input || Object.keys(input).length === 0) {
|
|
1741
|
+
const activeExperience = createActiveDocumentPrimitiveAuthoringExperience(context, {
|
|
1742
|
+
vscode,
|
|
1743
|
+
includeRawActions: true
|
|
1744
|
+
});
|
|
1745
|
+
showPrimitiveAuthoringApplyExperience(output, activeExperience, { source: 'vscode-active-document-command' });
|
|
1746
|
+
const selected = await vscode.window.showQuickPick(actionQuickPickItems(activeExperience, activeExperience.rawActions), {
|
|
1747
|
+
placeHolder: 'RMT vNext Primitive Action anwenden oder Handoff anzeigen'
|
|
1748
|
+
});
|
|
1749
|
+
if (!selected) return activeExperience;
|
|
1750
|
+
if (selected.summary.mode === 'manual-command') {
|
|
1751
|
+
return showPrimitiveAuthoringHandoff(output, selected.action, executePrimitiveCommandHandoff(selected.action, context, {
|
|
1752
|
+
rootDir: resolveWorkspaceRoot(vscode, vscode.window.activeTextEditor && vscode.window.activeTextEditor.document)
|
|
1753
|
+
}));
|
|
1754
|
+
}
|
|
1755
|
+
return applyPrimitiveAuthoringWorkspaceEdit(selected.action, { vscode });
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
return showPrimitiveAuthoringApplyExperience(output, input, { source: 'vscode-command' });
|
|
1759
|
+
});
|
|
1760
|
+
const previewDisposable = vscode.commands.registerCommand(RMT_VSCODE_PRIMITIVE_AUTHORING_COMMANDS[1], (action = {}) => {
|
|
1761
|
+
return showPrimitiveAuthoringApplyExperience(output, { actions: [action] }, { source: 'vscode-preview-command' });
|
|
1762
|
+
});
|
|
1763
|
+
const handoffDisposable = vscode.commands.registerCommand(RMT_VSCODE_PRIMITIVE_AUTHORING_COMMANDS[2], (handoffOrAction = {}) => {
|
|
1764
|
+
return showPrimitiveAuthoringApplyExperience(output, { actions: [handoffOrAction] }, { source: 'vscode-handoff-command' });
|
|
1765
|
+
});
|
|
1766
|
+
const safeFixAllDisposable = vscode.commands.registerCommand(RMT_VSCODE_PRIMITIVE_AUTHORING_COMMANDS[3], async () => {
|
|
1767
|
+
const activeExperience = createActiveDocumentPrimitiveAuthoringExperience(context, {
|
|
1768
|
+
vscode,
|
|
1769
|
+
includeRawActions: true
|
|
1770
|
+
});
|
|
1771
|
+
const fixAllAction = toArray(activeExperience.rawActions).find((action) => action && action.kind === RMT_VNEXT_PRIMITIVE_FIX_ALL_KIND);
|
|
1772
|
+
if (!fixAllAction) {
|
|
1773
|
+
showPrimitiveAuthoringApplyExperience(output, activeExperience, { source: 'vscode-fix-all-command' });
|
|
1774
|
+
return {
|
|
1775
|
+
schema: 'xtend.rmt.editor.vscode-primitive-workspace-edit-apply.v1',
|
|
1776
|
+
workpackage: RMT_VSCODE_PRIMITIVE_AUTHORING_WORKPACKAGE,
|
|
1777
|
+
status: 'blocked',
|
|
1778
|
+
ok: false,
|
|
1779
|
+
reason: 'no-safe-fix-all'
|
|
1780
|
+
};
|
|
1781
|
+
}
|
|
41
1782
|
|
|
42
|
-
|
|
43
|
-
|
|
1783
|
+
return applyPrimitiveAuthoringWorkspaceEdit(fixAllAction, { vscode });
|
|
1784
|
+
});
|
|
1785
|
+
|
|
1786
|
+
context.subscriptions.push(
|
|
1787
|
+
output,
|
|
1788
|
+
disposable,
|
|
1789
|
+
restartLanguageServerDisposable,
|
|
1790
|
+
runActiveLintDisposable,
|
|
1791
|
+
runWorkspaceLintDisposable,
|
|
1792
|
+
runRmtBuildCheckDisposable,
|
|
1793
|
+
runScaffoldVerifyDisposable,
|
|
1794
|
+
debugLanguageServerDisposable,
|
|
1795
|
+
debugActiveLintDisposable,
|
|
1796
|
+
debugActiveBuildDisposable,
|
|
1797
|
+
openCliTerminalDisposable,
|
|
1798
|
+
runCliCommandPaletteDisposable,
|
|
1799
|
+
runAgentRepairReportDisposable,
|
|
1800
|
+
runRmtBuildWriteDisposable,
|
|
1801
|
+
openTasksTemplateDisposable,
|
|
1802
|
+
openLaunchTemplateDisposable,
|
|
1803
|
+
applyExperienceDisposable,
|
|
1804
|
+
previewDisposable,
|
|
1805
|
+
handoffDisposable,
|
|
1806
|
+
safeFixAllDisposable
|
|
1807
|
+
);
|
|
1808
|
+
if (taskProviderDisposable) {
|
|
1809
|
+
context.subscriptions.push(taskProviderDisposable);
|
|
1810
|
+
}
|
|
1811
|
+
return {
|
|
1812
|
+
...serverCommand,
|
|
1813
|
+
languageClient: languageClientState.status,
|
|
1814
|
+
dxSchema: RMT_VSCODE_DX_SCHEMA,
|
|
1815
|
+
taskSchema: RMT_VSCODE_TASKS_SCHEMA,
|
|
1816
|
+
launchSchema: RMT_VSCODE_LAUNCH_SCHEMA
|
|
1817
|
+
};
|
|
44
1818
|
}
|
|
45
1819
|
|
|
46
|
-
function deactivate() {
|
|
1820
|
+
function deactivate() {
|
|
1821
|
+
return stopLanguageClientState(activeLanguageClientState);
|
|
1822
|
+
}
|
|
47
1823
|
|
|
48
1824
|
module.exports = {
|
|
1825
|
+
RMT_VSCODE_PRIMITIVE_AUTHORING_COMMANDS,
|
|
1826
|
+
RMT_VSCODE_PRIMITIVE_AUTHORING_EXPERIENCE_SCHEMA,
|
|
1827
|
+
RMT_VSCODE_DX_COMMANDS,
|
|
1828
|
+
RMT_VSCODE_DX_SCHEMA,
|
|
1829
|
+
RMT_VSCODE_DX_WORKPACKAGE,
|
|
1830
|
+
RMT_VSCODE_LAUNCH_SCHEMA,
|
|
1831
|
+
RMT_VSCODE_TASKS_SCHEMA,
|
|
49
1832
|
RMT_VSCODE_BRIDGE_SCHEMA,
|
|
50
1833
|
RMT_VSCODE_BRIDGE_WORKPACKAGE,
|
|
51
1834
|
activate,
|
|
1835
|
+
applyPrimitiveAuthoringWorkspaceEdit,
|
|
1836
|
+
createActiveDocumentPrimitiveAuthoringExperience,
|
|
1837
|
+
createRuntimeLanguageClientServerOptions,
|
|
1838
|
+
createTerminalCommandLine,
|
|
1839
|
+
createXtendCliCandidates,
|
|
1840
|
+
createXtendCliWorkflowDefinitions,
|
|
1841
|
+
createVsCodeLanguageClientConfig,
|
|
1842
|
+
createVsCodeLaunchConfigurations,
|
|
1843
|
+
createVsCodeProblemMatcher,
|
|
1844
|
+
createVsCodeTaskDefinitions,
|
|
1845
|
+
createVsCodeTaskProvider,
|
|
1846
|
+
createPrimitiveAuthoringApplyExperience,
|
|
52
1847
|
createServerCommand,
|
|
53
1848
|
deactivate,
|
|
54
|
-
|
|
1849
|
+
executePrimitiveCommandHandoff,
|
|
1850
|
+
openXtendCliTerminal,
|
|
1851
|
+
openVsCodeTemplate,
|
|
1852
|
+
renderPrimitiveAuthoringApplyExperience,
|
|
1853
|
+
requestPrimitiveCodeActionsForDocument,
|
|
1854
|
+
resolveDebugConfiguration,
|
|
1855
|
+
resolveLanguageServerInvocation,
|
|
1856
|
+
resolveServerModule,
|
|
1857
|
+
resolveXtendCliInvocation,
|
|
1858
|
+
runXtendCliInTerminal,
|
|
1859
|
+
runXtendRmtTask,
|
|
1860
|
+
showXtendCliCommandPalette,
|
|
1861
|
+
startLanguageClient,
|
|
1862
|
+
stopLanguageClientState,
|
|
1863
|
+
startXtendRmtDebugSession
|
|
55
1864
|
};
|