diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 640da19..864d370 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,9 +54,9 @@ jobs: with: node-version: 20 - run: npm install - - name: Use correct .node binary file - run: cp -f ./server/lib/${{ matrix.platarch }}-isclexer.node ./server/lib/isclexer.node - name: Build package + env: + ISCLEXER_TARGET: ${{ matrix.platarch }} run: npx vsce package -o ${{ steps.set-version.outputs.name }}.vsix --target ${{ matrix.platarch }} - name: Upload package uses: actions/upload-artifact@v4 @@ -160,4 +160,4 @@ jobs: git add ./client/package.json git add ./server/package.json git commit -m 'auto bump version with release [skip ci]' - git push \ No newline at end of file + git push diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..133a95b --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,28 @@ +# Agent Instructions (root) + +## Scope and precedence + +This file applies to the **entire repository**. More specific instructions in subfolders (e.g. `client/AGENTS.md`, `server/AGENTS.md`) **override** this file in case of conflict. + +## Fork goals (Consistem) + +- Keep changes as close as possible to the InterSystems upstream. +- Concentrate Consistem-specific behavior in `client/src/ccs/**` and `server/src/ccs/**`, using small “hooks” in the core. + +## General rules (for agents) + +- Make minimal, localized changes; avoid broad refactors/reformatting. +- Don’t change request/notification IDs (`intersystems/...`) without aligning `client/` and `server/`. +- Avoid touching `package-lock.json` unless necessary (don’t run installs as “formatting”). +- Follow existing style: tabs, and generally single quotes in TS. + +## Preferred validation + +- `npm run compile` at repo root. +- Manual test via VS Code: `.vscode/launch.json` (“Launch Client”) and, if needed, “Attach to Server” (port 6009). + +## Notes + +- `server/lib/isclexer.node` is gitignored and must exist locally for runs that use the native lexer. + - Preferred: run `npm run select-isclexer` from repo root (auto-selects for the current OS/arch). + - Cross-build: set `ISCLEXER_TARGET=-` (e.g. `win32-x64`) before running `npm run select-isclexer` / `npm run webpack`. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a2294d4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,50 @@ +# Contribuindo + +## Estrutura do projeto + +- `client/`: extensão do VS Code (Language Client). Código em `client/src/`, build em `client/out/`. +- `server/`: servidor de linguagem (LSP). Código em `server/src/`, build em `server/out/`. +- `server/lib/`: binários do lexer nativo por plataforma (`*-isclexer.node`) e typings (`isclexer.node.d.ts`). +- `themes/`: temas empacotados. +- `images/`: assets de marketplace/README. + +## Comandos (build, teste e desenvolvimento) + +Use Node.js 20 (mesma versão do CI). + +- `npm install`: Instala dependências na raiz e executa `postinstall` para instalar deps de `client/` e `server/`. +- `npm run compile`: Build TypeScript (`tsc -b`) de `client/` + `server/`. +- `npm run watch`: Build incremental em modo watch. +- `npm run webpack:dev`: Build webpack para desenvolvimento/debug local. +- `npm run webpack`: Build webpack de produção (usado para empacotar). +- `npm run clean`: Remove `client/out` e `server/out`. + +Nota do lexer nativo: `server/src/**` importa `server/lib/isclexer.node`, que é gitignored. Crie/atualize o arquivo localmente com: + +`npm run select-isclexer` + +O comando acima seleciona e copia automaticamente o binário correto (por OS/arquitetura) para `server/lib/isclexer.node`. + +Cross-build (ex.: gerar VSIX de Windows a partir do macOS): + +`ISCLEXER_TARGET=win32-x64 npm run select-isclexer` + +Observação: `npm run webpack` e `npm run webpack:dev` já executam `select-isclexer` automaticamente. + +## Estilo de código e convenções + +- TypeScript seguindo as convenções do repo: tabs (não espaços) e, em geral, aspas simples. +- Mantenha mudanças consistentes com arquivos próximos (importações, ponto e vírgula, nomes). +- Prefira commits pequenos e focados; evite alterações desnecessárias em lockfiles (`package-lock.json`). + +## Testes + +Não há uma suíte dedicada de testes unitários neste repositório. Valide mudanças com: + +- `npm run compile` (typecheck/build) +- Rodando a extensão via VS Code `.vscode/launch.json` (“Launch Client”) e exercitando a funcionalidade alterada. + +## Commits e Pull Requests + +- Mensagens de commit costumam ser imperativas e curtas, com referência a issue (ex.: `Fixes #123`). +- No PR, inclua: o que mudou, como validar (passo a passo e/ou arquivo de exemplo), issues relacionadas e plataforma/arquitetura se envolver o lexer nativo. diff --git a/README.md b/README.md index 0c73d6e..151caf7 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,24 @@ -# InterSystems Language Server +

+ Consistem +

+ +# Consistem Language Server + +This is a [LSP](https://microsoft.github.io/language-server-protocol/) compliant language server for [InterSystems](http://www.intersystems.com/our-products/) ObjectScript. +It is powered by **Node.js**, written primarily in **TypeScript**, and designed to integrate seamlessly with editors that support the [LSP standard](https://microsoft.github.io/language-server-protocol/). + +## Installation & usage > **Note:** The best way to install and use this extension is by installing the [InterSystems ObjectScript Extension Pack](https://marketplace.visualstudio.com/items?itemName=intersystems-community.objectscript-pack) and following the [documentation here](https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls?KEY=GVSCO). -This is a [LSP](https://microsoft.github.io/language-server-protocol/) compliant language server for [InterSystems](http://www.intersystems.com/our-products/) ObjectScript powered by Node.js and written primarily in TypeScript. It is maintained by InterSystems. +## About this fork + +This project is a fork of the official [`intersystems/language-server`](https://github.com/intersystems/language-server) repository. + +Originally maintained by [InterSystems®](http://www.intersystems.com), this fork is maintained by [Consistem®](https://consistem.com.br/). + +It preserves all features of the upstream project and adds integrations, adjustments, and internal standards adopted by Consistem, +with a focus on meeting the specific needs of our development ecosystem. ## Features @@ -69,11 +85,11 @@ This is a [LSP](https://microsoft.github.io/language-server-protocol/) compliant - Hover, code completion and signature help for JavaScript methods in ObjectScript classes and JavaScript embedded in CSP using `