@ruiapp/rapid-core 0.1.41 → 0.1.42

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 CHANGED
@@ -3872,7 +3872,7 @@ var dayOfMonth = /*#__PURE__*/Object.freeze({
3872
3872
 
3873
3873
  const segmentType$1 = "parameter";
3874
3874
  async function resolveSegmentValue$1(server, ruleCode, config, input) {
3875
- const segmentValue = lodash.get(input.parameters, config.parameterName, "");
3875
+ const segmentValue = lodash.get(input.parameters, config.parameterName, config.defaultContent || "");
3876
3876
  return padSegment(segmentValue, config.length, config.padding);
3877
3877
  }
3878
3878
 
@@ -38,6 +38,7 @@ export type SequenceDayOfYearSegmentConfig = {
38
38
  export type SequenceParameterSegmentConfig = {
39
39
  type: "parameter";
40
40
  parameterName: string;
41
+ defaultContent?: string;
41
42
  padding?: string;
42
43
  length?: number;
43
44
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruiapp/rapid-core",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -57,6 +57,7 @@ export type SequenceDayOfYearSegmentConfig = {
57
57
  export type SequenceParameterSegmentConfig = {
58
58
  type: "parameter",
59
59
  parameterName: string;
60
+ defaultContent?: string;
60
61
  padding?: string;
61
62
  length?: number;
62
63
  }
@@ -7,7 +7,7 @@ import { IRpdServer } from "~/core/server";
7
7
  export const segmentType = "parameter";
8
8
 
9
9
  export async function resolveSegmentValue(server: IRpdServer, ruleCode: string, config: SequenceParameterSegmentConfig, input: GenerateSequenceNumbersInput): Promise<string> {
10
- const segmentValue = get(input.parameters, config.parameterName, "");
10
+ const segmentValue = get(input.parameters, config.parameterName, config.defaultContent || "");
11
11
 
12
12
  return padSegment(
13
13
  segmentValue,