Skip to content
Merged
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
14 changes: 14 additions & 0 deletions .changeset/young-jobs-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@sigyn/notifiers": major
"@sigyn/discord": major
"@sigyn/morphix": major
"@sigyn/pattern": major
"@sigyn/config": major
"@sigyn/agent": major
"@sigyn/logql": major
"@sigyn/slack": major
"@sigyn/teams": major
"@sigyn/lab": major
---

Migrate to ESM and remove tsdown
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
package-lock=false
save-exact=true
ignore-scripts=true
19 changes: 8 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,19 @@
"src/lab"
],
"devDependencies": {
"@changesets/changelog-github": "0.6.0",
"@changesets/cli": "2.30.0",
"@lavamoat/allow-scripts": "3.4.3",
"@lavamoat/preinstall-always-fail": "2.1.1",
"@changesets/changelog-github": "0.7.0",
"@changesets/cli": "2.31.1",
"@openally/config.eslint": "^2.4.2",
"@openally/config.typescript": "1.2.1",
"@types/node": "^25.0.2",
"c8": "^11.0.0",
"@openally/config.typescript": "1.3.0",
"@types/node": "26.1.2",
"c8": "12.0.0",
"fastify": "^5.2.0",
"pino-loki": "^3.0.0",
"testcontainers": "11.12.0",
"tsdown": "^0.21.7",
"testcontainers": "12.0.4",
"typescript": "^5.7.2",
"vitepress": "^1.5.0"
},
"optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "^4.31.0"
"allowScripts": {
"better-sqlite3": true
}
}
26 changes: 7 additions & 19 deletions src/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@
"version": "4.1.1",
"description": "Loki alerting agent",
"type": "module",
"main": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"exports": {
".": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"exports": "./dist/index.js",
"engines": {
"node": ">=24"
},
"scripts": {
"build": "npm exec allow-scripts && tsdown src/index.ts --format esm --dts --clean",
"build": "tsc",
"dev": "npm run build -- --watch",
"prepublishOnly": "npm run build",
"test": "node --env-file-if-exists=.env --test-concurrency=1 --test ./test/**/*.spec.ts",
Expand All @@ -30,7 +23,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/OpenAlly/sigyn",
"url": "git+https://github.com/OpenAlly/sigyn.git",
"directory": "src/agent"
},
"bugs": {
Expand All @@ -46,14 +39,14 @@
"license": "MIT",
"dependencies": {
"@openally/httpie": "^1.1.2",
"@myunisoft/loki": "^6.0.0",
"@openally/result": "^2.0.0",
"better-sqlite3": "^12.2.0",
"@openally/loki": "7.0.2",
"@openally/result": "3.1.0",
"better-sqlite3": "13.0.2",
"cron-parser": "^5.3.0",
"dayjs": "^1.11.13",
"ms": "^2.1.3",
"pino": "^10.0.0",
"toad-scheduler": "^3.0.1"
"toad-scheduler": "4.1.0"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.12",
Expand All @@ -62,10 +55,5 @@
},
"optionalDependencies": {
"pino-pretty": "13.1.3"
},
"lavamoat": {
"allowScripts": {
"better-sqlite3": true
}
}
}
2 changes: 1 addition & 1 deletion src/agent/src/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import {
GrafanaApi,
type Datasource as GrafanaDatasource
} from "@myunisoft/loki";
} from "@openally/loki";

export class Datasource {
#grafanaApi: GrafanaApi;
Expand Down
2 changes: 1 addition & 1 deletion src/agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import timers from "node:timers/promises";

// Import Third-party Dependencies
import { initConfig } from "@sigyn/config";
import { GrafanaApi } from "@myunisoft/loki";
import { GrafanaApi } from "@openally/loki";
import { Agent, setGlobalDispatcher } from "@openally/httpie";
import { ToadScheduler, CronJob, SimpleIntervalJob } from "toad-scheduler";
import { pino } from "pino";
Expand Down
2 changes: 1 addition & 1 deletion src/agent/src/rules.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Import Third-party Dependencies
import { type SigynInitializedRule } from "@sigyn/config";
import { type LokiCombined } from "@myunisoft/loki";
import { type LokiCombined } from "@openally/loki";
import dayjs from "dayjs";
import ms from "ms";
import { CronExpressionParser } from "cron-parser";
Expand Down
2 changes: 1 addition & 1 deletion src/agent/src/tasks/asyncTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { performance } from "node:perf_hooks";

// Import Third-party Dependencies
import { type SigynInitializedRule } from "@sigyn/config";
import { GrafanaApi } from "@myunisoft/loki";
import { GrafanaApi } from "@openally/loki";
import { AsyncTask } from "toad-scheduler";
import ms from "ms";

Expand Down
6 changes: 5 additions & 1 deletion src/agent/test/FT/rule.walkOnLogs.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable max-nested-callbacks */
// Import Node.js Dependencies
import assert from "node:assert";
import path from "node:path";
Expand Down Expand Up @@ -212,7 +213,10 @@ describe("Rule.walkOnLogs()", () => {

assert.equal(getRule(ruleConfig).counter, 0);

const createAlert = await pollingIn200ms(rule, Array.from(Array(5)).map(() => "one new log"));
const createAlert = await pollingIn200ms(
rule,
Array.from(Array(5)).map(() => "one new log")
);

assert.equal(createAlert.ok, true);
// once alert triggers, counter should be reset to 0
Expand Down
2 changes: 1 addition & 1 deletion src/agent/test/e2e/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import path from "node:path";
import { DockerComposeEnvironment } from "testcontainers";
import { MockAgent, setGlobalDispatcher } from "@openally/httpie";
import Fastify from "fastify";
import { GrafanaApi } from "@myunisoft/loki";
import { GrafanaApi } from "@openally/loki";

// CONSTANTS
const kMockAgent = new MockAgent();
Expand Down
17 changes: 5 additions & 12 deletions src/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@
"version": "4.0.0",
"description": "Sigyn configuration manager",
"type": "module",
"main": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"exports": {
".": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"exports": "./dist/index.js",
"engines": {
"node": ">=24"
},
"scripts": {
"build": "tsdown src/index.ts --format esm --dts --clean",
"build": "tsc",
"prepublishOnly": "npm run build",
"test": "node --test ./test/**/*.spec.ts",
"coverage": "c8 -r html npm test",
Expand All @@ -28,7 +21,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/OpenAlly/sigyn",
"url": "git+https://github.com/OpenAlly/sigyn.git",
"directory": "src/config"
},
"bugs": {
Expand All @@ -42,12 +35,12 @@
"author": "GENTILHOMME Thomas <gentilhomme.thomas@gmail.com>",
"license": "MIT",
"dependencies": {
"@myunisoft/loki": "^6.0.0",
"@openally/loki": "7.0.2",
"ajv": "^8.17.1",
"ajv-keywords": "^5.1.0",
"minimatch": "^10.0.1"
},
"devDependencies": {
"@openally/httpie": "^1.1.2"
"undici": "8.0.2"
}
}
2 changes: 1 addition & 1 deletion src/config/src/utils/rules.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Import Third-party Dependencies
import { GrafanaApi } from "@myunisoft/loki";
import { GrafanaApi } from "@openally/loki";

// Import Internal Dependencies
import type {
Expand Down
2 changes: 1 addition & 1 deletion src/config/test/utils.initializeRules.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
MockAgent,
getGlobalDispatcher,
setGlobalDispatcher
} from "@openally/httpie";
} from "undici";

// Import Internal Dependencies
import * as utils from "../src/utils/index.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/config/test/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
MockAgent,
getGlobalDispatcher,
setGlobalDispatcher
} from "@openally/httpie";
} from "undici";

// Import Internal Dependencies
import * as utils from "../src/utils/index.ts";
Expand Down
13 changes: 3 additions & 10 deletions src/discord/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@
"version": "2.0.0",
"description": "Send Sigyn alerts to Discord via webhook",
"type": "module",
"main": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"exports": {
".": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"exports": "./dist/index.js",
"engines": {
"node": ">=24"
},
"scripts": {
"build": "tsdown src/index.ts --format esm --dts --clean",
"build": "tsc",
"prepublishOnly": "npm run build",
"test": "node --test ./test/**/*.spec.ts",
"coverage": "c8 -r html npm test",
Expand All @@ -28,7 +21,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/OpenAlly/sigyn",
"url": "git+https://github.com/OpenAlly/sigyn.git",
"directory": "src/discord"
},
"bugs": {
Expand Down
4 changes: 2 additions & 2 deletions src/lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/OpenAlly/sigyn",
"url": "git+https://github.com/OpenAlly/sigyn.git",
"directory": "src/lab"
},
"bugs": {
Expand All @@ -34,8 +34,8 @@
"author": "GENTILHOMME Thomas <gentilhomme.thomas@gmail.com>",
"license": "MIT",
"dependencies": {
"@myunisoft/loki": "^6.0.0",
"@ngneat/falso": "^8.0.2",
"@openally/loki": "7.0.2",
"ts-pattern": "5.9.0"
}
}
2 changes: 1 addition & 1 deletion src/lab/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from "node:path";

// Import Third-party Dependencies
import { DockerComposeEnvironment } from "testcontainers";
import { GrafanaApi } from "@myunisoft/loki";
import { GrafanaApi } from "@openally/loki";

// Import Internal Dependencies
import {
Expand Down
2 changes: 1 addition & 1 deletion src/lab/src/seeder/logs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Import Third-party Dependencies
import { randIp, randSuperhero } from "@ngneat/falso";
import type { LokiIngestLogs } from "@myunisoft/loki";
import type { LokiIngestLogs } from "@openally/loki";

// Import Internal Dependencies
import * as httpSeeder from "./http.ts";
Expand Down
13 changes: 3 additions & 10 deletions src/logql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@
"version": "2.2.0",
"description": "Parse and serialize LogQL queries",
"type": "module",
"main": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"exports": {
".": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"exports": "./dist/index.js",
"engines": {
"node": ">=24"
},
"scripts": {
"build": "tsdown src/index.ts --format esm --dts --clean",
"build": "tsc",
"prepublishOnly": "npm run build",
"test": "node --test ./test/**/*.spec.ts",
"coverage": "c8 -r html npm test",
Expand All @@ -28,7 +21,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/OpenAlly/sigyn",
"url": "git+https://github.com/OpenAlly/sigyn.git",
"directory": "src/logql"
},
"bugs": {
Expand Down
11 changes: 3 additions & 8 deletions src/morphix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
"type": "module",
"main": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"exports": {
".": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"exports": "./dist/index.js",
"engines": {
"node": ">=24"
},
"scripts": {
"build": "tsdown src/index.ts --format esm --dts --clean",
"build": "tsc",
"prepublishOnly": "npm run build",
"test": "node --test ./test/**/*.spec.ts",
"coverage": "c8 -r html npm test",
Expand All @@ -28,7 +23,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/OpenAlly/sigyn",
"url": "git+https://github.com/OpenAlly/sigyn.git",
"directory": "src/morphix"
},
"bugs": {
Expand Down
Loading
Loading