@netgreener/runtime 0.1.9 → 0.1.11

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/aggregator.d.ts +2 -0
  3. package/dist/aggregator.js +33 -13
  4. package/dist/analyze/buildResourceFindings.d.ts +1 -1
  5. package/dist/analyze/buildResourceFindings.js +4 -2
  6. package/dist/analyze/findingGuidance.d.ts +14 -0
  7. package/dist/analyze/findingGuidance.js +52 -0
  8. package/dist/analyze/index.d.ts +3 -2
  9. package/dist/analyze/index.js +3 -2
  10. package/dist/analyze/projectScan.d.ts +3 -1
  11. package/dist/analyze/projectScan.js +29 -6
  12. package/dist/analyze/resourceFindingCandidate.d.ts +6 -0
  13. package/dist/analyze/resourceFindingCandidate.js +11 -0
  14. package/dist/analyze/serviceDiscovery.d.ts +23 -1
  15. package/dist/analyze/serviceDiscovery.js +164 -4
  16. package/dist/externalApiMeter.d.ts +8 -1
  17. package/dist/externalApiMeter.js +118 -25
  18. package/dist/index.d.ts +3 -1
  19. package/dist/index.js +3 -1
  20. package/dist/managedCollectorLauncher.d.ts +2 -1
  21. package/dist/managedCollectorLauncher.js +2 -1
  22. package/dist/mcpToolMeter.d.ts +101 -0
  23. package/dist/mcpToolMeter.js +496 -0
  24. package/dist/next.d.ts +28 -0
  25. package/dist/next.js +143 -10
  26. package/dist/nextConfig.d.ts +34 -0
  27. package/dist/nextConfig.js +73 -0
  28. package/dist/nextEntryTransform.d.ts +9 -0
  29. package/dist/nextEntryTransform.js +181 -0
  30. package/dist/runtime.d.ts +12 -6
  31. package/dist/runtime.js +113 -52
  32. package/dist/runtimeHealth.js +1 -1
  33. package/dist/tenantContext.d.ts +3 -0
  34. package/dist/tenantContext.js +35 -9
  35. package/dist/types.d.ts +8 -0
  36. package/examples/azure-functions-gate/.funcignore +6 -0
  37. package/examples/azure-functions-gate/README.md +25 -0
  38. package/examples/azure-functions-gate/host.json +15 -0
  39. package/examples/azure-functions-gate/package-lock.json +161 -0
  40. package/examples/azure-functions-gate/package.json +14 -0
  41. package/examples/azure-functions-gate/src/functions/health.js +27 -0
  42. package/fixtures/git/canonical_git_key_vectors.v1.json +66 -0
  43. package/loaders/next-entry-loader.cjs +14 -0
  44. package/package.json +3 -1
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Isolated Azure Functions gate for serverless-thin live run_id evidence.
3
+ * Does not modify existing NetGreener Azure resources.
4
+ */
5
+ import { app } from '@azure/functions'
6
+ import { NetGreener } from '@netgreener/runtime'
7
+
8
+ NetGreener.init({ runtime: 'auto' })
9
+
10
+ app.http('health', {
11
+ methods: ['GET', 'POST'],
12
+ authLevel: 'anonymous',
13
+ handler: async (_request, _context) => {
14
+ try {
15
+ return {
16
+ status: 200,
17
+ jsonBody: {
18
+ ok: true,
19
+ gate: 'CHK-R6.serverless-degraded',
20
+ platform: 'azure_functions',
21
+ },
22
+ }
23
+ } finally {
24
+ await NetGreener.flushForInvokeEnd()
25
+ }
26
+ },
27
+ })
@@ -0,0 +1,66 @@
1
+ {
2
+ "version": 1,
3
+ "description": "OP1 canonical git keys — CLI, SDK, Node, and VSCE must agree on every vector.",
4
+ "vectors": [
5
+ {
6
+ "in": "https://github.com/Org/NetGreener.git",
7
+ "out": "github.com/org/netgreener",
8
+ "note": "github https"
9
+ },
10
+ {
11
+ "in": "git@github.com:Org/NetGreener.git",
12
+ "out": "github.com/org/netgreener",
13
+ "note": "github ssh"
14
+ },
15
+ {
16
+ "in": "http://github.com/Org/NetGreener",
17
+ "out": "github.com/org/netgreener",
18
+ "note": "github http upgrade"
19
+ },
20
+ {
21
+ "in": "https://gitlab.com/Group/Sub/Repo.git",
22
+ "out": "gitlab.com/group/sub/repo",
23
+ "note": "gitlab nested path"
24
+ },
25
+ {
26
+ "in": "https://dev.azure.com/Contoso/Payments/_git/payments-api",
27
+ "out": "dev.azure.com/contoso/payments/payments-api",
28
+ "note": "ado https three-part"
29
+ },
30
+ {
31
+ "in": "https://dev.azure.com/Contoso/Payments/_git/payments-api.git",
32
+ "out": "dev.azure.com/contoso/payments/payments-api",
33
+ "note": "ado https with .git"
34
+ },
35
+ {
36
+ "in": "https://user:pat@dev.azure.com/Contoso/Payments/_git/payments-api",
37
+ "out": "dev.azure.com/contoso/payments/payments-api",
38
+ "note": "ado https strip credentials"
39
+ },
40
+ {
41
+ "in": "https://Contoso.visualstudio.com/Payments/_git/payments-api",
42
+ "out": "dev.azure.com/contoso/payments/payments-api",
43
+ "note": "ado visualstudio.com host"
44
+ },
45
+ {
46
+ "in": "git@ssh.dev.azure.com:v3/Contoso/Payments/payments-api",
47
+ "out": "dev.azure.com/contoso/payments/payments-api",
48
+ "note": "ado ssh v3"
49
+ },
50
+ {
51
+ "in": "ssh://git@ssh.dev.azure.com/v3/Contoso/Payments/payments-api",
52
+ "out": "dev.azure.com/contoso/payments/payments-api",
53
+ "note": "ado ssh:// v3"
54
+ },
55
+ {
56
+ "in": "",
57
+ "out": null,
58
+ "note": "empty"
59
+ },
60
+ {
61
+ "in": " ",
62
+ "out": null,
63
+ "note": "whitespace"
64
+ }
65
+ ]
66
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Webpack / Turbopack loader. Wraps Next.js route, page, and server-action
3
+ * exports. No-ops for every other module.
4
+ */
5
+ const { transformNextEntrySource } = require('../dist/nextEntryTransform.js')
6
+
7
+ module.exports = function netgreenerNextEntryLoader(source) {
8
+ const filename = (this && this.resourcePath) || ''
9
+ try {
10
+ return transformNextEntrySource(String(source), filename)
11
+ } catch {
12
+ return source
13
+ }
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netgreener/runtime",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "NetGreener Node.js Runtime — Express/Fastify/Nest/Next/process adapter uploading RunSessions to api_server.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,10 +49,12 @@
49
49
  },
50
50
  "files": [
51
51
  "dist",
52
+ "loaders",
52
53
  "!dist/tests",
53
54
  "!dist/tests/**",
54
55
  "fixtures",
55
56
  "examples",
57
+ "!examples/**/node_modules/**",
56
58
  "README.md",
57
59
  "TUTORIAL.md",
58
60
  "CHANGELOG.md"