@tachyon-gg/railway-deploy 0.2.1 → 0.2.2
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/index.js +188 -237
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -38898,62 +38898,162 @@ function isSensitive(key) {
|
|
|
38898
38898
|
function maskValue(key, value) {
|
|
38899
38899
|
return isSensitive(key) ? "***" : value;
|
|
38900
38900
|
}
|
|
38901
|
-
function
|
|
38901
|
+
function describeChange(change) {
|
|
38902
38902
|
switch (change.type) {
|
|
38903
|
-
case "create-service":
|
|
38904
|
-
|
|
38903
|
+
case "create-service": {
|
|
38904
|
+
const src = change.source?.image || change.source?.repo || "empty";
|
|
38905
|
+
const details = [src];
|
|
38906
|
+
if (change.branch)
|
|
38907
|
+
details.push(`branch: ${change.branch}`);
|
|
38908
|
+
if (change.volume)
|
|
38909
|
+
details.push(`volume: ${change.volume.mount}`);
|
|
38910
|
+
if (change.cronSchedule)
|
|
38911
|
+
details.push(`cron: ${change.cronSchedule}`);
|
|
38912
|
+
return {
|
|
38913
|
+
category: "Services",
|
|
38914
|
+
action: "create",
|
|
38915
|
+
summary: `${change.name} (${details.join(", ")})`
|
|
38916
|
+
};
|
|
38917
|
+
}
|
|
38905
38918
|
case "delete-service":
|
|
38906
|
-
return
|
|
38907
|
-
|
|
38908
|
-
|
|
38909
|
-
|
|
38910
|
-
|
|
38911
|
-
case "upsert-shared-variables":
|
|
38912
|
-
return `upsert-shared-variables (${Object.keys(change.variables).length} vars)`;
|
|
38913
|
-
case "delete-shared-variables":
|
|
38914
|
-
return `delete-shared-variables (${change.variableNames.length} vars)`;
|
|
38915
|
-
case "create-domain":
|
|
38916
|
-
return `create-domain: ${change.serviceName} → ${change.domain}`;
|
|
38917
|
-
case "delete-domain":
|
|
38918
|
-
return `delete-domain: ${change.serviceName} → ${change.domain}`;
|
|
38919
|
+
return {
|
|
38920
|
+
category: "Services",
|
|
38921
|
+
action: "delete",
|
|
38922
|
+
summary: `${change.name} (${change.serviceId})`
|
|
38923
|
+
};
|
|
38919
38924
|
case "update-service-settings":
|
|
38920
|
-
return
|
|
38921
|
-
|
|
38922
|
-
|
|
38923
|
-
|
|
38924
|
-
|
|
38925
|
+
return {
|
|
38926
|
+
category: "Service settings",
|
|
38927
|
+
action: "update",
|
|
38928
|
+
summary: `${change.serviceName}: ${Object.keys(change.settings).join(", ")}`
|
|
38929
|
+
};
|
|
38925
38930
|
case "update-deployment-trigger": {
|
|
38926
38931
|
const parts = [];
|
|
38927
38932
|
if (change.branch)
|
|
38928
|
-
parts.push(`branch
|
|
38933
|
+
parts.push(`branch → ${change.branch}`);
|
|
38929
38934
|
if (change.checkSuites !== undefined)
|
|
38930
|
-
parts.push(`checkSuites
|
|
38931
|
-
return
|
|
38935
|
+
parts.push(`checkSuites → ${change.checkSuites}`);
|
|
38936
|
+
return {
|
|
38937
|
+
category: "Deployment triggers",
|
|
38938
|
+
action: "update",
|
|
38939
|
+
summary: `${change.serviceName}: ${parts.join(", ")}`
|
|
38940
|
+
};
|
|
38941
|
+
}
|
|
38942
|
+
case "upsert-variables":
|
|
38943
|
+
return {
|
|
38944
|
+
category: "Service variables",
|
|
38945
|
+
action: "update",
|
|
38946
|
+
summary: `${change.serviceName}: set ${Object.keys(change.variables).length} var(s) — ${Object.keys(change.variables).join(", ")}`
|
|
38947
|
+
};
|
|
38948
|
+
case "delete-variables":
|
|
38949
|
+
return {
|
|
38950
|
+
category: "Service variables",
|
|
38951
|
+
action: "delete",
|
|
38952
|
+
summary: `${change.serviceName}: delete ${change.variableNames.length} var(s) — ${change.variableNames.join(", ")}`
|
|
38953
|
+
};
|
|
38954
|
+
case "upsert-shared-variables":
|
|
38955
|
+
return {
|
|
38956
|
+
category: "Shared variables",
|
|
38957
|
+
action: "update",
|
|
38958
|
+
summary: `set ${Object.keys(change.variables).length} var(s) — ${Object.keys(change.variables).join(", ")}`
|
|
38959
|
+
};
|
|
38960
|
+
case "delete-shared-variables":
|
|
38961
|
+
return {
|
|
38962
|
+
category: "Shared variables",
|
|
38963
|
+
action: "delete",
|
|
38964
|
+
summary: `delete ${change.variableNames.length} var(s) — ${change.variableNames.join(", ")}`
|
|
38965
|
+
};
|
|
38966
|
+
case "create-domain": {
|
|
38967
|
+
const port = change.targetPort ? ` (port ${change.targetPort})` : "";
|
|
38968
|
+
return {
|
|
38969
|
+
category: "Domains",
|
|
38970
|
+
action: "create",
|
|
38971
|
+
summary: `${change.serviceName}: ${change.domain}${port}`
|
|
38972
|
+
};
|
|
38973
|
+
}
|
|
38974
|
+
case "delete-domain":
|
|
38975
|
+
return {
|
|
38976
|
+
category: "Domains",
|
|
38977
|
+
action: "delete",
|
|
38978
|
+
summary: `${change.serviceName}: ${change.domain}`
|
|
38979
|
+
};
|
|
38980
|
+
case "create-service-domain": {
|
|
38981
|
+
const port = change.targetPort ? ` (port ${change.targetPort})` : "";
|
|
38982
|
+
return {
|
|
38983
|
+
category: "Railway domains",
|
|
38984
|
+
action: "create",
|
|
38985
|
+
summary: `${change.serviceName}${port}`
|
|
38986
|
+
};
|
|
38932
38987
|
}
|
|
38933
|
-
case "create-service-domain":
|
|
38934
|
-
return `create-service-domain: ${change.serviceName}`;
|
|
38935
38988
|
case "delete-service-domain":
|
|
38936
|
-
return
|
|
38989
|
+
return { category: "Railway domains", action: "delete", summary: change.serviceName };
|
|
38990
|
+
case "create-volume":
|
|
38991
|
+
return {
|
|
38992
|
+
category: "Volumes",
|
|
38993
|
+
action: "create",
|
|
38994
|
+
summary: `${change.serviceName}: ${change.mount}`
|
|
38995
|
+
};
|
|
38996
|
+
case "delete-volume":
|
|
38997
|
+
return {
|
|
38998
|
+
category: "Volumes",
|
|
38999
|
+
action: "delete",
|
|
39000
|
+
summary: `${change.serviceName} (${change.volumeId})`
|
|
39001
|
+
};
|
|
38937
39002
|
case "create-tcp-proxy":
|
|
38938
|
-
return
|
|
39003
|
+
return {
|
|
39004
|
+
category: "TCP proxies",
|
|
39005
|
+
action: "create",
|
|
39006
|
+
summary: `${change.serviceName}: port ${change.applicationPort}`
|
|
39007
|
+
};
|
|
38939
39008
|
case "delete-tcp-proxy":
|
|
38940
|
-
return
|
|
38941
|
-
|
|
38942
|
-
|
|
39009
|
+
return {
|
|
39010
|
+
category: "TCP proxies",
|
|
39011
|
+
action: "delete",
|
|
39012
|
+
summary: `${change.serviceName}: proxy ${change.proxyId}`
|
|
39013
|
+
};
|
|
39014
|
+
case "update-service-limits": {
|
|
39015
|
+
const parts = [];
|
|
39016
|
+
if (change.limits.memoryGB !== undefined)
|
|
39017
|
+
parts.push(`memory: ${change.limits.memoryGB ?? "unset"}GB`);
|
|
39018
|
+
if (change.limits.vCPUs !== undefined)
|
|
39019
|
+
parts.push(`vCPUs: ${change.limits.vCPUs ?? "unset"}`);
|
|
39020
|
+
return {
|
|
39021
|
+
category: "Resource limits",
|
|
39022
|
+
action: "update",
|
|
39023
|
+
summary: `${change.serviceName}: ${parts.join(", ")}`
|
|
39024
|
+
};
|
|
39025
|
+
}
|
|
38943
39026
|
case "enable-static-ips":
|
|
38944
|
-
return
|
|
39027
|
+
return {
|
|
39028
|
+
category: "Static outbound IPs",
|
|
39029
|
+
action: "create",
|
|
39030
|
+
summary: `${change.serviceName}: enable`
|
|
39031
|
+
};
|
|
38945
39032
|
case "disable-static-ips":
|
|
38946
|
-
return
|
|
39033
|
+
return {
|
|
39034
|
+
category: "Static outbound IPs",
|
|
39035
|
+
action: "delete",
|
|
39036
|
+
summary: `${change.serviceName}: disable`
|
|
39037
|
+
};
|
|
38947
39038
|
case "create-bucket":
|
|
38948
|
-
return
|
|
39039
|
+
return { category: "Buckets", action: "create", summary: change.bucketName };
|
|
38949
39040
|
case "delete-bucket":
|
|
38950
|
-
return
|
|
39041
|
+
return { category: "Buckets", action: "delete", summary: change.name };
|
|
38951
39042
|
default: {
|
|
38952
39043
|
const _exhaustive = change;
|
|
38953
|
-
return
|
|
39044
|
+
return { category: "Unknown", action: "update", summary: _exhaustive.type };
|
|
38954
39045
|
}
|
|
38955
39046
|
}
|
|
38956
39047
|
}
|
|
39048
|
+
function changeLabel(change) {
|
|
39049
|
+
const desc = describeChange(change);
|
|
39050
|
+
return `${change.type}: ${desc.summary}`;
|
|
39051
|
+
}
|
|
39052
|
+
var ACTION_ICON = {
|
|
39053
|
+
create: (nc) => green("+", nc),
|
|
39054
|
+
update: (nc) => yellow("~", nc),
|
|
39055
|
+
delete: (nc) => red("-", nc)
|
|
39056
|
+
};
|
|
38957
39057
|
function printChangeset(changeset, options) {
|
|
38958
39058
|
const noColor = options?.noColor ?? false;
|
|
38959
39059
|
const verbose = options?.verbose ?? false;
|
|
@@ -38966,214 +39066,65 @@ ${green("No changes needed", noColor)} — Railway matches desired state.
|
|
|
38966
39066
|
console.log(`
|
|
38967
39067
|
Changeset (${changeset.changes.length} changes):
|
|
38968
39068
|
`);
|
|
38969
|
-
const
|
|
38970
|
-
const
|
|
38971
|
-
|
|
38972
|
-
|
|
38973
|
-
|
|
38974
|
-
|
|
38975
|
-
|
|
38976
|
-
|
|
38977
|
-
|
|
38978
|
-
|
|
38979
|
-
|
|
38980
|
-
|
|
38981
|
-
|
|
38982
|
-
|
|
38983
|
-
|
|
38984
|
-
|
|
38985
|
-
|
|
38986
|
-
|
|
38987
|
-
|
|
38988
|
-
|
|
38989
|
-
|
|
38990
|
-
|
|
38991
|
-
|
|
38992
|
-
|
|
38993
|
-
|
|
38994
|
-
|
|
38995
|
-
|
|
38996
|
-
|
|
38997
|
-
|
|
38998
|
-
|
|
38999
|
-
|
|
39000
|
-
|
|
39001
|
-
}
|
|
39002
|
-
|
|
39003
|
-
|
|
39004
|
-
|
|
39005
|
-
|
|
39006
|
-
|
|
39007
|
-
|
|
39008
|
-
if (c.type === "update-service-settings") {
|
|
39009
|
-
const keys = Object.keys(c.settings).join(", ");
|
|
39010
|
-
console.log(` ${yellow("~", noColor)} ${c.serviceName}: ${keys}`);
|
|
39011
|
-
if (verbose) {
|
|
39012
|
-
for (const [key, value] of Object.entries(c.settings)) {
|
|
39013
|
-
const currentSvc = options?.currentState?.services[c.serviceName];
|
|
39014
|
-
const oldVal = currentSvc ? currentSvc[key] : undefined;
|
|
39015
|
-
const oldStr = oldVal !== undefined ? JSON.stringify(oldVal) : "(unset)";
|
|
39016
|
-
const newStr = value === null ? "(unset)" : JSON.stringify(value);
|
|
39017
|
-
console.log(` ${key}: ${oldStr} → ${newStr}`);
|
|
39018
|
-
}
|
|
39019
|
-
}
|
|
39020
|
-
}
|
|
39021
|
-
}
|
|
39022
|
-
console.log();
|
|
39023
|
-
}
|
|
39024
|
-
if (triggerChanges.length > 0) {
|
|
39025
|
-
console.log(` ${yellow("~", noColor)} DEPLOYMENT TRIGGERS:`);
|
|
39026
|
-
for (const c of triggerChanges) {
|
|
39027
|
-
if (c.type === "update-deployment-trigger") {
|
|
39028
|
-
const parts2 = [];
|
|
39029
|
-
if (c.branch)
|
|
39030
|
-
parts2.push(`branch → ${c.branch}`);
|
|
39031
|
-
if (c.checkSuites !== undefined)
|
|
39032
|
-
parts2.push(`checkSuites → ${c.checkSuites}`);
|
|
39033
|
-
console.log(` ${yellow("~", noColor)} ${c.serviceName}: ${parts2.join(", ")}`);
|
|
39034
|
-
}
|
|
39035
|
-
}
|
|
39036
|
-
console.log();
|
|
39037
|
-
}
|
|
39038
|
-
if (sharedUpsert.length > 0 || sharedDelete.length > 0) {
|
|
39039
|
-
console.log(` ${yellow("~", noColor)} SHARED variables:`);
|
|
39040
|
-
for (const c of sharedUpsert) {
|
|
39041
|
-
if (c.type === "upsert-shared-variables") {
|
|
39042
|
-
for (const [key, value] of Object.entries(c.variables)) {
|
|
39043
|
-
if (verbose) {
|
|
39044
|
-
const oldVal = options?.currentState?.sharedVariables[key];
|
|
39045
|
-
const oldStr = oldVal !== undefined ? maskValue(key, oldVal) : "(unset)";
|
|
39046
|
-
console.log(` ${green("+", noColor)} ${key}: ${dim(`"${oldStr}"`, noColor)} → ${dim(`"${maskValue(key, value)}"`, noColor)}`);
|
|
39047
|
-
} else {
|
|
39048
|
-
console.log(` ${green("+", noColor)} ${key}`);
|
|
39049
|
-
}
|
|
39050
|
-
}
|
|
39051
|
-
}
|
|
39052
|
-
}
|
|
39053
|
-
for (const c of sharedDelete) {
|
|
39054
|
-
if (c.type === "delete-shared-variables") {
|
|
39055
|
-
for (const name of c.variableNames) {
|
|
39056
|
-
console.log(` ${red("-", noColor)} ${name}`);
|
|
39057
|
-
}
|
|
39058
|
-
}
|
|
39059
|
-
}
|
|
39060
|
-
console.log();
|
|
39061
|
-
}
|
|
39062
|
-
if (upsertVars.length > 0 || deleteVars.length > 0) {
|
|
39063
|
-
console.log(` ${yellow("~", noColor)} SERVICE variables:`);
|
|
39064
|
-
for (const c of upsertVars) {
|
|
39065
|
-
if (c.type === "upsert-variables") {
|
|
39066
|
-
const keys = Object.keys(c.variables);
|
|
39067
|
-
if (verbose) {
|
|
39068
|
-
console.log(` ${c.serviceName}:`);
|
|
39069
|
-
for (const [key, value] of Object.entries(c.variables)) {
|
|
39070
|
-
const currentSvc = options?.currentState?.services[c.serviceName];
|
|
39071
|
-
const oldVal = currentSvc?.variables[key];
|
|
39072
|
-
const oldStr = oldVal !== undefined ? maskValue(key, oldVal) : "(unset)";
|
|
39073
|
-
console.log(` ${green("+", noColor)} ${key}: ${dim(`"${oldStr}"`, noColor)} → ${dim(`"${maskValue(key, value)}"`, noColor)}`);
|
|
39074
|
-
}
|
|
39075
|
-
} else {
|
|
39076
|
-
console.log(` ${c.serviceName}: set ${keys.length} var(s) — ${keys.join(", ")}`);
|
|
39069
|
+
const groups = new Map;
|
|
39070
|
+
for (const change of changeset.changes) {
|
|
39071
|
+
const desc = describeChange(change);
|
|
39072
|
+
let group = groups.get(desc.category);
|
|
39073
|
+
if (!group) {
|
|
39074
|
+
group = [];
|
|
39075
|
+
groups.set(desc.category, group);
|
|
39076
|
+
}
|
|
39077
|
+
group.push({ change, desc });
|
|
39078
|
+
}
|
|
39079
|
+
for (const [category, entries] of groups) {
|
|
39080
|
+
const actions = new Set(entries.map((e) => e.desc.action));
|
|
39081
|
+
const headerAction = actions.size === 1 ? [...actions][0] : "update";
|
|
39082
|
+
const headerIcon = ACTION_ICON[headerAction](noColor);
|
|
39083
|
+
console.log(` ${headerIcon} ${category.toUpperCase()}:`);
|
|
39084
|
+
for (const { change, desc } of entries) {
|
|
39085
|
+
const icon = ACTION_ICON[desc.action](noColor);
|
|
39086
|
+
if (verbose && change.type === "update-service-settings") {
|
|
39087
|
+
console.log(` ${icon} ${change.serviceName}:`);
|
|
39088
|
+
for (const [key, value] of Object.entries(change.settings)) {
|
|
39089
|
+
const currentSvc = options?.currentState?.services[change.serviceName];
|
|
39090
|
+
const oldVal = currentSvc ? currentSvc[key] : undefined;
|
|
39091
|
+
const oldStr = oldVal !== undefined ? JSON.stringify(oldVal) : "(unset)";
|
|
39092
|
+
const newStr = value === null ? "(unset)" : JSON.stringify(value);
|
|
39093
|
+
console.log(` ${key}: ${oldStr} → ${newStr}`);
|
|
39094
|
+
}
|
|
39095
|
+
} else if (verbose && change.type === "upsert-variables") {
|
|
39096
|
+
console.log(` ${change.serviceName}:`);
|
|
39097
|
+
for (const [key, value] of Object.entries(change.variables)) {
|
|
39098
|
+
const currentSvc = options?.currentState?.services[change.serviceName];
|
|
39099
|
+
const oldVal = currentSvc?.variables[key];
|
|
39100
|
+
const oldStr = oldVal !== undefined ? maskValue(key, oldVal) : "(unset)";
|
|
39101
|
+
console.log(` ${icon} ${key}: ${dim(`"${oldStr}"`, noColor)} → ${dim(`"${maskValue(key, value)}"`, noColor)}`);
|
|
39102
|
+
}
|
|
39103
|
+
} else if (verbose && change.type === "upsert-shared-variables") {
|
|
39104
|
+
for (const [key, value] of Object.entries(change.variables)) {
|
|
39105
|
+
const oldVal = options?.currentState?.sharedVariables[key];
|
|
39106
|
+
const oldStr = oldVal !== undefined ? maskValue(key, oldVal) : "(unset)";
|
|
39107
|
+
console.log(` ${icon} ${key}: ${dim(`"${oldStr}"`, noColor)} → ${dim(`"${maskValue(key, value)}"`, noColor)}`);
|
|
39077
39108
|
}
|
|
39078
|
-
}
|
|
39079
|
-
}
|
|
39080
|
-
for (const c of deleteVars) {
|
|
39081
|
-
if (c.type === "delete-variables") {
|
|
39082
|
-
console.log(` ${c.serviceName}: ${red("delete", noColor)} ${c.variableNames.length} var(s) — ${c.variableNames.join(", ")}`);
|
|
39083
|
-
}
|
|
39084
|
-
}
|
|
39085
|
-
console.log();
|
|
39086
|
-
}
|
|
39087
|
-
if (domainChanges.length > 0) {
|
|
39088
|
-
console.log(` ${yellow("~", noColor)} DOMAINS:`);
|
|
39089
|
-
for (const c of domainChanges) {
|
|
39090
|
-
if (c.type === "create-domain") {
|
|
39091
|
-
console.log(` ${green("+", noColor)} ${c.serviceName}: ${c.domain}`);
|
|
39092
|
-
} else if (c.type === "delete-domain") {
|
|
39093
|
-
console.log(` ${red("-", noColor)} ${c.serviceName}: ${c.domain}`);
|
|
39094
|
-
}
|
|
39095
|
-
}
|
|
39096
|
-
console.log();
|
|
39097
|
-
}
|
|
39098
|
-
if (volumeCreates.length > 0 || volumeDeletes.length > 0) {
|
|
39099
|
-
console.log(` ${yellow("~", noColor)} VOLUMES:`);
|
|
39100
|
-
for (const c of volumeCreates) {
|
|
39101
|
-
if (c.type === "create-volume") {
|
|
39102
|
-
console.log(` ${green("+", noColor)} ${c.serviceName}: ${c.mount}`);
|
|
39103
|
-
}
|
|
39104
|
-
}
|
|
39105
|
-
for (const c of volumeDeletes) {
|
|
39106
|
-
if (c.type === "delete-volume") {
|
|
39107
|
-
console.log(` ${red("-", noColor)} ${c.serviceName}`);
|
|
39108
|
-
}
|
|
39109
|
-
}
|
|
39110
|
-
console.log();
|
|
39111
|
-
}
|
|
39112
|
-
if (serviceDomainChanges.length > 0) {
|
|
39113
|
-
console.log(` ${yellow("~", noColor)} RAILWAY DOMAINS:`);
|
|
39114
|
-
for (const c of serviceDomainChanges) {
|
|
39115
|
-
if (c.type === "create-service-domain") {
|
|
39116
|
-
const port = c.targetPort ? ` (port ${c.targetPort})` : "";
|
|
39117
|
-
console.log(` ${green("+", noColor)} ${c.serviceName}${port}`);
|
|
39118
|
-
} else if (c.type === "delete-service-domain") {
|
|
39119
|
-
console.log(` ${red("-", noColor)} ${c.serviceName}`);
|
|
39120
|
-
}
|
|
39121
|
-
}
|
|
39122
|
-
console.log();
|
|
39123
|
-
}
|
|
39124
|
-
if (tcpProxyChanges.length > 0) {
|
|
39125
|
-
console.log(` ${yellow("~", noColor)} TCP PROXIES:`);
|
|
39126
|
-
for (const c of tcpProxyChanges) {
|
|
39127
|
-
if (c.type === "create-tcp-proxy") {
|
|
39128
|
-
console.log(` ${green("+", noColor)} ${c.serviceName}: port ${c.applicationPort}`);
|
|
39129
|
-
} else if (c.type === "delete-tcp-proxy") {
|
|
39130
|
-
console.log(` ${red("-", noColor)} ${c.serviceName}`);
|
|
39131
|
-
}
|
|
39132
|
-
}
|
|
39133
|
-
console.log();
|
|
39134
|
-
}
|
|
39135
|
-
if (limitsChanges.length > 0) {
|
|
39136
|
-
console.log(` ${yellow("~", noColor)} RESOURCE LIMITS:`);
|
|
39137
|
-
for (const c of limitsChanges) {
|
|
39138
|
-
if (c.type === "update-service-limits") {
|
|
39139
|
-
const parts2 = [];
|
|
39140
|
-
if (c.limits.memoryGB !== undefined)
|
|
39141
|
-
parts2.push(`memory: ${c.limits.memoryGB ?? "unset"}GB`);
|
|
39142
|
-
if (c.limits.vCPUs !== undefined)
|
|
39143
|
-
parts2.push(`vCPUs: ${c.limits.vCPUs ?? "unset"}`);
|
|
39144
|
-
console.log(` ${yellow("~", noColor)} ${c.serviceName}: ${parts2.join(", ")}`);
|
|
39145
|
-
}
|
|
39146
|
-
}
|
|
39147
|
-
console.log();
|
|
39148
|
-
}
|
|
39149
|
-
if (staticIpChanges.length > 0) {
|
|
39150
|
-
console.log(` ${yellow("~", noColor)} STATIC OUTBOUND IPS:`);
|
|
39151
|
-
for (const c of staticIpChanges) {
|
|
39152
|
-
if (c.type === "enable-static-ips") {
|
|
39153
|
-
console.log(` ${green("+", noColor)} ${c.serviceName}: enable`);
|
|
39154
|
-
} else if (c.type === "disable-static-ips") {
|
|
39155
|
-
console.log(` ${red("-", noColor)} ${c.serviceName}: disable`);
|
|
39109
|
+
} else {
|
|
39110
|
+
console.log(` ${icon} ${desc.summary}`);
|
|
39156
39111
|
}
|
|
39157
39112
|
}
|
|
39158
39113
|
console.log();
|
|
39159
39114
|
}
|
|
39160
|
-
|
|
39161
|
-
|
|
39162
|
-
|
|
39163
|
-
|
|
39164
|
-
|
|
39165
|
-
|
|
39166
|
-
|
|
39167
|
-
|
|
39168
|
-
|
|
39169
|
-
|
|
39170
|
-
|
|
39115
|
+
let createCount = 0;
|
|
39116
|
+
let updateCount = 0;
|
|
39117
|
+
let deleteCount = 0;
|
|
39118
|
+
for (const entries of groups.values()) {
|
|
39119
|
+
for (const { desc } of entries) {
|
|
39120
|
+
if (desc.action === "create")
|
|
39121
|
+
createCount++;
|
|
39122
|
+
else if (desc.action === "update")
|
|
39123
|
+
updateCount++;
|
|
39124
|
+
else
|
|
39125
|
+
deleteCount++;
|
|
39171
39126
|
}
|
|
39172
|
-
console.log();
|
|
39173
39127
|
}
|
|
39174
|
-
const createCount = creates.length + volumeCreates.length + bucketCreates.length + serviceDomainChanges.filter((c) => c.type === "create-service-domain").length + tcpProxyChanges.filter((c) => c.type === "create-tcp-proxy").length + staticIpChanges.filter((c) => c.type === "enable-static-ips").length;
|
|
39175
|
-
const updateCount = settingsChanges.length + triggerChanges.length + limitsChanges.length + upsertVars.length + sharedUpsert.length + domainChanges.filter((c) => c.type === "create-domain").length;
|
|
39176
|
-
const deleteCount = deletes.length + deleteVars.length + sharedDelete.length + volumeDeletes.length + bucketDeletes.length + domainChanges.filter((c) => c.type === "delete-domain").length + serviceDomainChanges.filter((c) => c.type === "delete-service-domain").length + tcpProxyChanges.filter((c) => c.type === "delete-tcp-proxy").length + staticIpChanges.filter((c) => c.type === "disable-static-ips").length;
|
|
39177
39128
|
const parts = [];
|
|
39178
39129
|
if (createCount > 0)
|
|
39179
39130
|
parts.push(green(`${createCount} to create`, noColor));
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachyon-gg/railway-deploy",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "https://github.com/tachyon-gg/railway-deploy"
|
|
7
|
+
"url": "git+https://github.com/tachyon-gg/railway-deploy.git"
|
|
8
8
|
},
|
|
9
9
|
"main": "./dist/index.js",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": "./dist/index.js"
|
|
12
12
|
},
|
|
13
13
|
"bin": {
|
|
14
|
-
"railway-deploy": "
|
|
14
|
+
"railway-deploy": "dist/index.js"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"dist/"
|