@crossdelta/infrastructure 0.6.1 → 0.6.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.cjs +8 -3
- package/dist/index.js +8 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -970,21 +970,26 @@ var resolveStreams = (definitions, policies = {}, defaults = DEFAULT_POLICY) =>
|
|
|
970
970
|
var generateSetupScript = (streams) => {
|
|
971
971
|
const streamCommands = streams.map((s) => {
|
|
972
972
|
const subjects = s.subjects.join(",");
|
|
973
|
-
const
|
|
973
|
+
const addArgs = [
|
|
974
974
|
`--retention ${s.retention}`,
|
|
975
975
|
`--storage ${s.storage}`,
|
|
976
976
|
`--max-age ${s.maxAge}`,
|
|
977
977
|
`--replicas ${s.replicas}`,
|
|
978
978
|
`--max-msg-size ${s.maxMsgSize}`
|
|
979
979
|
].join(" ");
|
|
980
|
+
const editArgs = [
|
|
981
|
+
`--max-age ${s.maxAge}`,
|
|
982
|
+
`--replicas ${s.replicas}`,
|
|
983
|
+
`--max-msg-size ${s.maxMsgSize}`
|
|
984
|
+
].join(" ");
|
|
980
985
|
return [
|
|
981
986
|
`echo "Processing stream: ${s.stream} (${subjects})"`,
|
|
982
987
|
`if nats $NATS_OPTS stream info "${s.stream}" > /dev/null 2>&1; then`,
|
|
983
988
|
` echo " Updating existing stream..."`,
|
|
984
|
-
` nats $NATS_OPTS stream edit "${s.stream}" --subjects "${subjects}" ${
|
|
989
|
+
` nats $NATS_OPTS stream edit "${s.stream}" --subjects "${subjects}" ${editArgs} --force`,
|
|
985
990
|
`else`,
|
|
986
991
|
` echo " Creating new stream..."`,
|
|
987
|
-
` nats $NATS_OPTS stream add "${s.stream}" --subjects "${subjects}" ${
|
|
992
|
+
` nats $NATS_OPTS stream add "${s.stream}" --subjects "${subjects}" ${addArgs} --defaults`,
|
|
988
993
|
`fi`,
|
|
989
994
|
`echo " ✅ ${s.stream} ready"`,
|
|
990
995
|
``
|
package/dist/index.js
CHANGED
|
@@ -876,21 +876,26 @@ var resolveStreams = (definitions, policies = {}, defaults = DEFAULT_POLICY) =>
|
|
|
876
876
|
var generateSetupScript = (streams) => {
|
|
877
877
|
const streamCommands = streams.map((s) => {
|
|
878
878
|
const subjects = s.subjects.join(",");
|
|
879
|
-
const
|
|
879
|
+
const addArgs = [
|
|
880
880
|
`--retention ${s.retention}`,
|
|
881
881
|
`--storage ${s.storage}`,
|
|
882
882
|
`--max-age ${s.maxAge}`,
|
|
883
883
|
`--replicas ${s.replicas}`,
|
|
884
884
|
`--max-msg-size ${s.maxMsgSize}`
|
|
885
885
|
].join(" ");
|
|
886
|
+
const editArgs = [
|
|
887
|
+
`--max-age ${s.maxAge}`,
|
|
888
|
+
`--replicas ${s.replicas}`,
|
|
889
|
+
`--max-msg-size ${s.maxMsgSize}`
|
|
890
|
+
].join(" ");
|
|
886
891
|
return [
|
|
887
892
|
`echo "Processing stream: ${s.stream} (${subjects})"`,
|
|
888
893
|
`if nats $NATS_OPTS stream info "${s.stream}" > /dev/null 2>&1; then`,
|
|
889
894
|
` echo " Updating existing stream..."`,
|
|
890
|
-
` nats $NATS_OPTS stream edit "${s.stream}" --subjects "${subjects}" ${
|
|
895
|
+
` nats $NATS_OPTS stream edit "${s.stream}" --subjects "${subjects}" ${editArgs} --force`,
|
|
891
896
|
`else`,
|
|
892
897
|
` echo " Creating new stream..."`,
|
|
893
|
-
` nats $NATS_OPTS stream add "${s.stream}" --subjects "${subjects}" ${
|
|
898
|
+
` nats $NATS_OPTS stream add "${s.stream}" --subjects "${subjects}" ${addArgs} --defaults`,
|
|
894
899
|
`fi`,
|
|
895
900
|
`echo " ✅ ${s.stream} ready"`,
|
|
896
901
|
``
|