Add standalone CDL and PDL Monaco language modules, publish to npm - #43
Merged
Conversation
Pull the string/number/operator/variable common rules used by every sub-language block in the composite `.play` tokenizer into an exported commonTokenRules constant, so a standalone sub-language module can reuse the same fragments instead of duplicating them.
…n Language modules Register CDL and PDL as their own top-level Monaco languages (own language id, tokenizer, completion/hover/validation providers) rather than only as sub-grammars embedded inside a `.play` document, so a consumer can use just one of them without pulling in the rest of the Screenplay construct set. Exposed as the `./capture` and `./projection` subpath exports. Port the full richness of Chronicle's existing hand-rolled Monaco tooling for both languages (every completion context, hover documentation, and validation rule), correcting CDL's keyword surface to the current grammar in the process — `auth`/`bearer`/inline `url` are gone (an API source now references a named External Service via `api <ServiceName>`, with an optional `route`), which the previously duplicated Chronicle-side tooling had drifted from. PDL's schema-aware behavior (event/read-model completions, hover, and validation) is parameterized through data setters and callbacks that a host application feeds live data into, mirroring the exact shape Chronicle's existing setter functions already used. Also bump the monaco-editor devDependency to match the version range downstream consumers use, avoiding a type-shape mismatch when this package is portal-linked for local development.
Add a publish-npm-packages job modeled on the Components repo's existing OIDC trusted-publish job: no long-lived npm token, just the GitHub Actions OIDC token exchanged at publish time. Mark the package publicly accessible via publishConfig, required for a scoped package.
…b-languages # Conflicts: # Source/Screenplay/Monaco/screenplay-language/tokens.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
@cratis/screenplay-language/captureand@cratis/screenplay-language/projectionsubpath exports — usable independently of the full.playconstruct set.publish-npm-packagesCI job that publishes@cratis/screenplay-languageto npm via OIDC trusted publishing, matching the existing pattern in the Components repo.Changed
auth/bearerkeywords and inlineurlon API sources are gone — an API source now references a named External Service viaapi <ServiceName>, with an optionalroute..playtokenizer into an exportedcommonTokenRulesconstant.monaco-editordevDependency to match the version range downstream consumers use.