Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/release-widget/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Teardown list (present all, confirm once, then execute):

## Common Mistakes

- **Writing inline `ts-node -e` scripts instead of using the packaged CLI helpers** — use `rui-package-info`, `rui-changelog`, `rui-bump-version`, `rui-create-jira-version`, `rui-generate-oss-sbom`, `rui-upload-readme-oss` (in `automation/utils/bin/`). Never reimplement ad hoc.
- **Writing inline `node -e` scripts instead of using the packaged CLI helpers** — use `rui-package-info`, `rui-changelog`, `rui-bump-version`, `rui-create-jira-version`, `rui-generate-oss-sbom`, `rui-upload-readme-oss` (in `automation/utils/bin/`). Never reimplement ad hoc.
- **Working around a helper's refusal instead of fixing the input** — go back to Phase 0/2, don't bump the widget by hand.
- **Publishing before the asset gate passes** — never `gh release edit --draft=false` without confirming both MPK and READMEOSS are attached.
- **Escalating a 409 without checking run history first** — check `gh run list` for the tag first.
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ mendixProject
**/pluggableWidgets/**/artifacts
**/gh-*/release-notes.txt

**/automation/utils/**/parser/module/module.js
**/automation/utils/**/parser/widget/widget.js

tests
.turbo
*.tsbuildinfo
Expand Down
2 changes: 1 addition & 1 deletion .mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"marketplace-mcp": {
"type": "stdio",
"command": "node",
"args": ["./automation/marketplace-mcp/dist/index.js"],
"args": ["./automation/marketplace-mcp/src/index.ts"],
"env": {
"MX_PAT": "${MARKETPLACE_API_TOKEN}"
}
Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ packages/modules/*/src/javascriptsource/**/*.js
.idea
.husky
.vscode
pnpm-lock.yaml
pnpm-lock.yaml
automation/utils/src/changelog-parser/parser/*/*.mjs
2 changes: 0 additions & 2 deletions automation/e2e-mcp/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
node_modules/
dist/
*.tsbuildinfo
11 changes: 5 additions & 6 deletions automation/e2e-mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
"name": "@mendix/e2e-mcp",
"version": "0.1.0",
"description": "MCP server for Mendix E2E test triage – surfaces flaky, slow and failing tests from CTRF reports to GitHub Copilot.",
"private": true,
"bin": {
"e2e-mcp": "dist/index.js"
"e2e-mcp": "src/index.ts"
},
"type": "module",
"main": "dist/index.js",
"main": "src/index.ts",
"scripts": {
"build": "tsc",
"dev": "tsc --watch",
"postinstall": "tsc",
"start": "node dist/index.js"
"lint": "tsc",
"start": "node src/index.ts"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.31.0",
Expand Down
Empty file modified automation/e2e-mcp/src/index.ts
100644 → 100755
Empty file.
17 changes: 7 additions & 10 deletions automation/e2e-mcp/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "Node16",
"moduleResolution": "Node16",
"outDir": "./dist",
"rootDir": "./src",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noEmit": true,
"allowImportingTsExtensions": true,
"erasableSyntaxOnly": true,
"verbatimModuleSyntax": true,
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"types": ["node"]
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
"include": ["src/**/*"]
}
11 changes: 5 additions & 6 deletions automation/marketplace-mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
"name": "@mendix/marketplace-mcp",
"version": "0.1.0",
"description": "MCP server for the Mendix Marketplace Content API – browse and query Marketplace content from your Agent.",
"private": true,
"bin": {
"marketplace-mcp": "dist/index.js"
"marketplace-mcp": "src/index.ts"
},
"type": "module",
"main": "dist/index.js",
"main": "src/index.ts",
"scripts": {
"build": "tsc",
"dev": "tsc --watch",
"postinstall": "tsc",
"start": "node dist/index.js"
"lint": "tsc",
"start": "node src/index.ts"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.31.0",
Expand Down
Empty file modified automation/marketplace-mcp/src/index.ts
100644 → 100755
Empty file.
17 changes: 7 additions & 10 deletions automation/marketplace-mcp/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "Node16",
"moduleResolution": "Node16",
"outDir": "./dist",
"rootDir": "./src",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noEmit": true,
"allowImportingTsExtensions": true,
"erasableSyntaxOnly": true,
"verbatimModuleSyntax": true,
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"types": ["node"]
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
"include": ["src/**/*"]
}
25 changes: 25 additions & 0 deletions automation/scripts/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { defineConfig } from "eslint/config";
import globals from "globals";
import js from "@eslint/js";

export default defineConfig([
{
files: ["**/*.{,m,c}js"],
languageOptions: {
globals: {
...globals.node,
...globals.es2021
},
ecmaVersion: 2021,
sourceType: "module"
}
},
{
files: ["**/*.{,m,c}js"],
plugins: { js },
extends: ["js/recommended"],
rules: {
"no-unused-vars": "warn"
}
}
]);
3 changes: 1 addition & 2 deletions automation/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"type": "module",
"scripts": {
"format": "prettier --write .",
"lint": "echo 'Lint disabled for now, please update package scripts'",
"lint:enableme": "eslint . --ext .mjs",
"lint": "eslint .",
"root-script:commitlint": "commitlint",
"root-script:format-staged": "pretty-quick --staged --config \"./.prettierrc.cjs\" --pattern \"**/{src,script,typings,test,**}/**/*.{cjs,mjs,js,jsx,ts,tsx,scss,xml,md,json}\"",
"update-screenshots": "node update-screenshots.mjs",
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions automation/utils/bin/rui-bump-version.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env ts-node-script
#!/usr/bin/env node

import { bumpPackageJson, bumpXml, hasPackageXml } from "../src/bump-version";
import { resolvePackagePath } from "../src/monorepo";
import { getPackageInfo, isReleasable } from "../src/package-info";
import { Version, versionRegex } from "../src/version";
import { bumpPackageJson, bumpXml, hasPackageXml } from "../src/bump-version.ts";
import { resolvePackagePath } from "../src/monorepo.ts";
import { getPackageInfo, isReleasable } from "../src/package-info.ts";
import { Version, versionRegex } from "../src/version.ts";

async function bumpPackage(path: string, version: string): Promise<void> {
bumpPackageJson(path, version);
Expand Down
18 changes: 10 additions & 8 deletions automation/utils/bin/rui-changelog-helper.ts
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/usr/bin/env ts-node-script
#!/usr/bin/env node

import { prompt } from "enquirer";
import { getPackageInfo, PackageListing, selectPackage } from "../src";
import enquirer from "enquirer";
import {
getModuleChangelog,
getWidgetChangelog,
ModuleChangelogFileWrapper,
WidgetChangelogFileWrapper
} from "../src/changelog-parser";
import { LogSection } from "../src/changelog-parser/types";
import { oraPromise } from "../src/cli-utils";
type ModuleChangelogFileWrapper,
type WidgetChangelogFileWrapper
} from "../src/changelog-parser/index.ts";
import type { LogSection } from "../src/changelog-parser/types.ts";
import { oraPromise } from "../src/cli-utils.ts";
import { getPackageInfo, type PackageListing, selectPackage } from "../src/index.ts";

const { prompt } = enquirer;

async function getChangelogSections(): Promise<LogSection[]> {
const sections: LogSection[] = [];
Expand Down
10 changes: 5 additions & 5 deletions automation/utils/bin/rui-changelog.ts
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env ts-node-script
#!/usr/bin/env node

import { getPackageChangelog, getWidgetChangelog } from "../src/changelog-parser";
import { SubComponentEntry } from "../src/changelog-parser/types";
import { listPackages, resolvePackagePath } from "../src/monorepo";
import { getPackageInfo, isReleasable } from "../src/package-info";
import { getPackageChangelog, getWidgetChangelog } from "../src/changelog-parser/index.ts";
import type { SubComponentEntry } from "../src/changelog-parser/types.ts";
import { listPackages, resolvePackagePath } from "../src/monorepo.ts";
import { getPackageInfo, isReleasable } from "../src/package-info.ts";

/**
* A module's own CHANGELOG.md never carries unreleased subcomponent entries:
Expand Down
14 changes: 7 additions & 7 deletions automation/utils/bin/rui-check-changelogs.ts
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env ts-node-script
#!/usr/bin/env node

import { Version } from "../src";
import { parse as parseModule } from "../src/changelog-parser/parser/module/module";
import { parse as parseWidget } from "../src/changelog-parser/parser/widget/widget";
import type { ModuleUnreleasedVersionEntry } from "../src/changelog-parser/types";
import { exec } from "../src/shell";
import { parse as parseModule } from "../src/changelog-parser/parser/module/module.mjs";
import { parse as parseWidget } from "../src/changelog-parser/parser/widget/widget.mjs";
import type { ModuleUnreleasedVersionEntry } from "../src/changelog-parser/types.ts";
import { Version } from "../src/index.ts";
import { exec } from "../src/shell.ts";

interface ChangelogChange {
filePath: string;
Expand Down Expand Up @@ -106,7 +106,7 @@ async function getChangedFiles(baseSha: string, mergedTreeSha: string): Promise<
* the SHA of the resulting tree.
*/
async function getMergedTreeSha(baseSha: string, headSha: string): Promise<string | null> {
let stdout = "";
let stdout: string;
let hasConflicts = false;

try {
Expand Down
12 changes: 6 additions & 6 deletions automation/utils/bin/rui-create-gh-release.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env ts-node-script
#!/usr/bin/env node
import { join, resolve } from "path";
import { addRemoteWithAuthentication } from "../src";
import { updateChangelogsAndCreatePR } from "../src/changelog";
import { gh } from "../src/github";
import { getPublishedInfo } from "../src/package-info";
import { exec, find } from "../src/shell";
import { updateChangelogsAndCreatePR } from "../src/changelog.ts";
import { gh } from "../src/github.ts";
import { addRemoteWithAuthentication } from "../src/index.ts";
import { getPublishedInfo } from "../src/package-info.ts";
import { exec, find } from "../src/shell.ts";

async function resolveChangelogBranch(releaseTag: string, remoteName: string): Promise<string> {
const { stdout } = await exec(`git rev-parse --abbrev-ref HEAD`, { stdio: "pipe" });
Expand Down
4 changes: 2 additions & 2 deletions automation/utils/bin/rui-create-jira-version.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env ts-node-script
#!/usr/bin/env node

import { Jira } from "../src/jira";
import { Jira } from "../src/jira.ts";

/**
* Jira version creation has historically 404'd transiently and must never block
Expand Down
14 changes: 6 additions & 8 deletions automation/utils/bin/rui-create-translation.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env ts-node-script
#!/usr/bin/env node
import { mkdir, writeFile } from "fs/promises";
import path from "node:path";
import { dirname } from "path";
import { getPackageFileContent, PackageSchema } from "../src";
import { readXml } from "../src/package-xml";
import { findCaptionsAndDescriptions, getWidgetXMLName, type Result } from "../src/widget-file-xml";
import { getPackageFileContent, PackageSchema } from "../src/index.ts";
import { readXml } from "../src/package-xml.ts";
import { findCaptionsAndDescriptions, getWidgetXMLName, type Result } from "../src/widget-file-xml.ts";
async function main(): Promise<void> {
console.log(`Creating translation i18n format...`);
const path = process.cwd();
Expand Down Expand Up @@ -38,15 +38,13 @@
}
}

export async function createTranslation(cwd: string) {

Check warning on line 41 in automation/utils/bin/rui-create-translation.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Missing return type on function
const widgetXMLName = await getWidgetXMLName(cwd);
if (widgetXMLName) {
const obj = await readXml(path.join(cwd, "src", widgetXMLName));
const res = findCaptionsAndDescriptions(obj);
let fileName = "result";
if (obj && typeof obj === "object" && obj["widget"] && obj["widget"]["@_id"]) {
fileName = obj["widget"]["@_id"].toLowerCase();
}
const widgetId = (obj as { widget?: { "@_id"?: string } } | undefined)?.widget?.["@_id"];
const fileName = widgetId ? widgetId.toLowerCase() : "result";
writeResultToFile(res, `dist/locales/en-US/${fileName}.json`);
writeResultToFile(res, `../../../dist/locales/en-US/${fileName}.json`);
}
Expand Down
6 changes: 3 additions & 3 deletions automation/utils/bin/rui-generate-oss-sbom.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env ts-node-script
#!/usr/bin/env node

import { homedir } from "node:os";
import { join } from "node:path";
import { gh } from "../src/github";
import { gh } from "../src/github.ts";
import {
createSBomGeneratorFolderStructure,
generateSBomArtifactsInFolder,
verifyAssetDigest
} from "../src/oss-clearance";
} from "../src/oss-clearance.ts";

async function main(): Promise<void> {
const releaseTag = process.argv[2];
Expand Down
12 changes: 6 additions & 6 deletions automation/utils/bin/rui-generate-package-xml.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env ts-node
#!/usr/bin/env node

import { writeClientPackageXml, ClientPackageXML } from "../src/package-xml-v2";
import { getWidgetInfo } from "../src/package-info";
import { readPropertiesFile } from "../src/package-xml-v2/properties-xml";
import path from "node:path";
import { existsSync } from "node:fs";
import path from "node:path";
import { getWidgetInfo } from "../src/package-info.ts";
import { type ClientPackageXML, writeClientPackageXml } from "../src/package-xml-v2/index.ts";
import { readPropertiesFile } from "../src/package-xml-v2/properties-xml.ts";

async function generatePackageXml(): Promise<void> {
const widgetDir = process.cwd();
Expand Down Expand Up @@ -45,7 +45,7 @@
await writeClientPackageXml(packageXmlPath, clientPackageXml);
}

async function main() {

Check warning on line 48 in automation/utils/bin/rui-generate-package-xml.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Missing return type on function
try {
await generatePackageXml();
} catch (error) {
Expand All @@ -54,6 +54,6 @@
}
}

if (require.main === module) {
if (import.meta.main) {
main();
}
10 changes: 5 additions & 5 deletions automation/utils/bin/rui-include-oss-in-artifact.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env ts-node-script
#!/usr/bin/env node

import { gh } from "../src/github";
import { includeReadmeOssIntoMpk } from "../src/oss-clearance";
import { rm } from "../src/shell";
import { mkdtemp, stat } from "node:fs/promises";
import { join } from "node:path";
import { tmpdir } from "node:os";
import { join } from "node:path";
import chalk from "chalk";
import { gh } from "../src/github.ts";
import { includeReadmeOssIntoMpk } from "../src/oss-clearance.ts";
import { rm } from "../src/shell.ts";

/**
* This script processes GitHub release artifacts to include READMEOSS HTML files into MPK files.
Expand Down
4 changes: 2 additions & 2 deletions automation/utils/bin/rui-merge-changelogs-pr.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env ts-node-script
#!/usr/bin/env node

import { GitHub } from "../src/github";
import { GitHub } from "../src/github.ts";

const ALLOWED_FILENAMES = new Set(["package.xml", "CHANGELOG.md", "package.json"]);

Expand Down
Loading
Loading