@workos/oagen-emitters 0.9.0 → 0.10.0
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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/index.mjs +1 -1
- package/dist/{plugin-Dh9JSScr.mjs → plugin-H0KhxbN7.mjs} +22 -10
- package/dist/{plugin-Dh9JSScr.mjs.map → plugin-H0KhxbN7.mjs.map} +1 -1
- package/dist/plugin.mjs +1 -1
- package/package.json +2 -2
- package/src/dotnet/enums.ts +37 -11
- package/test/dotnet/enums.test.ts +146 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.10.0](https://github.com/workos/oagen-emitters/compare/v0.9.1...v0.10.0) (2026-05-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **dotnet:** honor enum default as zero variant ([#92](https://github.com/workos/oagen-emitters/issues/92)) ([3fbb5d5](https://github.com/workos/oagen-emitters/commit/3fbb5d5f53fa66f1a3b4f2cb08c069e9d2d2a1fc))
|
|
9
|
+
|
|
10
|
+
## [0.9.1](https://github.com/workos/oagen-emitters/compare/v0.9.0...v0.9.1) (2026-05-06)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* oagen bump ([1ab0a55](https://github.com/workos/oagen-emitters/commit/1ab0a551ca567b09dec22cd3f75adda33d2cb550))
|
|
16
|
+
|
|
3
17
|
## [0.9.0](https://github.com/workos/oagen-emitters/compare/v0.8.2...v0.9.0) (2026-05-06)
|
|
4
18
|
|
|
5
19
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as nodeEmitter, a as rustExtractor, c as pythonExtractor, d as rubyEmitter, f as kotlinEmitter, g as pythonEmitter, h as phpEmitter, i as kotlinExtractor, l as rubyExtractor, m as goEmitter, n as elixirExtractor, o as goExtractor, p as dotnetEmitter, r as dotnetExtractor, s as phpExtractor, t as workosEmittersPlugin, u as nodeExtractor } from "./plugin-
|
|
1
|
+
import { _ as nodeEmitter, a as rustExtractor, c as pythonExtractor, d as rubyEmitter, f as kotlinEmitter, g as pythonEmitter, h as phpEmitter, i as kotlinExtractor, l as rubyExtractor, m as goEmitter, n as elixirExtractor, o as goExtractor, p as dotnetEmitter, r as dotnetExtractor, s as phpExtractor, t as workosEmittersPlugin, u as nodeExtractor } from "./plugin-H0KhxbN7.mjs";
|
|
2
2
|
export { dotnetEmitter, dotnetExtractor, elixirExtractor, goEmitter, goExtractor, kotlinEmitter, kotlinExtractor, nodeEmitter, nodeExtractor, phpEmitter, phpExtractor, pythonEmitter, pythonExtractor, rubyEmitter, rubyExtractor, rustExtractor, workosEmittersPlugin };
|
|
@@ -15558,15 +15558,22 @@ function generateEnums$2(enums, ctx) {
|
|
|
15558
15558
|
lines.push(" [STJS.JsonConverter(typeof(WorkOSStringEnumConverterFactory))]");
|
|
15559
15559
|
lines.push(` public enum ${typeName}`);
|
|
15560
15560
|
lines.push(" {");
|
|
15561
|
-
|
|
15562
|
-
|
|
15563
|
-
lines.push("");
|
|
15561
|
+
const defaultMatch = enumDef.default !== void 0 ? uniqueValues.find((v) => v.value === enumDef.default) : void 0;
|
|
15562
|
+
const orderedValues = defaultMatch ? [defaultMatch, ...uniqueValues.filter((v) => v !== defaultMatch)] : uniqueValues;
|
|
15564
15563
|
const usedNames = /* @__PURE__ */ new Set();
|
|
15565
|
-
usedNames.add("Unknown");
|
|
15566
15564
|
const usedWireValues = /* @__PURE__ */ new Set();
|
|
15567
|
-
|
|
15568
|
-
|
|
15569
|
-
|
|
15565
|
+
if (defaultMatch) {
|
|
15566
|
+
usedNames.add("Unknown");
|
|
15567
|
+
usedWireValues.add("unknown");
|
|
15568
|
+
} else {
|
|
15569
|
+
lines.push(` [EnumMember(Value = "unknown")]`);
|
|
15570
|
+
lines.push(` Unknown,`);
|
|
15571
|
+
lines.push("");
|
|
15572
|
+
usedNames.add("Unknown");
|
|
15573
|
+
usedWireValues.add("unknown");
|
|
15574
|
+
}
|
|
15575
|
+
for (let i = 0; i < orderedValues.length; i++) {
|
|
15576
|
+
const v = orderedValues[i];
|
|
15570
15577
|
if (usedWireValues.has(String(v.value))) continue;
|
|
15571
15578
|
usedWireValues.add(String(v.value));
|
|
15572
15579
|
let memberName = className$2(String(v.value));
|
|
@@ -15582,8 +15589,13 @@ function generateEnums$2(enums, ctx) {
|
|
|
15582
15589
|
lines.push(` [System.Obsolete("${msg}")]`);
|
|
15583
15590
|
}
|
|
15584
15591
|
lines.push(` [EnumMember(Value = "${v.value}")]`);
|
|
15585
|
-
const
|
|
15586
|
-
lines.push(` ${memberName}${
|
|
15592
|
+
const ordinal = defaultMatch ? ` = ${i}` : "";
|
|
15593
|
+
lines.push(` ${memberName}${ordinal},`);
|
|
15594
|
+
}
|
|
15595
|
+
if (defaultMatch) {
|
|
15596
|
+
lines.push("");
|
|
15597
|
+
lines.push(` [EnumMember(Value = "unknown")]`);
|
|
15598
|
+
lines.push(` Unknown = 99,`);
|
|
15587
15599
|
}
|
|
15588
15600
|
lines.push(" }");
|
|
15589
15601
|
lines.push("}");
|
|
@@ -22800,4 +22812,4 @@ const workosEmittersPlugin = {
|
|
|
22800
22812
|
//#endregion
|
|
22801
22813
|
export { nodeEmitter as _, rustExtractor as a, pythonExtractor as c, rubyEmitter as d, kotlinEmitter as f, pythonEmitter as g, phpEmitter as h, kotlinExtractor as i, rubyExtractor as l, goEmitter as m, elixirExtractor as n, goExtractor as o, dotnetEmitter as p, dotnetExtractor as r, phpExtractor as s, workosEmittersPlugin as t, nodeExtractor as u };
|
|
22802
22814
|
|
|
22803
|
-
//# sourceMappingURL=plugin-
|
|
22815
|
+
//# sourceMappingURL=plugin-H0KhxbN7.mjs.map
|