@flowatlas/markers 0.1.0

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.
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Annotations for the few places static analysis cannot reach.
3
+ *
4
+ * Every marker is a no-op at run time: it exists so that the extractor can read
5
+ * it out of the source, and it must never change how the annotated code
6
+ * behaves. That is also why this package has no dependencies at all and does
7
+ * not use metadata reflection.
8
+ *
9
+ * Reach for a marker only where analysis is genuinely blind, such as a channel
10
+ * name that comes from configuration or a target URL built at run time.
11
+ * Annotating what can be derived produces documentation that rots.
12
+ */
13
+ /** A decorator that does nothing, in either the standard or the legacy form. */
14
+ export type MarkerDecorator = (...args: unknown[]) => void;
15
+ export declare const MARKER_NAMES: readonly ['Emits', 'Consumes', 'CallsService', 'FlowEntry', 'ContractIgnore'];
16
+ export type MarkerName = (typeof MARKER_NAMES)[number];
17
+ export declare const isMarkerName: (value: string) => value is MarkerName;
18
+ /**
19
+ * This method publishes to `channel`.
20
+ *
21
+ * For a channel name the analyser cannot follow, typically one read from
22
+ * configuration.
23
+ */
24
+ export declare const Emits: (channel: string) => MarkerDecorator;
25
+ /** This method receives from `channel`. */
26
+ export declare const Consumes: (channel: string) => MarkerDecorator;
27
+ /**
28
+ * This method calls another service.
29
+ *
30
+ * `route` is the method and path of the target, e.g. `POST /invoices`. For URLs
31
+ * assembled at run time.
32
+ */
33
+ export declare const CallsService: (service: string, route: string) => MarkerDecorator;
34
+ /** Names the flow this entry point starts, for reporting. */
35
+ export declare const FlowEntry: (name: string) => MarkerDecorator;
36
+ /** Contract drift here is intentional; report it, do not fail on it. */
37
+ export declare const ContractIgnore: () => MarkerDecorator;
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,gFAAgF;AAChF,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;AAI3D,eAAO,MAAM,YAAY,YACvB,OAAO,EACP,UAAU,EACV,cAAc,EACd,WAAW,EACX,gBAAgB,CACR,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,eAAO,MAAM,YAAY,UAAW,MAAM,KAAG,KAAK,IAAI,UACD,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,KAAK,YAAa,MAAM,KAAG,eAAuB,CAAC;AAEhE,2CAA2C;AAC3C,eAAO,MAAM,QAAQ,YAAa,MAAM,KAAG,eAAuB,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,YAAa,MAAM,SAAS,MAAM,KAAG,eAAuB,CAAC;AAEtF,6DAA6D;AAC7D,eAAO,MAAM,SAAS,SAAU,MAAM,KAAG,eAAuB,CAAC;AAEjE,wEAAwE;AACxE,eAAO,MAAM,cAAc,QAAO,eAAuB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Annotations for the few places static analysis cannot reach.
3
+ *
4
+ * Every marker is a no-op at run time: it exists so that the extractor can read
5
+ * it out of the source, and it must never change how the annotated code
6
+ * behaves. That is also why this package has no dependencies at all and does
7
+ * not use metadata reflection.
8
+ *
9
+ * Reach for a marker only where analysis is genuinely blind, such as a channel
10
+ * name that comes from configuration or a target URL built at run time.
11
+ * Annotating what can be derived produces documentation that rots.
12
+ */
13
+ const noop = () => undefined;
14
+ export const MARKER_NAMES = [
15
+ 'Emits',
16
+ 'Consumes',
17
+ 'CallsService',
18
+ 'FlowEntry',
19
+ 'ContractIgnore',
20
+ ];
21
+ export const isMarkerName = (value) => MARKER_NAMES.includes(value);
22
+ /**
23
+ * This method publishes to `channel`.
24
+ *
25
+ * For a channel name the analyser cannot follow, typically one read from
26
+ * configuration.
27
+ */
28
+ export const Emits = (channel) => noop;
29
+ /** This method receives from `channel`. */
30
+ export const Consumes = (channel) => noop;
31
+ /**
32
+ * This method calls another service.
33
+ *
34
+ * `route` is the method and path of the target, e.g. `POST /invoices`. For URLs
35
+ * assembled at run time.
36
+ */
37
+ export const CallsService = (service, route) => noop;
38
+ /** Names the flow this entry point starts, for reporting. */
39
+ export const FlowEntry = (name) => noop;
40
+ /** Contract drift here is intentional; report it, do not fail on it. */
41
+ export const ContractIgnore = () => noop;
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,MAAM,IAAI,GAAoB,GAAG,EAAE,CAAC,SAAS,CAAC;AAE9C,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO;IACP,UAAU;IACV,cAAc;IACd,WAAW;IACX,gBAAgB;CACR,CAAC;AAIX,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAa,EAAuB,EAAE,CAChE,YAAkC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,OAAe,EAAmB,EAAE,CAAC,IAAI,CAAC;AAEhE,2CAA2C;AAC3C,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAmB,EAAE,CAAC,IAAI,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,KAAa,EAAmB,EAAE,CAAC,IAAI,CAAC;AAEtF,6DAA6D;AAC7D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAY,EAAmB,EAAE,CAAC,IAAI,CAAC;AAEjE,wEAAwE;AACxE,MAAM,CAAC,MAAM,cAAc,GAAG,GAAoB,EAAE,CAAC,IAAI,CAAC"}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@flowatlas/markers",
3
+ "version": "0.1.0",
4
+ "description": "Annotations that tell flowatlas what static reading cannot work out.",
5
+ "license": "MIT",
6
+ "author": {
7
+ "name": "Ruslan Panevschi",
8
+ "url": "https://github.com/Panevschi-Ruslan"
9
+ },
10
+ "homepage": "https://github.com/Panevschi-Ruslan/flowatlas#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/Panevschi-Ruslan/flowatlas/issues"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/Panevschi-Ruslan/flowatlas.git",
17
+ "directory": "packages/markers"
18
+ },
19
+ "keywords": [
20
+ "monorepo",
21
+ "polyrepo",
22
+ "static-analysis",
23
+ "dependency-graph",
24
+ "typescript",
25
+ "nestjs",
26
+ "angular",
27
+ "mcp",
28
+ "architecture"
29
+ ],
30
+ "type": "module",
31
+ "main": "./dist/index.js",
32
+ "types": "./dist/index.d.ts",
33
+ "exports": {
34
+ ".": {
35
+ "types": "./dist/index.d.ts",
36
+ "default": "./dist/index.js"
37
+ }
38
+ },
39
+ "files": [
40
+ "dist"
41
+ ],
42
+ "engines": {
43
+ "node": ">=20"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public"
47
+ },
48
+ "scripts": {
49
+ "build": "tsc -p tsconfig.build.json",
50
+ "typecheck": "tsc -p tsconfig.json",
51
+ "test": "vitest run --passWithNoTests"
52
+ }
53
+ }