@rtpaulino/entity 0.17.0 → 0.17.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"problem.d.ts","sourceRoot":"","sources":["../../src/lib/problem.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAI1B,qBACa,OAAO;IAElB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAG1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,IAAI,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE;IAKxD,QAAQ,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"problem.d.ts","sourceRoot":"","sources":["../../src/lib/problem.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAI1B,qBACa,OAAO;IAElB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAG1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,IAAI,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE;IAKxD,QAAQ,IAAI,MAAM;CAOnB"}
|
package/dist/lib/problem.js
CHANGED
|
@@ -9,7 +9,11 @@ export class Problem {
|
|
|
9
9
|
this.message = data.message;
|
|
10
10
|
}
|
|
11
11
|
toString() {
|
|
12
|
-
|
|
12
|
+
if (this.property) {
|
|
13
|
+
return `${this.property}: ${this.message}`;
|
|
14
|
+
} else {
|
|
15
|
+
return this.message;
|
|
16
|
+
}
|
|
13
17
|
}
|
|
14
18
|
}
|
|
15
19
|
_ts_decorate([
|
package/dist/lib/problem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/problem.ts"],"sourcesContent":["import 'reflect-metadata';\nimport { Entity } from './entity.js';\nimport { StringProperty } from './property.js';\n\n@Entity()\nexport class Problem {\n @StringProperty()\n readonly property: string;\n\n @StringProperty()\n readonly message: string;\n\n constructor(data: { property?: string; message: string }) {\n this.property = data.property ?? '';\n this.message = data.message;\n }\n\n toString(): string {\n return `${this.property}: ${this.message}`;\n }\n}\n"],"names":["Entity","StringProperty","Problem","data","property","message","toString"],"mappings":";;AAAA,OAAO,mBAAmB;AAC1B,SAASA,MAAM,QAAQ,cAAc;AACrC,SAASC,cAAc,QAAQ,gBAAgB;AAG/C,OAAO,MAAMC;IAOX,YAAYC,IAA4C,CAAE;QACxD,IAAI,CAACC,QAAQ,GAAGD,KAAKC,QAAQ,IAAI;QACjC,IAAI,CAACC,OAAO,GAAGF,KAAKE,OAAO;IAC7B;IAEAC,WAAmB;QACjB,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"sources":["../../src/lib/problem.ts"],"sourcesContent":["import 'reflect-metadata';\nimport { Entity } from './entity.js';\nimport { StringProperty } from './property.js';\n\n@Entity()\nexport class Problem {\n @StringProperty()\n readonly property: string;\n\n @StringProperty()\n readonly message: string;\n\n constructor(data: { property?: string; message: string }) {\n this.property = data.property ?? '';\n this.message = data.message;\n }\n\n toString(): string {\n if (this.property) {\n return `${this.property}: ${this.message}`;\n } else {\n return this.message;\n }\n }\n}\n"],"names":["Entity","StringProperty","Problem","data","property","message","toString"],"mappings":";;AAAA,OAAO,mBAAmB;AAC1B,SAASA,MAAM,QAAQ,cAAc;AACrC,SAASC,cAAc,QAAQ,gBAAgB;AAG/C,OAAO,MAAMC;IAOX,YAAYC,IAA4C,CAAE;QACxD,IAAI,CAACC,QAAQ,GAAGD,KAAKC,QAAQ,IAAI;QACjC,IAAI,CAACC,OAAO,GAAGF,KAAKE,OAAO;IAC7B;IAEAC,WAAmB;QACjB,IAAI,IAAI,CAACF,QAAQ,EAAE;YACjB,OAAO,GAAG,IAAI,CAACA,QAAQ,CAAC,EAAE,EAAE,IAAI,CAACC,OAAO,EAAE;QAC5C,OAAO;YACL,OAAO,IAAI,CAACA,OAAO;QACrB;IACF;AACF"}
|