ingestron 0.17.8 → 1.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/NOTICE +3 -5
- package/README.md +26 -74
- package/THIRD_PARTY_NOTICES +148 -0
- package/dist/main.js +29708 -0
- package/package.json +32 -65
- package/project-templates/kafka/README.md +12 -0
- package/project-templates/kafka/connections/events.yaml +8 -0
- package/project-templates/kafka/contracts/page_views.yaml +13 -0
- package/project-templates/kafka/contracts/purchases.yaml +13 -0
- package/project-templates/kafka/flows/events.yaml +10 -0
- package/project-templates/kafka/project.yaml +10 -0
- package/project-templates/kafka/standard.yaml +4 -0
- package/project-templates/kafka/template.yaml +3 -0
- package/project-templates/minimal/README.md +10 -0
- package/project-templates/minimal/connections/shop.yaml +7 -0
- package/project-templates/minimal/contracts/orders.yaml +14 -0
- package/project-templates/minimal/flows/orders.yaml +6 -0
- package/project-templates/minimal/project.yaml +11 -0
- package/project-templates/minimal/standard.yaml +4 -0
- package/project-templates/minimal/template.yaml +7 -0
- package/project-templates/private-files/README.md +29 -0
- package/project-templates/private-files/connections/share.yaml +10 -0
- package/project-templates/private-files/contracts/sales.yaml +14 -0
- package/project-templates/private-files/contracts/stock.yaml +14 -0
- package/project-templates/private-files/flows/stores.yaml +9 -0
- package/project-templates/private-files/platform.yaml +11 -0
- package/project-templates/private-files/project.yaml +19 -0
- package/project-templates/private-files/standard.yaml +11 -0
- package/project-templates/private-files/template.yaml +10 -0
- package/project-templates/private-sql-server/README.md +25 -0
- package/project-templates/private-sql-server/connections/erp.yaml +10 -0
- package/project-templates/private-sql-server/contracts/customers.yaml +14 -0
- package/project-templates/private-sql-server/contracts/invoices.yaml +15 -0
- package/project-templates/private-sql-server/flows/erp.yaml +13 -0
- package/project-templates/private-sql-server/platform.yaml +11 -0
- package/project-templates/private-sql-server/project.yaml +19 -0
- package/project-templates/private-sql-server/standard.yaml +17 -0
- package/project-templates/private-sql-server/template.yaml +10 -0
- package/project-templates/pyspark/README.md +12 -0
- package/project-templates/pyspark/connections/billing.yaml +7 -0
- package/project-templates/pyspark/contracts/invoices.yaml +16 -0
- package/project-templates/pyspark/contracts/monthly_revenue.yaml +14 -0
- package/project-templates/pyspark/flows/billing.yaml +6 -0
- package/project-templates/pyspark/project.yaml +11 -0
- package/project-templates/pyspark/standard.yaml +4 -0
- package/project-templates/pyspark/template.yaml +3 -0
- package/project-templates/pyspark/transforms/monthly_revenue.py +10 -0
- package/project-templates/pyspark/transforms/monthly_revenue.yaml +10 -0
- package/project-templates/retail/README.md +22 -0
- package/project-templates/retail/connections/shop.yaml +8 -0
- package/project-templates/retail/contracts/customers.yaml +12 -0
- package/project-templates/retail/contracts/daily_sales.yaml +19 -0
- package/project-templates/retail/contracts/orders.yaml +16 -0
- package/project-templates/retail/flows/shop.yaml +18 -0
- package/project-templates/retail/platform.yaml +21 -0
- package/project-templates/retail/project.yaml +18 -0
- package/project-templates/retail/standard.yaml +15 -0
- package/project-templates/retail/template.yaml +10 -0
- package/project-templates/retail/transforms/daily_sales.sql +7 -0
- package/project-templates/retail/transforms/daily_sales.yaml +7 -0
- package/project-templates/salesforce/README.md +6 -0
- package/project-templates/salesforce/connections/salesforce.yaml +7 -0
- package/project-templates/salesforce/contracts/accounts.yaml +13 -0
- package/project-templates/salesforce/contracts/opportunities.yaml +14 -0
- package/project-templates/salesforce/flows/salesforce.yaml +7 -0
- package/project-templates/salesforce/project.yaml +9 -0
- package/project-templates/salesforce/standard.yaml +4 -0
- package/project-templates/salesforce/template.yaml +3 -0
- package/project-templates/sql-server/README.md +17 -0
- package/project-templates/sql-server/connections/erp.yaml +8 -0
- package/project-templates/sql-server/contracts/customer_balances.yaml +13 -0
- package/project-templates/sql-server/contracts/customers.yaml +13 -0
- package/project-templates/sql-server/contracts/invoices.yaml +14 -0
- package/project-templates/sql-server/flows/erp.yaml +13 -0
- package/project-templates/sql-server/platform.yaml +6 -0
- package/project-templates/sql-server/project.yaml +13 -0
- package/project-templates/sql-server/standard.yaml +9 -0
- package/project-templates/sql-server/template.yaml +3 -0
- package/project-templates/sql-server/transforms/customer_balances.sql +5 -0
- package/project-templates/sql-server/transforms/customer_balances.yaml +6 -0
- package/recipes/connections/adls-gen2.yaml +7 -0
- package/recipes/connections/amazon-rds-oracle.yaml +9 -0
- package/recipes/connections/amazon-rds-sqlserver.yaml +9 -0
- package/recipes/connections/amazon-redshift.yaml +10 -0
- package/recipes/connections/amazon-s3.yaml +8 -0
- package/recipes/connections/azure-blob.yaml +7 -0
- package/recipes/connections/azure-cosmos-db-mongodb.yaml +8 -0
- package/recipes/connections/azure-cosmos-db-nosql.yaml +8 -0
- package/recipes/connections/azure-cosmos-postgresql.yaml +10 -0
- package/recipes/connections/azure-data-explorer.yaml +8 -0
- package/recipes/connections/azure-databricks-delta.yaml +9 -0
- package/recipes/connections/azure-files.yaml +8 -0
- package/recipes/connections/azure-mysql.yaml +7 -0
- package/recipes/connections/azure-postgresql.yaml +10 -0
- package/recipes/connections/azure-sql-database.yaml +9 -0
- package/recipes/connections/azure-sql-managed-instance.yaml +9 -0
- package/recipes/connections/azure-synapse.yaml +9 -0
- package/recipes/connections/azure-table-storage.yaml +7 -0
- package/recipes/connections/cassandra.yaml +9 -0
- package/recipes/connections/dataverse.yaml +9 -0
- package/recipes/connections/db2.yaml +7 -0
- package/recipes/connections/dynamics-365.yaml +9 -0
- package/recipes/connections/dynamics-ax.yaml +11 -0
- package/recipes/connections/dynamics-crm.yaml +9 -0
- package/recipes/connections/fabric-lakehouse.yaml +8 -0
- package/recipes/connections/fabric-warehouse.yaml +9 -0
- package/recipes/connections/files.yaml +9 -0
- package/recipes/connections/ftp.yaml +9 -0
- package/recipes/connections/google-ads.yaml +12 -0
- package/recipes/connections/google-bigquery.yaml +8 -0
- package/recipes/connections/google-cloud-storage.yaml +8 -0
- package/recipes/connections/greenplum.yaml +10 -0
- package/recipes/connections/hdfs.yaml +9 -0
- package/recipes/connections/hive.yaml +11 -0
- package/recipes/connections/http.yaml +7 -0
- package/recipes/connections/hubspot.yaml +10 -0
- package/recipes/connections/impala.yaml +11 -0
- package/recipes/connections/informix.yaml +9 -0
- package/recipes/connections/jira.yaml +9 -0
- package/recipes/connections/mariadb.yaml +10 -0
- package/recipes/connections/microsoft-365.yaml +10 -0
- package/recipes/connections/microsoft-access.yaml +9 -0
- package/recipes/connections/mongodb-atlas.yaml +8 -0
- package/recipes/connections/mongodb.yaml +8 -0
- package/recipes/connections/mysql.yaml +10 -0
- package/recipes/connections/netezza.yaml +11 -0
- package/recipes/connections/odata.yaml +9 -0
- package/recipes/connections/odbc.yaml +9 -0
- package/recipes/connections/oracle-cloud-storage.yaml +9 -0
- package/recipes/connections/oracle.yaml +9 -0
- package/recipes/connections/postgresql.yaml +10 -0
- package/recipes/connections/presto.yaml +11 -0
- package/recipes/connections/quickbooks.yaml +10 -0
- package/recipes/connections/rest.yaml +12 -0
- package/recipes/connections/s3-compatible.yaml +9 -0
- package/recipes/connections/salesforce-service-cloud.yaml +10 -0
- package/recipes/connections/salesforce.yaml +10 -0
- package/recipes/connections/sap-bw-mdx.yaml +11 -0
- package/recipes/connections/sap-bw-open-hub.yaml +11 -0
- package/recipes/connections/sap-c4c.yaml +9 -0
- package/recipes/connections/sap-ecc.yaml +9 -0
- package/recipes/connections/sap-hana.yaml +7 -0
- package/recipes/connections/sap-table.yaml +11 -0
- package/recipes/connections/servicenow.yaml +9 -0
- package/recipes/connections/sftp.yaml +10 -0
- package/recipes/connections/sharepoint-online-list.yaml +10 -0
- package/recipes/connections/shopify.yaml +8 -0
- package/recipes/connections/snowflake.yaml +11 -0
- package/recipes/connections/spark.yaml +11 -0
- package/recipes/connections/sqlserver.yaml +9 -0
- package/recipes/connections/square.yaml +10 -0
- package/recipes/connections/sybase.yaml +10 -0
- package/recipes/connections/teradata.yaml +9 -0
- package/recipes/connections/vertica.yaml +10 -0
- package/recipes/connections/web-table.yaml +7 -0
- package/recipes/connections/xero.yaml +10 -0
- package/recipes/contracts/records.yaml +12 -0
- package/recipes/contracts/salesforce-account.yaml +12 -0
- package/recipes/flows/adls-gen2.yaml +14 -0
- package/recipes/flows/amazon-rds-oracle.yaml +12 -0
- package/recipes/flows/amazon-rds-sqlserver.yaml +12 -0
- package/recipes/flows/amazon-redshift.yaml +12 -0
- package/recipes/flows/amazon-s3.yaml +14 -0
- package/recipes/flows/azure-blob.yaml +14 -0
- package/recipes/flows/azure-cosmos-db-mongodb.yaml +12 -0
- package/recipes/flows/azure-cosmos-db-nosql.yaml +12 -0
- package/recipes/flows/azure-cosmos-postgresql.yaml +12 -0
- package/recipes/flows/azure-data-explorer.yaml +13 -0
- package/recipes/flows/azure-databricks-delta.yaml +15 -0
- package/recipes/flows/azure-files.yaml +14 -0
- package/recipes/flows/azure-mysql.yaml +12 -0
- package/recipes/flows/azure-postgresql.yaml +12 -0
- package/recipes/flows/azure-sql-database.yaml +12 -0
- package/recipes/flows/azure-sql-managed-instance.yaml +12 -0
- package/recipes/flows/azure-synapse.yaml +12 -0
- package/recipes/flows/azure-table-storage.yaml +12 -0
- package/recipes/flows/cassandra.yaml +12 -0
- package/recipes/flows/dataverse.yaml +12 -0
- package/recipes/flows/db2.yaml +12 -0
- package/recipes/flows/dynamics-365.yaml +12 -0
- package/recipes/flows/dynamics-ax.yaml +12 -0
- package/recipes/flows/dynamics-crm.yaml +12 -0
- package/recipes/flows/fabric-lakehouse.yaml +14 -0
- package/recipes/flows/fabric-warehouse.yaml +14 -0
- package/recipes/flows/files.yaml +14 -0
- package/recipes/flows/ftp.yaml +14 -0
- package/recipes/flows/google-ads.yaml +13 -0
- package/recipes/flows/google-bigquery.yaml +12 -0
- package/recipes/flows/google-cloud-storage.yaml +14 -0
- package/recipes/flows/greenplum.yaml +12 -0
- package/recipes/flows/hdfs.yaml +14 -0
- package/recipes/flows/hive.yaml +12 -0
- package/recipes/flows/http.yaml +18 -0
- package/recipes/flows/hubspot.yaml +12 -0
- package/recipes/flows/impala.yaml +12 -0
- package/recipes/flows/informix.yaml +13 -0
- package/recipes/flows/jira.yaml +12 -0
- package/recipes/flows/mariadb.yaml +13 -0
- package/recipes/flows/microsoft-365.yaml +19 -0
- package/recipes/flows/microsoft-access.yaml +13 -0
- package/recipes/flows/mongodb-atlas.yaml +12 -0
- package/recipes/flows/mongodb.yaml +12 -0
- package/recipes/flows/mysql.yaml +12 -0
- package/recipes/flows/netezza.yaml +13 -0
- package/recipes/flows/odata.yaml +12 -0
- package/recipes/flows/odbc.yaml +13 -0
- package/recipes/flows/oracle-cloud-storage.yaml +14 -0
- package/recipes/flows/oracle.yaml +12 -0
- package/recipes/flows/postgresql.yaml +18 -0
- package/recipes/flows/presto.yaml +12 -0
- package/recipes/flows/quickbooks.yaml +12 -0
- package/recipes/flows/rest.yaml +21 -0
- package/recipes/flows/s3-compatible.yaml +14 -0
- package/recipes/flows/salesforce-service-cloud.yaml +12 -0
- package/recipes/flows/salesforce.yaml +13 -0
- package/recipes/flows/sap-bw-mdx.yaml +14 -0
- package/recipes/flows/sap-bw-open-hub.yaml +13 -0
- package/recipes/flows/sap-c4c.yaml +12 -0
- package/recipes/flows/sap-ecc.yaml +13 -0
- package/recipes/flows/sap-hana.yaml +14 -0
- package/recipes/flows/sap-table.yaml +13 -0
- package/recipes/flows/servicenow.yaml +12 -0
- package/recipes/flows/sftp.yaml +14 -0
- package/recipes/flows/sharepoint-online-list.yaml +12 -0
- package/recipes/flows/shopify.yaml +12 -0
- package/recipes/flows/snowflake.yaml +15 -0
- package/recipes/flows/spark.yaml +12 -0
- package/recipes/flows/sqlserver.yaml +12 -0
- package/recipes/flows/square.yaml +13 -0
- package/recipes/flows/sybase.yaml +13 -0
- package/recipes/flows/teradata.yaml +12 -0
- package/recipes/flows/vertica.yaml +12 -0
- package/recipes/flows/web-table.yaml +14 -0
- package/recipes/flows/xero.yaml +12 -0
- package/recipes/platform.yaml +29 -0
- package/recipes/project.yaml +10 -0
- package/recipes/sample.yaml +3 -0
- package/recipes/standard.yaml +15 -0
- package/schemas/NOTICE.md +7 -0
- package/schemas/connection.schema.yaml +37 -0
- package/schemas/flow.schema.yaml +125 -0
- package/schemas/odcs-v3.1.0.schema.json +2808 -0
- package/schemas/platform.schema.yaml +260 -0
- package/schemas/standard.schema.yaml +211 -0
- package/schemas/transform.schema.yaml +108 -0
- package/templates/apply-contract.py.liquid +58 -0
- package/templates/change-data.sql.liquid +20 -0
- package/templates/materialised-view.py.liquid +28 -0
- package/templates/materialised-view.sql.liquid +4 -0
- package/templates/read-files.liquid +7 -0
- package/templates/streaming-table.sql.liquid +3 -0
- package/templates/table.liquid +17 -0
- package/CHANGELOG.md +0 -162
- package/SECURITY.md +0 -32
- package/THIRD_PARTY_NOTICES.md +0 -3678
- package/build/cli/cli/index.d.ts +0 -2
- package/build/cli/cli/index.js +0 -685
- package/build/cli/cli/operation-worker.d.ts +0 -1
- package/build/cli/cli/operation-worker.js +0 -5
- package/build/cli/cli/output.d.ts +0 -3
- package/build/cli/cli/output.js +0 -246
- package/build/cli/cli/plugin-browser.d.ts +0 -14
- package/build/cli/cli/plugin-browser.js +0 -74
- package/build/cli/cli/plugin-resolution.d.ts +0 -126
- package/build/cli/cli/plugin-resolution.js +0 -270
- package/build/cli/cli/presentation.d.ts +0 -12
- package/build/cli/cli/presentation.js +0 -57
- package/build/cli/cli/workflow-commands.d.ts +0 -15
- package/build/cli/cli/workflow-commands.js +0 -430
- package/build/cli/mcp/index.d.ts +0 -3
- package/build/cli/mcp/index.js +0 -67
- package/build/cli/version.d.ts +0 -2
- package/build/cli/version.js +0 -14
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** Keep package-network work off the presentation thread so progress reflects
|
|
2
|
-
* actual pending work. This worker uses the same JSON operations as MCP/Web. */
|
|
3
|
-
import { parentPort, workerData } from "node:worker_threads";
|
|
4
|
-
import { executePluginOperation } from "./plugin-resolution.js";
|
|
5
|
-
parentPort.postMessage(await executePluginOperation(workerData.context, workerData.operation, workerData.args));
|
package/build/cli/cli/output.js
DELETED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
/** Presentation is deliberately separate from operation results. JSON is the
|
|
2
|
-
* lossless API; terminal output is bounded, plain text and actionable. Never
|
|
3
|
-
* serialise arbitrary plugin data or resolved bindings in the default summary. */
|
|
4
|
-
import { friendlyReference } from "@ingestron/core/adapter";
|
|
5
|
-
import { stringify } from "yaml";
|
|
6
|
-
import { officialPlugins } from "./plugin-resolution.js";
|
|
7
|
-
export function exitCode(result) {
|
|
8
|
-
if (result.ok)
|
|
9
|
-
return 0;
|
|
10
|
-
const codes = result.diagnostics.map((d) => d.code);
|
|
11
|
-
if (codes.includes("CANCELLED"))
|
|
12
|
-
return 130;
|
|
13
|
-
if (codes.includes("NOT_IMPLEMENTED"))
|
|
14
|
-
return 4;
|
|
15
|
-
if (codes.some((c) => ["STALE", "OWNER", "CONFLICT"].includes(c)))
|
|
16
|
-
return 5;
|
|
17
|
-
if (codes.some((c) => [
|
|
18
|
-
"INPUT",
|
|
19
|
-
"BINDING",
|
|
20
|
-
"CAPABILITY",
|
|
21
|
-
"PACKAGE",
|
|
22
|
-
"OPTION",
|
|
23
|
-
"COMMAND",
|
|
24
|
-
"SCHEMA",
|
|
25
|
-
].includes(c)))
|
|
26
|
-
return 3;
|
|
27
|
-
return 2;
|
|
28
|
-
}
|
|
29
|
-
const clean = (value) => String(value).replace(/[\u0000-\u001f\u007f-\u009f]/g, " ");
|
|
30
|
-
// Data product ownership from ODCS contracts; absent with older core versions.
|
|
31
|
-
function dataProductLines(products, quality) {
|
|
32
|
-
if (!Array.isArray(products) || !products.length)
|
|
33
|
-
return "";
|
|
34
|
-
const summary = quality?.summary;
|
|
35
|
-
const shown = products.slice(0, 20).map((p) => {
|
|
36
|
-
const owners = Array.isArray(p.owners) ? p.owners.map(clean) : [];
|
|
37
|
-
return `\n ${clean(p.contract)} ${clean(p.status ?? "no status")} ${owners.length ? `owner ${owners.join(", ")}` : "no owner"}`;
|
|
38
|
-
});
|
|
39
|
-
const recorded = products.reduce((n, p) => n + Math.max(0, (p.qualityRules ?? 0) - (p.enforcedQualityRules ?? 0)), 0);
|
|
40
|
-
return ("\nData products:" +
|
|
41
|
-
shown.join("") +
|
|
42
|
-
(products.length > 20 ? `\n … ${products.length - 20} more` : "") +
|
|
43
|
-
(summary && summary.rules
|
|
44
|
-
? `\nQuality rules: ${summary.rules} (${summary.atLoad} at load, ${summary.afterLoad} after load, ${summary.unsupported} not enforced by the target${summary.documentation ? `, ${summary.documentation} documentation only` : ""}).`
|
|
45
|
-
: !summary && recorded
|
|
46
|
-
? `\n${recorded} quality rule(s) are recorded in contracts but not yet enforced.`
|
|
47
|
-
: ""));
|
|
48
|
-
}
|
|
49
|
-
// Quality results recorded by connector runtimes before commit; counts only.
|
|
50
|
-
function runQualityLine(flows) {
|
|
51
|
-
if (!Array.isArray(flows))
|
|
52
|
-
return "";
|
|
53
|
-
const rules = flows.flatMap((f) => Array.isArray(f?.quality) ? f.quality : []);
|
|
54
|
-
if (!rules.length)
|
|
55
|
-
return "";
|
|
56
|
-
const warned = rules.filter((r) => r.passed === false);
|
|
57
|
-
return `\nQuality rules: ${rules.length} checked before commit${warned.length
|
|
58
|
-
? `; ${warned.length} warning(s): ${warned
|
|
59
|
-
.slice(0, 5)
|
|
60
|
-
.map((r) => clean(r.id))
|
|
61
|
-
.join(", ")}${warned.length > 5 ? ", …" : ""}`
|
|
62
|
-
: ", all passed"}.`;
|
|
63
|
-
}
|
|
64
|
-
// Source routes from core (PB-064); absent with older core versions.
|
|
65
|
-
const costLabel = {
|
|
66
|
-
none: "no extra cost",
|
|
67
|
-
included: "included in platform pricing",
|
|
68
|
-
"separately-billed": "billed separately",
|
|
69
|
-
};
|
|
70
|
-
function routeLabel(route) {
|
|
71
|
-
const r = route?.reference;
|
|
72
|
-
const via = route?.route === "native"
|
|
73
|
-
? `native on ${clean(route.configuration)} via ${(route.standards ?? []).map(clean).join(", ")}`
|
|
74
|
-
: route?.route === "bridge"
|
|
75
|
-
? `bridge: lands on ${clean(route.via)}, ingests on ${clean(route.configuration)} via ${(route.standards ?? []).map(clean).join(" → ")}`
|
|
76
|
-
: `portable ${clean(route?.package ?? "connector")} on ${clean(route?.configuration)}`;
|
|
77
|
-
if (!r)
|
|
78
|
-
return `${via} [no reference record]`;
|
|
79
|
-
const stale = Date.now() - new Date(`${r.verified}T00:00:00Z`).getTime() >
|
|
80
|
-
180 * 86_400_000;
|
|
81
|
-
return `${via} [${clean(r.maturity)}, ${costLabel[r.cost?.model] ?? clean(r.cost?.model)}${stale ? `, record checked ${clean(r.verified)}` : ""}]`;
|
|
82
|
-
}
|
|
83
|
-
function sourceLines(sources) {
|
|
84
|
-
if (!Array.isArray(sources) || !sources.length)
|
|
85
|
-
return "";
|
|
86
|
-
return ("\nSources:" +
|
|
87
|
-
sources
|
|
88
|
-
.slice(0, 20)
|
|
89
|
-
.map((s) => `\n ${clean(s.flow)}: ${clean(s.connection)} (${clean(s.kind)}) ${routeLabel(s.selected)}` +
|
|
90
|
-
(s.alternative
|
|
91
|
-
? `\n Also available: ${routeLabel(s.alternative)}`
|
|
92
|
-
: ""))
|
|
93
|
-
.join("") +
|
|
94
|
-
(sources.length > 20 ? `\n … ${sources.length - 20} more` : "") +
|
|
95
|
-
"\nUse --json for every route with documentation, licence, cost and access.");
|
|
96
|
-
}
|
|
97
|
-
function pluginLabel(reference) {
|
|
98
|
-
for (const [name, entry] of Object.entries(officialPlugins)) {
|
|
99
|
-
const prefixes = [
|
|
100
|
-
`${entry.repository}/${entry.path}@`,
|
|
101
|
-
...(name === "local" ? [`${entry.repository}@`] : []),
|
|
102
|
-
];
|
|
103
|
-
for (const prefix of prefixes)
|
|
104
|
-
if (reference.startsWith(prefix)) {
|
|
105
|
-
const version = reference.slice(prefix.length);
|
|
106
|
-
if (/^\d+\.\d+\.\d+$/.test(version))
|
|
107
|
-
return `${name}@${version}`;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return friendlyReference(reference);
|
|
111
|
-
}
|
|
112
|
-
function lines(title, items, empty) {
|
|
113
|
-
if (!items.length)
|
|
114
|
-
return empty;
|
|
115
|
-
return `${title} (${items.length})\n${items
|
|
116
|
-
.slice(0, 20)
|
|
117
|
-
.map((i) => ` ${clean(i)}`)
|
|
118
|
-
.join("\n")}${items.length > 20 ? "\n More results available with --json or --verbose." : ""}`;
|
|
119
|
-
}
|
|
120
|
-
export function terminal(result, verbose = false, args = {}) {
|
|
121
|
-
if (!result.ok)
|
|
122
|
-
return result.diagnostics
|
|
123
|
-
.map((d) => `Error: ${clean(d.message)}${verbose ? ` [${d.code}]` : ""}${d.file ? `\n File: ${clean(d.file)}${clean(d.pointer ?? "")}` : ""}${d.hint ? `\n Next: ${clean(d.hint)}` : ""}`)
|
|
124
|
-
.join("\n");
|
|
125
|
-
const value = result.result;
|
|
126
|
-
if (verbose)
|
|
127
|
-
return `${result.operation.replaceAll("_", " ")}\n${typeof value === "string" ? value : stringify(value).trimEnd()}`;
|
|
128
|
-
if (value?.apiVersion === "ingestron.change/v1")
|
|
129
|
-
return (lines("Proposed file changes", value.changes.map((c) => `${c.before === null ? "Create" : "Update"} ${c.path}`), "No file changes needed.") + "\nPreview only; no files changed.");
|
|
130
|
-
if (value?.applied)
|
|
131
|
-
return lines("Saved files", value.files, "No file changes needed.");
|
|
132
|
-
switch (result.operation) {
|
|
133
|
-
case "plugin_browse":
|
|
134
|
-
return ((value.length
|
|
135
|
-
? "Installed plugins\n\n" +
|
|
136
|
-
value
|
|
137
|
-
.map((p) => ` ${clean(p.id).padEnd(13)} ${clean(p.name)} [${clean(p.kindLabel)} · ${clean(p.availability)}]\n ${clean(p.description)}\n ${clean(p.url)}`)
|
|
138
|
-
.join("\n\n")
|
|
139
|
-
: "No installed plugins match this search.") +
|
|
140
|
-
"\n\nInstall a provider: ingestron provider install local\nInstall a connector: ingestron connector install github");
|
|
141
|
-
case "plugin_versions":
|
|
142
|
-
return (lines(`Versions for ${value.provider}`, value.versions.map((v) => `${v.reference}${v.ambiguous ? " (conflicting tags; select a commit)" : ""}`), "No stable version tags found.") +
|
|
143
|
-
"\n\n" +
|
|
144
|
-
value.evidence +
|
|
145
|
-
"\nInstall: ingestron plugin install <owner/repository>@<version>");
|
|
146
|
-
case "packages_install":
|
|
147
|
-
return `${value.cached ? "Using cached" : "Installed"} ${args.kind ?? "plugin"} ${clean(pluginLabel(args.reference ?? value.reference ?? "package"))}.\nUse --verbose for the exact reference and licence information.`;
|
|
148
|
-
case "packages_list":
|
|
149
|
-
return lines("Installed plugins", Object.keys(value.packages).map(pluginLabel), "No plugins installed.\nNext: ingestron provider install local");
|
|
150
|
-
case "source_list":
|
|
151
|
-
return lines("Sources", value.map((s) => `${s.id} ${s.type}${s.format ? "/" + s.format : ""} ${s.execution}`), "No sources configured.\nNext: ingestron source add <name> --type <type>");
|
|
152
|
-
case "source_show":
|
|
153
|
-
return `Source ${clean(value.id)}\n Type: ${clean(value.type)}${value.format ? ` (${clean(value.format)})` : ""}\n Execution: ${clean(value.selected.execution)}\n Environment: ${clean(value.selected.environment)}\n Provider: ${clean(value.selected.provider ?? "project default")}\nUse --verbose to inspect connection references.`;
|
|
154
|
-
case "contract_list":
|
|
155
|
-
return lines("Contracts", value.map((c) => `${c.id} ${c.status} ${c.path}`), "No contracts drafted.\nNext: ingestron contract draft <name> --metadata <file>");
|
|
156
|
-
case "contract_show":
|
|
157
|
-
return (`Contract ${clean(value.id)} (${clean(value.status)})\n` +
|
|
158
|
-
lines("Entities", (value.schema ?? []).map((s) => `${s.physicalName ?? s.name}: ${(s.properties ?? []).length} fields`), "No entities.") +
|
|
159
|
-
"\nUse --verbose to review the complete contract.");
|
|
160
|
-
case "contract_check":
|
|
161
|
-
return `Contract valid: ${clean(value.path)}${value.status === "draft" ? "\nStatus: draft; review business requirements before use." : ""}\n${clean(value.evidence)}`;
|
|
162
|
-
case "contract_validate":
|
|
163
|
-
return `Contract valid for native table authoring (${value.columns.length} columns).`;
|
|
164
|
-
case "inspect":
|
|
165
|
-
return lines("Flows", value.flows.map((f) => `${f.id} ${f.kind} ${f.tables.length} tables, ${f.outputs.length} outputs`), "No flows configured.\nNext: ingestron flow add <name> --contract <name> --standard <standard>");
|
|
166
|
-
case "flow_show":
|
|
167
|
-
return `Flow ${clean(value.id)}\n Kind: ${clean(value.kind)}\n Tables: ${Object.keys(value.tables ?? {})
|
|
168
|
-
.map(clean)
|
|
169
|
-
.join(", ") || "none"}\n Outputs: ${Object.keys(value.publishes ?? {})
|
|
170
|
-
.map(clean)
|
|
171
|
-
.join(", ") || "none"}\nUse --verbose to inspect configuration.`;
|
|
172
|
-
case "validate":
|
|
173
|
-
return value.mode === "draft"
|
|
174
|
-
? `Draft configuration checked (${value.flows} flows).\n${value.pending.length} unresolved inputs. Strict build readiness has not been checked.`
|
|
175
|
-
: `Project checks passed${value.nodes === undefined ? "" : ` (${value.nodes} planned nodes)`}.\nValidation is local; no platform connection was tested.` +
|
|
176
|
-
dataProductLines(value.dataProducts, value.quality) +
|
|
177
|
-
sourceLines(value.sources);
|
|
178
|
-
case "doctor":
|
|
179
|
-
return `Project ${clean(value.project)} (${clean(value.environment)})\n${value.pending.length} unresolved inputs.\n${clean(value.platformAccess)}\nNext: ${clean(value.next)}`;
|
|
180
|
-
case "runtime_prepare":
|
|
181
|
-
return (`Runtime ${clean(value.status)} for ${value.flows.map(clean).join(", ")}.` +
|
|
182
|
-
(value.result?.flows ?? [])
|
|
183
|
-
.map((f) => `\n ${clean(f.flow)}: Python ${clean(f.pythonVersion ?? "3.12")} (${f.reused ? "reused" : "prepared"})`)
|
|
184
|
-
.join("") +
|
|
185
|
-
`\nUse ingestron run status ${clean(value.id)} --verbose for environment paths and details.`);
|
|
186
|
-
case "discover":
|
|
187
|
-
return (`Discovered ${clean(value.flow)} (${clean(value.route)}):` +
|
|
188
|
-
(value.tables ?? [])
|
|
189
|
-
.map((t) => `\n ${clean(t.table)}: ${Number(t.fields)} fields → ${clean(t.file)}` +
|
|
190
|
-
(t.keys?.length
|
|
191
|
-
? ` (source keys: ${t.keys.map(clean).join(", ")})`
|
|
192
|
-
: "") +
|
|
193
|
-
(t.skipped ?? [])
|
|
194
|
-
.slice(0, 10)
|
|
195
|
-
.map((s) => `\n skipped ${clean(s.name)}: ${clean(s.reason)}`)
|
|
196
|
-
.join(""))
|
|
197
|
-
.join("") +
|
|
198
|
-
(value.files ?? []).map((f) => `\n wrote ${clean(f)}`).join("") +
|
|
199
|
-
(value.review ?? [])
|
|
200
|
-
.slice(0, 10)
|
|
201
|
-
.map((r) => `\n review: ${clean(r)}`)
|
|
202
|
-
.join("") +
|
|
203
|
-
`\nNext: ${clean(value.next)}`);
|
|
204
|
-
case "run":
|
|
205
|
-
case "run_status":
|
|
206
|
-
return `Run ${clean(value.id)}: ${clean(value.status)} (${clean(value.action)}).\nTarget: ${clean(value.configuration)}; flows: ${value.flows.map(clean).join(", ")}.${runQualityLine(value.result?.flows)}\nUse ingestron run status ${clean(value.id)} to inspect the receipt.`;
|
|
207
|
-
case "build":
|
|
208
|
-
return `Built ${value.packages?.length ?? 1} project package(s) into ${clean(value.directory)}.\n${clean(value.evidence)}`;
|
|
209
|
-
case "generate":
|
|
210
|
-
return "Generated native assets.\nUse check --output <directory> to verify local output.";
|
|
211
|
-
case "validate_output":
|
|
212
|
-
return "Generated output checks passed.\nOwnership and syntax checked locally; no platform connection was tested.";
|
|
213
|
-
case "environments":
|
|
214
|
-
return lines("Environments", value.available.map((e) => `${e}${e === value.selected ? " (selected)" : ""}`), "No environments configured.");
|
|
215
|
-
case "tables":
|
|
216
|
-
return lines("Flow tables", value.map((f) => `${f.flow}: ${f.tables.join(", ") || "none"}`), "No tables configured.");
|
|
217
|
-
case "catalogue":
|
|
218
|
-
return lines(args.kind ?? "Capabilities", value.map((v) => `${v.id}${v.version ? "@" + v.version : ""}${v.description ? " " + v.description : ""}`), `No ${args.kind ?? "capabilities"} available.\nNext: ingestron plugin list`);
|
|
219
|
-
case "provider_commands":
|
|
220
|
-
return lines("Plugin operations", value.commands.map((c) => `${c.name} ${c.description}`), "No plugin operations available.");
|
|
221
|
-
case "plugin_command":
|
|
222
|
-
case "provider_command":
|
|
223
|
-
return "Plugin operation completed locally.\nUse --json, --verbose or --out to inspect its result.";
|
|
224
|
-
case "plan":
|
|
225
|
-
return `Local build plan ready (${value.nodes.length} nodes).\nUse --json or --verbose to inspect the plan.`;
|
|
226
|
-
case "diff":
|
|
227
|
-
return `Local differences: ${value.added.length} added, ${value.changed.length} changed, ${value.removed.length} removed.`;
|
|
228
|
-
case "config_explain":
|
|
229
|
-
return `Configuration: ${clean(value.path)} (${clean(value.environment)})\nUse --verbose to inspect declared and resolved values.`;
|
|
230
|
-
case "resolve":
|
|
231
|
-
return (`Project ${clean(value.project.id)} — resolved build configuration\n` +
|
|
232
|
-
`Providers: ${Object.keys(value.project.providers?.configurations ?? {})
|
|
233
|
-
.map(clean)
|
|
234
|
-
.join(", ") || "none"}\n` +
|
|
235
|
-
`Connections: ${Object.keys(value.project.connections ?? {})
|
|
236
|
-
.map(clean)
|
|
237
|
-
.join(", ") || "none"}\n` +
|
|
238
|
-
`Flows: ${value.flows.length}; unresolved inputs: ${value.pending.length}.\n` +
|
|
239
|
-
"Authored files: ingestron source list; ingestron contract list.\nUse --verbose for resolved configuration and input-file digests.");
|
|
240
|
-
case "read":
|
|
241
|
-
return value.content;
|
|
242
|
-
case "schema":
|
|
243
|
-
return "Schema available. Use --json for tools or --verbose to inspect it.";
|
|
244
|
-
}
|
|
245
|
-
return `${result.operation.replaceAll("_", " ")} completed.\nUse --json for structured data or --verbose for details.`;
|
|
246
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface Browser {
|
|
2
|
-
select(message: string, options: {
|
|
3
|
-
value: string;
|
|
4
|
-
label: string;
|
|
5
|
-
hint?: string;
|
|
6
|
-
}[]): Promise<string>;
|
|
7
|
-
search(): Promise<string>;
|
|
8
|
-
details(text: string): void;
|
|
9
|
-
}
|
|
10
|
-
/** Read-only navigation of installed plugin metadata. */
|
|
11
|
-
export declare function browsePlugins(ui: Browser, query?: string, initialKind?: string, filters?: {
|
|
12
|
-
engine?: string;
|
|
13
|
-
}, root?: string): Promise<void>;
|
|
14
|
-
export {};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { browseProviders, pluginKindLabel } from "@ingestron/core/adapter";
|
|
2
|
-
/** Read-only navigation of installed plugin metadata. */
|
|
3
|
-
export async function browsePlugins(ui, query = "", initialKind, filters = {}, root = process.cwd()) {
|
|
4
|
-
browseProviders(root, query, initialKind, filters); // Validate filters even when catalogue is empty.
|
|
5
|
-
let kind = initialKind;
|
|
6
|
-
let listing = !!query || !!kind;
|
|
7
|
-
let page = 0;
|
|
8
|
-
for (;;) {
|
|
9
|
-
if (!listing) {
|
|
10
|
-
const choice = await ui.select("Browse plugins", [
|
|
11
|
-
{ value: "all", label: "Browse all plugins" },
|
|
12
|
-
{ value: "search", label: "Search plugins" },
|
|
13
|
-
...["provider", "model-pack", "activity-pack", "report-pack"].map((value) => ({ value, label: pluginKindLabel(value) })),
|
|
14
|
-
{
|
|
15
|
-
value: "connector",
|
|
16
|
-
label: "Connectors",
|
|
17
|
-
hint: "Installed connector packages",
|
|
18
|
-
},
|
|
19
|
-
{ value: "exit", label: "Finish browsing" },
|
|
20
|
-
]);
|
|
21
|
-
if (choice === "exit")
|
|
22
|
-
return;
|
|
23
|
-
kind = ["all", "search"].includes(choice) ? undefined : choice;
|
|
24
|
-
query = choice === "search" ? await ui.search() : "";
|
|
25
|
-
listing = true;
|
|
26
|
-
page = 0;
|
|
27
|
-
}
|
|
28
|
-
const plugins = browseProviders(root, query, kind, filters);
|
|
29
|
-
const visible = plugins.slice(page * 25, (page + 1) * 25);
|
|
30
|
-
const selected = await ui.select(plugins.length
|
|
31
|
-
? `Select a plugin (${plugins.length} results, page ${page + 1})`
|
|
32
|
-
: "No plugins match; change category or search", [
|
|
33
|
-
...visible.map((p) => ({
|
|
34
|
-
value: p.reference,
|
|
35
|
-
label: `${p.name} [${p.kindLabel}]`,
|
|
36
|
-
hint: `${p.availability} · ${p.description}`,
|
|
37
|
-
})),
|
|
38
|
-
...(page > 0 ? [{ value: ":previous", label: "Previous page" }] : []),
|
|
39
|
-
...((page + 1) * 25 < plugins.length
|
|
40
|
-
? [{ value: ":next", label: "Next page" }]
|
|
41
|
-
: []),
|
|
42
|
-
{ value: ":search", label: "Search this category" },
|
|
43
|
-
{ value: ":back", label: "Change category / browse all" },
|
|
44
|
-
{ value: ":exit", label: "Finish browsing" },
|
|
45
|
-
]);
|
|
46
|
-
if (selected === ":next") {
|
|
47
|
-
page++;
|
|
48
|
-
continue;
|
|
49
|
-
}
|
|
50
|
-
if (selected === ":previous") {
|
|
51
|
-
page--;
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
if (selected === ":exit")
|
|
55
|
-
return;
|
|
56
|
-
if (selected === ":back") {
|
|
57
|
-
listing = false;
|
|
58
|
-
continue;
|
|
59
|
-
}
|
|
60
|
-
if (selected === ":search") {
|
|
61
|
-
query = await ui.search();
|
|
62
|
-
page = 0;
|
|
63
|
-
continue;
|
|
64
|
-
}
|
|
65
|
-
const plugin = plugins.find((p) => p.reference === selected);
|
|
66
|
-
ui.details(`${plugin.name} (${plugin.id})\n${plugin.kindLabel} · ${plugin.availability}\n\n${plugin.description}\n${plugin.evidence}\n\nLicence: ${plugin.licence}\nDocumentation: ${plugin.documentation}\nSource and package documentation: ${plugin.url}\n\nExact-version licences/notices and provenance are saved to .ingestron/plugin-info/ during installation. Engine compatibility is package-specific; installed metadata is not runtime verification.`);
|
|
67
|
-
const action = await ui.select("Next step", [
|
|
68
|
-
{ value: "back", label: "Back to results" },
|
|
69
|
-
{ value: "exit", label: "Finish browsing" },
|
|
70
|
-
]);
|
|
71
|
-
if (action === "exit")
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/** Official-name convenience at the adapter boundary; core only receives exact references. */
|
|
2
|
-
import { type Context, type OperationName, type Result } from "@ingestron/core";
|
|
3
|
-
export declare const officialPlugins: {
|
|
4
|
-
readonly adf: {
|
|
5
|
-
readonly kind: "provider";
|
|
6
|
-
readonly repository: "ingestron/provider-adf";
|
|
7
|
-
readonly path: "plugin/provider.yaml";
|
|
8
|
-
readonly tagPrefix: "";
|
|
9
|
-
};
|
|
10
|
-
readonly "azure-blob": {
|
|
11
|
-
readonly kind: "connector";
|
|
12
|
-
readonly repository: "ingestron/connectors";
|
|
13
|
-
readonly path: "connectors/azure-blob/connector.yaml";
|
|
14
|
-
readonly tagPrefix: "azure-blob-";
|
|
15
|
-
};
|
|
16
|
-
readonly databricks: {
|
|
17
|
-
readonly kind: "provider";
|
|
18
|
-
readonly repository: "ingestron/provider-databricks";
|
|
19
|
-
readonly path: "plugin/provider.yaml";
|
|
20
|
-
readonly tagPrefix: "";
|
|
21
|
-
};
|
|
22
|
-
readonly files: {
|
|
23
|
-
readonly kind: "connector";
|
|
24
|
-
readonly repository: "ingestron/connectors";
|
|
25
|
-
readonly path: "connectors/files/connector.yaml";
|
|
26
|
-
readonly tagPrefix: "files-";
|
|
27
|
-
};
|
|
28
|
-
readonly gcs: {
|
|
29
|
-
readonly kind: "connector";
|
|
30
|
-
readonly repository: "ingestron/connectors";
|
|
31
|
-
readonly path: "connectors/gcs/connector.yaml";
|
|
32
|
-
readonly tagPrefix: "gcs-";
|
|
33
|
-
};
|
|
34
|
-
readonly github: {
|
|
35
|
-
readonly kind: "connector";
|
|
36
|
-
readonly repository: "ingestron/connectors";
|
|
37
|
-
readonly path: "connectors/github/connector.yaml";
|
|
38
|
-
readonly tagPrefix: "github-";
|
|
39
|
-
};
|
|
40
|
-
readonly hubspot: {
|
|
41
|
-
readonly kind: "connector";
|
|
42
|
-
readonly repository: "ingestron/connectors";
|
|
43
|
-
readonly path: "connectors/hubspot/connector.yaml";
|
|
44
|
-
readonly tagPrefix: "hubspot-";
|
|
45
|
-
};
|
|
46
|
-
readonly jira: {
|
|
47
|
-
readonly kind: "connector";
|
|
48
|
-
readonly repository: "ingestron/connectors";
|
|
49
|
-
readonly path: "connectors/jira/connector.yaml";
|
|
50
|
-
readonly tagPrefix: "jira-";
|
|
51
|
-
};
|
|
52
|
-
readonly local: {
|
|
53
|
-
readonly kind: "provider";
|
|
54
|
-
readonly repository: "ingestron/provider-local";
|
|
55
|
-
readonly path: "plugin/provider.yaml";
|
|
56
|
-
readonly tagPrefix: "";
|
|
57
|
-
};
|
|
58
|
-
readonly mysql: {
|
|
59
|
-
readonly kind: "connector";
|
|
60
|
-
readonly repository: "ingestron/connectors";
|
|
61
|
-
readonly path: "connectors/mysql/connector.yaml";
|
|
62
|
-
readonly tagPrefix: "mysql-";
|
|
63
|
-
};
|
|
64
|
-
readonly onedrive: {
|
|
65
|
-
readonly kind: "connector";
|
|
66
|
-
readonly repository: "ingestron/connectors";
|
|
67
|
-
readonly path: "connectors/onedrive/connector.yaml";
|
|
68
|
-
readonly tagPrefix: "onedrive-";
|
|
69
|
-
};
|
|
70
|
-
readonly oracle: {
|
|
71
|
-
readonly kind: "connector";
|
|
72
|
-
readonly repository: "ingestron/connectors";
|
|
73
|
-
readonly path: "connectors/oracle/connector.yaml";
|
|
74
|
-
readonly tagPrefix: "oracle-";
|
|
75
|
-
};
|
|
76
|
-
readonly postgresql: {
|
|
77
|
-
readonly kind: "connector";
|
|
78
|
-
readonly repository: "ingestron/connectors";
|
|
79
|
-
readonly path: "connectors/postgresql/connector.yaml";
|
|
80
|
-
readonly tagPrefix: "postgresql-";
|
|
81
|
-
};
|
|
82
|
-
readonly s3: {
|
|
83
|
-
readonly kind: "connector";
|
|
84
|
-
readonly repository: "ingestron/connectors";
|
|
85
|
-
readonly path: "connectors/s3/connector.yaml";
|
|
86
|
-
readonly tagPrefix: "s3-";
|
|
87
|
-
};
|
|
88
|
-
readonly salesforce: {
|
|
89
|
-
readonly kind: "connector";
|
|
90
|
-
readonly repository: "ingestron/connectors";
|
|
91
|
-
readonly path: "connectors/salesforce/connector.yaml";
|
|
92
|
-
readonly tagPrefix: "salesforce-";
|
|
93
|
-
};
|
|
94
|
-
readonly sftp: {
|
|
95
|
-
readonly kind: "connector";
|
|
96
|
-
readonly repository: "ingestron/connectors";
|
|
97
|
-
readonly path: "connectors/sftp/connector.yaml";
|
|
98
|
-
readonly tagPrefix: "sftp-";
|
|
99
|
-
};
|
|
100
|
-
readonly sharepoint: {
|
|
101
|
-
readonly kind: "connector";
|
|
102
|
-
readonly repository: "ingestron/connectors";
|
|
103
|
-
readonly path: "connectors/sharepoint/connector.yaml";
|
|
104
|
-
readonly tagPrefix: "sharepoint-";
|
|
105
|
-
};
|
|
106
|
-
readonly "sql-server": {
|
|
107
|
-
readonly kind: "connector";
|
|
108
|
-
readonly repository: "ingestron/connectors";
|
|
109
|
-
readonly path: "connectors/sql-server/connector.yaml";
|
|
110
|
-
readonly tagPrefix: "sql-server-";
|
|
111
|
-
};
|
|
112
|
-
readonly stripe: {
|
|
113
|
-
readonly kind: "connector";
|
|
114
|
-
readonly repository: "ingestron/connectors";
|
|
115
|
-
readonly path: "connectors/stripe/connector.yaml";
|
|
116
|
-
readonly tagPrefix: "stripe-";
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
export declare function officialName(reference: string): {
|
|
120
|
-
name: keyof typeof officialPlugins;
|
|
121
|
-
version: string;
|
|
122
|
-
} | undefined;
|
|
123
|
-
export declare function catalogueReleases(value: any, name: keyof typeof officialPlugins, host?: string): string[];
|
|
124
|
-
export declare function fetchCatalogue(): Promise<unknown>;
|
|
125
|
-
export declare function resolvePluginArgs(context: Context, operation: OperationName, args: any, catalogue?: typeof fetchCatalogue): Promise<any>;
|
|
126
|
-
export declare function executePluginOperation(context: Context, operation: OperationName, args?: any): Promise<Result>;
|