@egintegrations/telemetry 0.2.0 → 0.2.1

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/dist/cli.js CHANGED
@@ -111,8 +111,21 @@ async function appendEnvFile(envPath, content) {
111
111
  await fs2.promises.writeFile(envPath, updated, "utf-8");
112
112
  console.log(`\u2713 Updated: ${envPath}`);
113
113
  }
114
- function validateSku(sku) {
115
- return /^\d+\.\d+\.\d+/.test(sku);
114
+ function loadSkuStandards() {
115
+ const standardsDir = path2.join(__dirname, "standards");
116
+ const systemTypesPath = path2.join(standardsDir, "system_types.json");
117
+ const platformsPath = path2.join(standardsDir, "platforms.json");
118
+ const systemTypes = JSON.parse(
119
+ fs2.readFileSync(systemTypesPath, "utf-8")
120
+ );
121
+ const platforms = JSON.parse(
122
+ fs2.readFileSync(platformsPath, "utf-8")
123
+ );
124
+ return { systemTypes, platforms };
125
+ }
126
+ function buildSku(version, systemType, platform, date) {
127
+ const skuDate = date || (/* @__PURE__ */ new Date()).toISOString().slice(0, 10).replace(/-/g, "");
128
+ return `${version}.${systemType}.${platform}.${skuDate}`;
116
129
  }
117
130
 
118
131
  // src/cli/prompts.ts
@@ -126,12 +139,34 @@ async function gatherOptions(cliArgs, detected) {
126
139
  validate: (v) => v.length > 0 || "Engine name is required"
127
140
  });
128
141
  }
142
+ let skuComponents = {};
129
143
  if (!cliArgs.sku) {
144
+ const standards = loadSkuStandards();
130
145
  questions.push({
131
146
  type: "text",
132
- name: "sku",
133
- message: "SKU version (e.g., 1.0.0):",
134
- validate: (v) => validateSku(v) || "Invalid SKU format (expected: X.Y.Z...)"
147
+ name: "skuVersion",
148
+ message: "Version (MAJOR.MINOR.PATCH, e.g., 1.0.0):",
149
+ validate: (v) => /^\d+\.\d+\.\d+$/.test(v) || "Invalid version format (expected: X.Y.Z)"
150
+ });
151
+ questions.push({
152
+ type: "select",
153
+ name: "skuType",
154
+ message: "System Type:",
155
+ choices: standards.systemTypes.map((t) => ({
156
+ title: `${t.code} - ${t.label}`,
157
+ description: t.description,
158
+ value: t.code
159
+ }))
160
+ });
161
+ questions.push({
162
+ type: "select",
163
+ name: "skuPlatform",
164
+ message: "Platform:",
165
+ choices: standards.platforms.map((p) => ({
166
+ title: `${p.code} - ${p.label}`,
167
+ description: p.description,
168
+ value: p.code
169
+ }))
135
170
  });
136
171
  }
137
172
  if (!cliArgs.url) {
@@ -181,9 +216,15 @@ async function gatherOptions(cliArgs, detected) {
181
216
  process.exit(0);
182
217
  }
183
218
  });
219
+ let finalSku = cliArgs.sku;
220
+ if (!finalSku && answers.skuVersion && answers.skuType && answers.skuPlatform) {
221
+ finalSku = buildSku(answers.skuVersion, answers.skuType, answers.skuPlatform);
222
+ console.log(`
223
+ \u{1F4E6} Generated SKU: ${finalSku}`);
224
+ }
184
225
  return {
185
226
  engine: cliArgs.engine || answers.engine,
186
- sku: cliArgs.sku || answers.sku,
227
+ sku: finalSku,
187
228
  url: cliArgs.url || answers.url,
188
229
  token: cliArgs.token || answers.token || void 0,
189
230
  modules: cliArgs.modules,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egintegrations/telemetry",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Telemetry SDK for EGIntegrations client engines",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -45,6 +45,7 @@
45
45
  },
46
46
  "files": [
47
47
  "dist",
48
- "README.md"
48
+ "README.md",
49
+ "src/cli/standards"
49
50
  ]
50
51
  }
@@ -0,0 +1,202 @@
1
+ [
2
+ {
3
+ "code": "EKS",
4
+ "label": "AWS EKS (Kubernetes)",
5
+ "description": "Amazon Elastic Kubernetes Service",
6
+ "provider": "AWS",
7
+ "type": "managed-kubernetes",
8
+ "notes": "Preferred for production containerized workloads on AWS"
9
+ },
10
+ {
11
+ "code": "GKE",
12
+ "label": "Google Kubernetes Engine",
13
+ "description": "Google's managed Kubernetes service",
14
+ "provider": "GCP",
15
+ "type": "managed-kubernetes",
16
+ "notes": "Preferred for production containerized workloads on GCP"
17
+ },
18
+ {
19
+ "code": "AKS",
20
+ "label": "Azure Kubernetes Service",
21
+ "description": "Microsoft Azure managed Kubernetes",
22
+ "provider": "Azure",
23
+ "type": "managed-kubernetes",
24
+ "notes": "Preferred for production containerized workloads on Azure"
25
+ },
26
+ {
27
+ "code": "K8S",
28
+ "label": "Kubernetes (generic)",
29
+ "description": "Self-managed or other Kubernetes distributions",
30
+ "provider": "Various",
31
+ "type": "kubernetes",
32
+ "notes": "Use for DigitalOcean, Linode, self-hosted K8s"
33
+ },
34
+ {
35
+ "code": "DK",
36
+ "label": "Docker (generic container build/runtime)",
37
+ "description": "Docker containers, docker-compose",
38
+ "provider": "Various",
39
+ "type": "container",
40
+ "notes": "For Docker-based deployments without orchestration"
41
+ },
42
+ {
43
+ "code": "DKO",
44
+ "label": "Docker Offline (air-gapped/off-net)",
45
+ "description": "Docker in air-gapped or offline environments",
46
+ "provider": "Various",
47
+ "type": "container",
48
+ "notes": "For secure/isolated environments"
49
+ },
50
+ {
51
+ "code": "LM",
52
+ "label": "AWS Lambda",
53
+ "description": "AWS serverless functions",
54
+ "provider": "AWS",
55
+ "type": "serverless",
56
+ "notes": "For event-driven, serverless workloads"
57
+ },
58
+ {
59
+ "code": "CF",
60
+ "label": "Cloudflare (Workers/Pages)",
61
+ "description": "Cloudflare Workers and Pages",
62
+ "provider": "Cloudflare",
63
+ "type": "edge-compute",
64
+ "notes": "Edge compute and static hosting"
65
+ },
66
+ {
67
+ "code": "VE",
68
+ "label": "Vercel",
69
+ "description": "Vercel serverless platform",
70
+ "provider": "Vercel",
71
+ "type": "serverless",
72
+ "notes": "Optimized for Next.js and frontend frameworks"
73
+ },
74
+ {
75
+ "code": "FH",
76
+ "label": "Firebase Hosting",
77
+ "description": "Google Firebase static hosting",
78
+ "provider": "GCP",
79
+ "type": "static-hosting",
80
+ "notes": "For static sites and SPAs"
81
+ },
82
+ {
83
+ "code": "EC2",
84
+ "label": "AWS EC2",
85
+ "description": "Amazon Elastic Compute Cloud VMs",
86
+ "provider": "AWS",
87
+ "type": "vm",
88
+ "notes": "Traditional VM-based deployments"
89
+ },
90
+ {
91
+ "code": "CR",
92
+ "label": "Google Cloud Run",
93
+ "description": "Google's container-as-a-service platform",
94
+ "provider": "GCP",
95
+ "type": "managed-container",
96
+ "notes": "Managed container runtime with auto-scaling"
97
+ },
98
+ {
99
+ "code": "ECS",
100
+ "label": "AWS ECS",
101
+ "description": "Amazon Elastic Container Service",
102
+ "provider": "AWS",
103
+ "type": "managed-container",
104
+ "notes": "AWS-native container orchestration"
105
+ },
106
+ {
107
+ "code": "AP",
108
+ "label": "AWS App Runner",
109
+ "description": "AWS fully managed container application service",
110
+ "provider": "AWS",
111
+ "type": "managed-container",
112
+ "notes": "Simplified container deployments"
113
+ },
114
+ {
115
+ "code": "EXP",
116
+ "label": "Expo (mobile)",
117
+ "description": "Expo platform for React Native",
118
+ "provider": "Expo",
119
+ "type": "mobile-platform",
120
+ "notes": "React Native mobile app builds and OTA updates"
121
+ },
122
+ {
123
+ "code": "APP",
124
+ "label": "App Stores (iOS/Android)",
125
+ "description": "Apple App Store and Google Play Store",
126
+ "provider": "Apple/Google",
127
+ "type": "mobile-distribution",
128
+ "notes": "Native app distribution"
129
+ },
130
+ {
131
+ "code": "OP",
132
+ "label": "On-Prem (customer environment)",
133
+ "description": "Customer-managed infrastructure",
134
+ "provider": "Customer",
135
+ "type": "on-premise",
136
+ "notes": "Deployed to customer's own infrastructure"
137
+ },
138
+ {
139
+ "code": "LH",
140
+ "label": "Local Host (dev/test deliverable)",
141
+ "description": "Local development or testing environment",
142
+ "provider": "Dev",
143
+ "type": "local",
144
+ "notes": "Not for production use"
145
+ },
146
+ {
147
+ "code": "PYPI",
148
+ "label": "Python Package Index",
149
+ "description": "Python package distribution",
150
+ "provider": "PyPI",
151
+ "type": "package-registry",
152
+ "notes": "For Python SDK/library distribution"
153
+ },
154
+ {
155
+ "code": "NPM",
156
+ "label": "npm Registry",
157
+ "description": "Node.js package distribution",
158
+ "provider": "npm",
159
+ "type": "package-registry",
160
+ "notes": "For JavaScript/TypeScript package distribution"
161
+ },
162
+ {
163
+ "code": "GH",
164
+ "label": "GitHub Releases",
165
+ "description": "GitHub release artifacts",
166
+ "provider": "GitHub",
167
+ "type": "artifact-distribution",
168
+ "notes": "For CLI tools, binaries, and releases"
169
+ },
170
+ {
171
+ "code": "GHA",
172
+ "label": "GitHub Actions",
173
+ "description": "CI/CD on GitHub Actions",
174
+ "provider": "GitHub",
175
+ "type": "ci-cd",
176
+ "notes": "For test suites and automation that runs in CI"
177
+ },
178
+ {
179
+ "code": "AWS",
180
+ "label": "Amazon Web Services (generic)",
181
+ "description": "Generic AWS deployment",
182
+ "provider": "AWS",
183
+ "type": "cloud-platform",
184
+ "notes": "Use when specific AWS service is unknown or mixed"
185
+ },
186
+ {
187
+ "code": "GCP",
188
+ "label": "Google Cloud Platform (generic)",
189
+ "description": "Generic GCP deployment",
190
+ "provider": "GCP",
191
+ "type": "cloud-platform",
192
+ "notes": "Use when specific GCP service is unknown or mixed"
193
+ },
194
+ {
195
+ "code": "AZR",
196
+ "label": "Microsoft Azure (generic)",
197
+ "description": "Generic Azure deployment",
198
+ "provider": "Azure",
199
+ "type": "cloud-platform",
200
+ "notes": "Use when specific Azure service is unknown or mixed"
201
+ }
202
+ ]
@@ -0,0 +1,130 @@
1
+ [
2
+ {
3
+ "code": "API",
4
+ "label": "API service / microservice",
5
+ "description": "RESTful or GraphQL API endpoints, backend services",
6
+ "examples": ["FastAPI backend", "Express API", "Django REST", "gRPC service"],
7
+ "typical_platforms": ["EKS", "GKE", "DK", "LM"],
8
+ "notes": "Use for any backend service exposing HTTP/RPC endpoints"
9
+ },
10
+ {
11
+ "code": "BOT",
12
+ "label": "Chatbot / Automation agent",
13
+ "description": "Event-driven automation, background workers, message processors, bots",
14
+ "examples": ["Discord bot", "Slack bot", "Queue worker", "Cron jobs", "Telegram bot"],
15
+ "typical_platforms": ["EKS", "GKE", "DK", "LM"],
16
+ "notes": "Includes both conversational bots and background automation workers"
17
+ },
18
+ {
19
+ "code": "MA",
20
+ "label": "Mobile App (native or hybrid)",
21
+ "description": "Native or hybrid mobile applications for iOS/Android",
22
+ "examples": ["React Native app", "Flutter app", "Swift/Kotlin native", "Expo app"],
23
+ "typical_platforms": ["EXP", "CF", "APP"],
24
+ "notes": "SKU tracks the app binary/release, not backend services"
25
+ },
26
+ {
27
+ "code": "WA",
28
+ "label": "Web Application (interactive web apps, portals)",
29
+ "description": "Frontend web applications (SPAs, SSR, SSG)",
30
+ "examples": ["React SPA", "Next.js app", "Vue app", "Angular", "Svelte"],
31
+ "typical_platforms": ["VE", "CF", "EKS", "FH"],
32
+ "notes": "Use for user-facing web applications"
33
+ },
34
+ {
35
+ "code": "RAG",
36
+ "label": "Retrieval-Augmented Generation (AI systems with retrieval)",
37
+ "description": "RAG systems with vector search, embeddings, and LLM integration",
38
+ "examples": ["LangChain RAG", "LlamaIndex app", "Pinecone integration", "Semantic search"],
39
+ "typical_platforms": ["EKS", "LM", "EC2"],
40
+ "notes": "Specifically for RAG architectures, not general AI"
41
+ },
42
+ {
43
+ "code": "DA",
44
+ "label": "Data Analytics / Dashboard",
45
+ "description": "Data processing, analytics pipelines, BI dashboards",
46
+ "examples": ["Metabase", "Superset", "dbt models", "Tableau integration"],
47
+ "typical_platforms": ["EKS", "EC2", "GKE"],
48
+ "notes": "Use for analytics/BI tools and data visualization"
49
+ },
50
+ {
51
+ "code": "AI",
52
+ "label": "AI pipeline/agent (non-RAG)",
53
+ "description": "Machine learning models, inference APIs, training pipelines",
54
+ "examples": ["TensorFlow Serving", "PyTorch models", "Hugging Face", "OpenAI integration"],
55
+ "typical_platforms": ["EKS", "LM", "EC2"],
56
+ "notes": "Use for AI/ML services that aren't RAG-specific"
57
+ },
58
+ {
59
+ "code": "CMS",
60
+ "label": "Content Management System",
61
+ "description": "Content management systems, headless CMS, documentation sites",
62
+ "examples": ["Strapi", "Docusaurus", "Sanity", "WordPress"],
63
+ "typical_platforms": ["EKS", "VE", "FH"],
64
+ "notes": "Includes both traditional and headless CMS"
65
+ },
66
+ {
67
+ "code": "DB",
68
+ "label": "Database system / data layer deliverable",
69
+ "description": "Managed databases, data stores, database migrations",
70
+ "examples": ["PostgreSQL", "MongoDB", "Redis", "Elasticsearch"],
71
+ "typical_platforms": ["AWS", "GCP", "AZR", "DK"],
72
+ "notes": "Use for database instances or migration projects"
73
+ },
74
+ {
75
+ "code": "OP",
76
+ "label": "Operations Tool",
77
+ "description": "Internal tooling, admin panels, DevOps utilities, on-prem systems",
78
+ "examples": ["Admin dashboard", "Deployment tool", "Monitoring agent", "CLI tool"],
79
+ "typical_platforms": ["EKS", "DK", "EC2", "OP"],
80
+ "notes": "Internal tools not exposed to end users"
81
+ },
82
+ {
83
+ "code": "ETL",
84
+ "label": "Data pipelines (extract/transform/load)",
85
+ "description": "ETL/ELT pipelines, data ingestion, data transformation",
86
+ "examples": ["Airflow DAGs", "dbt", "Fivetran sync", "Custom ETL"],
87
+ "typical_platforms": ["LM", "EKS", "GKE", "EC2"],
88
+ "notes": "Any data pipeline or transformation workflow"
89
+ },
90
+ {
91
+ "code": "INT",
92
+ "label": "Integration/Orchestration layer",
93
+ "description": "Third-party API integrations, middleware, webhooks",
94
+ "examples": ["Stripe integration", "Salesforce sync", "Zapier connector", "Webhook processor"],
95
+ "typical_platforms": ["LM", "EKS", "CF"],
96
+ "notes": "Services that connect or orchestrate other systems"
97
+ },
98
+ {
99
+ "code": "FX",
100
+ "label": "Feature module/add-on shipped as a distinct unit",
101
+ "description": "Serverless functions, edge functions, feature modules",
102
+ "examples": ["AWS Lambda function", "Cloudflare Workers", "Vercel Functions"],
103
+ "typical_platforms": ["LM", "CF", "VE"],
104
+ "notes": "Small, single-purpose functions or modules"
105
+ },
106
+ {
107
+ "code": "SDK",
108
+ "label": "Client/developer SDK deliverable",
109
+ "description": "Client libraries, SDKs, packages for developers",
110
+ "examples": ["Python package", "npm library", "Go module", "REST client"],
111
+ "typical_platforms": ["PYPI", "NPM", "GH"],
112
+ "notes": "Distributed as packages, not deployed services"
113
+ },
114
+ {
115
+ "code": "CLI",
116
+ "label": "Command-line tool",
117
+ "description": "Command-line interface tools and utilities",
118
+ "examples": ["Deployment CLI", "Admin CLI", "Data migration tool"],
119
+ "typical_platforms": ["GH", "PYPI", "NPM"],
120
+ "notes": "Downloadable/installable CLI tools"
121
+ },
122
+ {
123
+ "code": "QA",
124
+ "label": "QA/Test harness deliverable",
125
+ "description": "Test suites, E2E testing, load testing, QA automation",
126
+ "examples": ["Playwright tests", "k6 load tests", "Postman collections", "Selenium"],
127
+ "typical_platforms": ["GHA", "EKS", "GKE"],
128
+ "notes": "Testing infrastructure and automation"
129
+ }
130
+ ]