@netgreener/runtime 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.
- package/CHANGELOG.md +16 -0
- package/README.md +28 -0
- package/TUTORIAL.md +495 -0
- package/dist/aggregator.d.ts +43 -0
- package/dist/aggregator.js +270 -0
- package/dist/analyze/analyzeGate.d.ts +44 -0
- package/dist/analyze/analyzeGate.js +114 -0
- package/dist/analyze/apiOverconsumptionDetector.d.ts +13 -0
- package/dist/analyze/apiOverconsumptionDetector.js +75 -0
- package/dist/analyze/astDetectors.d.ts +38 -0
- package/dist/analyze/astDetectors.js +566 -0
- package/dist/analyze/buildResourceFindings.d.ts +34 -0
- package/dist/analyze/buildResourceFindings.js +86 -0
- package/dist/analyze/cli.d.ts +20 -0
- package/dist/analyze/cli.js +186 -0
- package/dist/analyze/cpuResourceDetectors.d.ts +35 -0
- package/dist/analyze/cpuResourceDetectors.js +163 -0
- package/dist/analyze/heuristicScan.d.ts +61 -0
- package/dist/analyze/heuristicScan.js +91 -0
- package/dist/analyze/index.d.ts +15 -0
- package/dist/analyze/index.js +15 -0
- package/dist/analyze/loadTypescript.d.ts +8 -0
- package/dist/analyze/loadTypescript.js +23 -0
- package/dist/analyze/memoryIoDetectors.d.ts +15 -0
- package/dist/analyze/memoryIoDetectors.js +68 -0
- package/dist/analyze/preferAstDetectors.d.ts +18 -0
- package/dist/analyze/preferAstDetectors.js +91 -0
- package/dist/analyze/projectScan.d.ts +19 -0
- package/dist/analyze/projectScan.js +115 -0
- package/dist/analyze/resourceAdmission.d.ts +33 -0
- package/dist/analyze/resourceAdmission.js +91 -0
- package/dist/analyze/resourceFindingCandidate.d.ts +61 -0
- package/dist/analyze/resourceFindingCandidate.js +75 -0
- package/dist/analyze/retryAmplificationDetector.d.ts +11 -0
- package/dist/analyze/retryAmplificationDetector.js +55 -0
- package/dist/analyze/schemas/resource-finding.schema.json +352 -0
- package/dist/analyze/serviceDiscovery.d.ts +66 -0
- package/dist/analyze/serviceDiscovery.js +210 -0
- package/dist/analyze/unboundedParallelismDetector.d.ts +11 -0
- package/dist/analyze/unboundedParallelismDetector.js +57 -0
- package/dist/analyze/validateResourceFinding.d.ts +19 -0
- package/dist/analyze/validateResourceFinding.js +46 -0
- package/dist/bullmq.d.ts +33 -0
- package/dist/bullmq.js +106 -0
- package/dist/cli/helpText.d.ts +8 -0
- package/dist/cli/helpText.js +99 -0
- package/dist/cli/netgreener.d.ts +12 -0
- package/dist/cli/netgreener.js +65 -0
- package/dist/collectorIpc.d.ts +28 -0
- package/dist/collectorIpc.js +189 -0
- package/dist/collectorMetadata.d.ts +15 -0
- package/dist/collectorMetadata.js +33 -0
- package/dist/config.d.ts +41 -0
- package/dist/config.js +97 -0
- package/dist/contract/index.d.ts +1 -0
- package/dist/contract/index.js +1 -0
- package/dist/contract/observation-envelope.schema.json +331 -0
- package/dist/contract/observation-protobuf-view.schema.json +773 -0
- package/dist/contract/observation-v1.d.mts +42 -0
- package/dist/contract/observation-v1.mjs +555 -0
- package/dist/contract/observationIdentity.d.ts +11 -0
- package/dist/contract/observationIdentity.js +48 -0
- package/dist/contract/observationProjection.d.ts +3 -0
- package/dist/contract/observationProjection.js +29 -0
- package/dist/contract/validate.d.ts +20 -0
- package/dist/contract/validate.js +227 -0
- package/dist/dogfood/mp3WorkerGates.d.ts +54 -0
- package/dist/dogfood/mp3WorkerGates.js +86 -0
- package/dist/dogfood/retainDryRunArtifact.d.ts +45 -0
- package/dist/dogfood/retainDryRunArtifact.js +103 -0
- package/dist/dogfood/tenantDogfoodGates.d.ts +76 -0
- package/dist/dogfood/tenantDogfoodGates.js +206 -0
- package/dist/exporter.d.ts +56 -0
- package/dist/exporter.js +304 -0
- package/dist/express.d.ts +44 -0
- package/dist/express.js +118 -0
- package/dist/externalApiMeter.d.ts +72 -0
- package/dist/externalApiMeter.js +1167 -0
- package/dist/fastify.d.ts +53 -0
- package/dist/fastify.js +148 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +31 -0
- package/dist/n4/deploymentMatrix.d.ts +22 -0
- package/dist/n4/deploymentMatrix.js +57 -0
- package/dist/n4/missingnessInventory.d.ts +22 -0
- package/dist/n4/missingnessInventory.js +72 -0
- package/dist/nest.d.ts +42 -0
- package/dist/nest.js +87 -0
- package/dist/processResources.d.ts +28 -0
- package/dist/processResources.js +31 -0
- package/dist/processRuntime.d.ts +35 -0
- package/dist/processRuntime.js +96 -0
- package/dist/requestContext.d.ts +21 -0
- package/dist/requestContext.js +33 -0
- package/dist/runtime.d.ts +60 -0
- package/dist/runtime.js +289 -0
- package/dist/runtimeHealth.d.ts +35 -0
- package/dist/runtimeHealth.js +121 -0
- package/dist/serverlessHints.d.ts +26 -0
- package/dist/serverlessHints.js +52 -0
- package/dist/tenantContext.d.ts +78 -0
- package/dist/tenantContext.js +226 -0
- package/dist/tenantDefaults.d.ts +9 -0
- package/dist/tenantDefaults.js +9 -0
- package/dist/types.d.ts +131 -0
- package/dist/types.js +2 -0
- package/dist/uploader.d.ts +23 -0
- package/dist/uploader.js +52 -0
- package/dist/windowId.d.ts +2 -0
- package/dist/windowId.js +7 -0
- package/examples/analyze-manifest.mjs +30 -0
- package/examples/bullmq-live-smoke.mjs +178 -0
- package/examples/bullmq-mp3-worker-gate.mjs +237 -0
- package/examples/express-dry-run.mjs +72 -0
- package/examples/process-mp3-restart-gate.mjs +135 -0
- package/examples/retain-dry-run.mjs +110 -0
- package/examples/tenant-dogfood.mjs +269 -0
- package/fixtures/analyze-sample/architectureNoise.ts +13 -0
- package/fixtures/analyze-sample/cpuHotPaths.ts +27 -0
- package/fixtures/analyze-sample/fanOutClient.ts +15 -0
- package/fixtures/analyze-sample/inferenceHotPaths.ts +22 -0
- package/fixtures/analyze-sample/memoryIoHotPaths.ts +21 -0
- package/fixtures/analyze-sample/modelLoadHotPaths.ts +11 -0
- package/fixtures/analyze-sample/nestedLookup.ts +15 -0
- package/fixtures/analyze-sample/retryClient.ts +10 -0
- package/fixtures/analyze-sample/securitySmell.ts +8 -0
- package/fixtures/analyze-sample/server.ts +11 -0
- package/fixtures/analyze-sample/styleOnly.ts +7 -0
- package/fixtures/analyze-sample/worker.ts +4 -0
- package/fixtures/dual-view-projection.v1.json +53 -0
- package/fixtures/identity-preimages.v1.json +42 -0
- package/fixtures/mp2_shadow_digest_golden.v1.json +47 -0
- package/fixtures/projection-batch-document.v1.json +170 -0
- package/fixtures/projection-batch.v1.json +9 -0
- package/fixtures/python_reference_shapes.md +24 -0
- package/fixtures/session_metadata_runtime_v0.json +120 -0
- package/fixtures/session_metadata_with_tenant.json +85 -0
- package/package.json +137 -0
package/package.json
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@netgreener/runtime",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "NetGreener Node.js Runtime beta — thin adapter uploading RunSessions to existing api_server.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"netgreener": "./dist/cli/netgreener.js",
|
|
10
|
+
"netgreener-analyze": "./dist/analyze/cli.js"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./contract": {
|
|
18
|
+
"types": "./dist/contract/index.d.ts",
|
|
19
|
+
"import": "./dist/contract/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./express": {
|
|
22
|
+
"types": "./dist/express.d.ts",
|
|
23
|
+
"import": "./dist/express.js"
|
|
24
|
+
},
|
|
25
|
+
"./fastify": {
|
|
26
|
+
"types": "./dist/fastify.d.ts",
|
|
27
|
+
"import": "./dist/fastify.js"
|
|
28
|
+
},
|
|
29
|
+
"./nest": {
|
|
30
|
+
"types": "./dist/nest.d.ts",
|
|
31
|
+
"import": "./dist/nest.js"
|
|
32
|
+
},
|
|
33
|
+
"./analyze": {
|
|
34
|
+
"types": "./dist/analyze/index.d.ts",
|
|
35
|
+
"import": "./dist/analyze/index.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"!dist/tests",
|
|
41
|
+
"!dist/tests/**",
|
|
42
|
+
"fixtures",
|
|
43
|
+
"examples",
|
|
44
|
+
"README.md",
|
|
45
|
+
"TUTORIAL.md",
|
|
46
|
+
"CHANGELOG.md"
|
|
47
|
+
],
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsc -p tsconfig.json && node scripts/copy-contract-assets.mjs",
|
|
50
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
51
|
+
"test": "npm run build && node scripts/run-tests.mjs && npm run conformance:test",
|
|
52
|
+
"conformance:test": "node --test conformance/tck-adapter.test.mjs && node scripts/validate-contract-integration.mjs",
|
|
53
|
+
"conformance:check": "npm run build && npm run conformance:test",
|
|
54
|
+
"conformance:run": "npm run conformance:check && node scripts/run-contract-conformance.mjs",
|
|
55
|
+
"example:dry-run": "npm run build && node examples/express-dry-run.mjs",
|
|
56
|
+
"example:dogfood-tenant": "npm run build && node examples/tenant-dogfood.mjs",
|
|
57
|
+
"example:bullmq-live-smoke": "npm run build && node examples/bullmq-live-smoke.mjs",
|
|
58
|
+
"example:bullmq-mp3-gate": "npm run build && node examples/bullmq-mp3-worker-gate.mjs",
|
|
59
|
+
"example:process-mp3-gate": "npm run build && node examples/process-mp3-restart-gate.mjs",
|
|
60
|
+
"example:analyze-manifest": "npm run build && node examples/analyze-manifest.mjs",
|
|
61
|
+
"example:analyze-smoke": "npm run build && node scripts/analyze-smoke.mjs",
|
|
62
|
+
"example:analyze-cli": "npm run build && node dist/analyze/cli.js",
|
|
63
|
+
"example:analyze-cli-smoke": "npm run build && node scripts/analyze-cli-smoke.mjs",
|
|
64
|
+
"example:cli-smoke": "npm run build && node scripts/cli-smoke.mjs",
|
|
65
|
+
"example:pack-smoke": "npm run build && node scripts/pack-smoke.mjs",
|
|
66
|
+
"example:production-prep-smoke": "npm run build && node scripts/production-prep-smoke.mjs",
|
|
67
|
+
"example:publish-prep": "npm run build && node scripts/publish-prep.mjs",
|
|
68
|
+
"example:sbom-prep": "node scripts/sbom-prep.mjs",
|
|
69
|
+
"example:push-github-public": "node scripts/push-github-public.mjs",
|
|
70
|
+
"example:retain-dry-run": "npm run build && node examples/retain-dry-run.mjs",
|
|
71
|
+
"example:dry-run-artifact-smoke": "npm run build && node scripts/dry-run-artifact-smoke.mjs",
|
|
72
|
+
"test:observation": "npm run build && node --test conformance/observation-v1.test.mjs"
|
|
73
|
+
},
|
|
74
|
+
"engines": {
|
|
75
|
+
"node": "^22.0.0 || ^24.0.0"
|
|
76
|
+
},
|
|
77
|
+
"repository": {
|
|
78
|
+
"type": "git",
|
|
79
|
+
"url": "https://github.com/NetGreener/netgreener-runtime.git"
|
|
80
|
+
},
|
|
81
|
+
"homepage": "https://netgreener.com",
|
|
82
|
+
"bugs": {
|
|
83
|
+
"url": "https://dev.azure.com/nexadeeds/NetGreener/_workitems"
|
|
84
|
+
},
|
|
85
|
+
"keywords": [
|
|
86
|
+
"netgreener",
|
|
87
|
+
"runtime",
|
|
88
|
+
"energy",
|
|
89
|
+
"carbon",
|
|
90
|
+
"express",
|
|
91
|
+
"fastify",
|
|
92
|
+
"observability"
|
|
93
|
+
],
|
|
94
|
+
"license": "UNLICENSED",
|
|
95
|
+
"private": false,
|
|
96
|
+
"peerDependencies": {
|
|
97
|
+
"axios": ">=1",
|
|
98
|
+
"bullmq": ">=4",
|
|
99
|
+
"express": ">=4",
|
|
100
|
+
"fastify": ">=4",
|
|
101
|
+
"typescript": ">=5"
|
|
102
|
+
},
|
|
103
|
+
"peerDependenciesMeta": {
|
|
104
|
+
"axios": {
|
|
105
|
+
"optional": true
|
|
106
|
+
},
|
|
107
|
+
"express": {
|
|
108
|
+
"optional": true
|
|
109
|
+
},
|
|
110
|
+
"fastify": {
|
|
111
|
+
"optional": true
|
|
112
|
+
},
|
|
113
|
+
"bullmq": {
|
|
114
|
+
"optional": true
|
|
115
|
+
},
|
|
116
|
+
"typescript": {
|
|
117
|
+
"optional": true
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"devDependencies": {
|
|
121
|
+
"@types/express": "^4.17.21",
|
|
122
|
+
"@types/node": "^22.10.0",
|
|
123
|
+
"axios": "^1.20.0",
|
|
124
|
+
"express": "^4.21.2",
|
|
125
|
+
"fastify": "^5.12.5",
|
|
126
|
+
"typescript": "^5.7.2",
|
|
127
|
+
"undici": "^6.28.1"
|
|
128
|
+
},
|
|
129
|
+
"dependencies": {
|
|
130
|
+
"ajv": "^8.20.0",
|
|
131
|
+
"ajv-formats": "^3.0.1"
|
|
132
|
+
},
|
|
133
|
+
"publishConfig": {
|
|
134
|
+
"access": "public",
|
|
135
|
+
"provenance": true
|
|
136
|
+
}
|
|
137
|
+
}
|