feat(deploy): register n8n publisher replace v2
This commit is contained in:
@@ -13,22 +13,22 @@ const engineRoot = resolve(platformRoot, "../NODEDC_ENGINE_INFRA");
|
||||
const artifactRoot = resolve(process.env.NODEDC_DEPLOY_ARTIFACT_DIR || join(here, "../deploy-artifacts"));
|
||||
const stageArtifact = resolve(
|
||||
process.env.NODEDC_N8N_EXTENSION_STAGE_ARTIFACT
|
||||
|| join(artifactRoot, "nodedc-n8n-private-extension-n8n-nodes-ndc-provider-rotating-access-20260718-006.tgz"),
|
||||
|| join(artifactRoot, "nodedc-n8n-private-extension-n8n-nodes-ndc-geozone-replace-20260720-017.tgz"),
|
||||
);
|
||||
const predecessorArtifact = resolve(
|
||||
process.env.NODEDC_N8N_EXTENSION_PREDECESSOR_ARTIFACT
|
||||
|| join(artifactRoot, "nodedc-engine-n8n-private-extension-20260717-005.tgz"),
|
||||
|| join(artifactRoot, "nodedc-engine-n8n-private-extension-20260718-008.tgz"),
|
||||
);
|
||||
|
||||
const stageArtifactSha256 = "2699e53c482f2d2bec6d13709a7e9b9a0bb3791ad2018c142e9bc4e7bf371e4a";
|
||||
const predecessorArtifactSha256 = "f0f687ddcc1bc006db56c75e73c8213e99298c31c2d881cde078e5ddc9600172";
|
||||
const releaseId = "0.1.4-59dc9f7882721d6a";
|
||||
const packageVersion = "0.1.4";
|
||||
const packageSha256 = "59dc9f7882721d6a5e2ae84ffa6aa8cd9bc5432f5904d24e70e363573ed2757f";
|
||||
const stageArtifactSha256 = "0c680d2436917eb6f2416c5c855f2e01dd59ed50bedb1e36456a7405f3f595af";
|
||||
const predecessorArtifactSha256 = "5ef46404dfd7753b4ffd14c5e9b9666f96d2c9875c8fe470714cdea1c6decdce";
|
||||
const releaseId = "0.1.5-3c8ae53f010d7c88";
|
||||
const packageVersion = "0.1.5";
|
||||
const packageSha256 = "3c8ae53f010d7c88b6e90cb8fc4929e7d0880089ad8c3a9edb876ce034786743";
|
||||
const n8nVersion = "2.3.2";
|
||||
const baseImage = "docker.n8n.io/n8nio/n8n:2.3.2";
|
||||
const architecture = "amd64";
|
||||
const generatedAt = "2026-07-18T21:00:00.000Z";
|
||||
const generatedAt = "2026-07-21T10:30:00.000Z";
|
||||
const previouslyIssuedTransitionIds = new Set([
|
||||
"20260715-002",
|
||||
"20260716-003",
|
||||
@@ -36,6 +36,7 @@ const previouslyIssuedTransitionIds = new Set([
|
||||
"20260717-005",
|
||||
"20260718-006",
|
||||
"20260718-007",
|
||||
"20260718-008",
|
||||
]);
|
||||
const transitionId = readTransitionId(process.argv.slice(2), process.env.NODEDC_N8N_TRANSITION_ID);
|
||||
const activationId = `engine-n8n-private-extension-${transitionId}`;
|
||||
@@ -64,7 +65,7 @@ const expectedCredentialTypes = [
|
||||
"ndcFoundryBindingApi",
|
||||
"ndcProviderRotatingAccessApi",
|
||||
];
|
||||
const predecessorCredentialTypes = expectedCredentialTypes.slice(0, 3);
|
||||
const predecessorCredentialTypes = [...expectedCredentialTypes];
|
||||
const nodeModules = [
|
||||
["dist/nodes/NdcDataProductPublish/NdcDataProductPublish.node.js", "NdcDataProductPublish"],
|
||||
["dist/nodes/NdcDataProductRead/NdcDataProductRead.node.js", "NdcDataProductRead"],
|
||||
@@ -125,6 +126,7 @@ try {
|
||||
});
|
||||
assertExact(privateNodes.map((item) => item.name), expectedNodeTypes, "node types");
|
||||
assertExact(privateCredentials.map((item) => item.name), expectedCredentialTypes, "credential types");
|
||||
assertPublishNodeV2(privateNodes[0]);
|
||||
|
||||
const predecessorDescriptor = JSON.parse(predecessorArtifactFile(descriptorRel));
|
||||
const predecessorNodes = JSON.parse(predecessorArtifactFile(nodesCatalogRel));
|
||||
@@ -352,17 +354,17 @@ function assertPackage(value) {
|
||||
|
||||
function assertPredecessorCatalogs(descriptorValue, nodes, credentials, meta) {
|
||||
if (descriptorValue?.action !== "activate"
|
||||
|| descriptorValue?.releaseId !== "0.1.3-3354149b5245e39a"
|
||||
|| descriptorValue?.packageVersion !== "0.1.3"
|
||||
|| descriptorValue?.packageSha256 !== "3354149b5245e39a10f6f03a4b43796602d7e57ea1f91dcc6cb6774ead97501d") {
|
||||
|| descriptorValue?.releaseId !== "0.1.4-59dc9f7882721d6a"
|
||||
|| descriptorValue?.packageVersion !== "0.1.4"
|
||||
|| descriptorValue?.packageSha256 !== "59dc9f7882721d6a5e2ae84ffa6aa8cd9bc5432f5904d24e70e363573ed2757f") {
|
||||
throw new Error("predecessor_descriptor_mismatch");
|
||||
}
|
||||
if (!Array.isArray(nodes) || nodes.length !== 437
|
||||
|| !Array.isArray(credentials) || credentials.length !== 388
|
||||
|| !Array.isArray(credentials) || credentials.length !== 389
|
||||
|| meta?.n8nVersion !== n8nVersion
|
||||
|| meta?.source !== "n8n-core+n8n-nodes-ndc@0.1.3"
|
||||
|| meta?.source !== "n8n-core+n8n-nodes-ndc@0.1.4"
|
||||
|| meta?.nodeCount !== 437
|
||||
|| meta?.credentialCount !== 388) {
|
||||
|| meta?.credentialCount !== 389) {
|
||||
throw new Error("predecessor_catalog_mismatch");
|
||||
}
|
||||
assertExact(
|
||||
@@ -377,6 +379,18 @@ function assertPredecessorCatalogs(descriptorValue, nodes, credentials, meta) {
|
||||
);
|
||||
}
|
||||
|
||||
function assertPublishNodeV2(node) {
|
||||
if (JSON.stringify(node?.version) !== JSON.stringify([1, 2])) {
|
||||
throw new Error("publish_node_versions_mismatch");
|
||||
}
|
||||
const property = node?.properties?.find((item) => item?.name === "publishMode");
|
||||
const values = property?.options?.map((item) => item?.value);
|
||||
if (JSON.stringify(values) !== JSON.stringify(["upsert", "replace"])
|
||||
|| !property?.displayOptions?.show?.["@version"]?.includes(2)) {
|
||||
throw new Error("publish_node_replace_contract_missing");
|
||||
}
|
||||
}
|
||||
|
||||
function assertBaselineCatalogs(nodes, credentials) {
|
||||
if (!Array.isArray(nodes) || nodes.length !== 434 || nodes.some((item) => String(item?.name || "").startsWith("n8n-nodes-ndc."))) {
|
||||
throw new Error("baseline_node_catalog_mismatch");
|
||||
|
||||
Reference in New Issue
Block a user