@workos/oagen-emitters 0.12.3 → 0.12.4
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 +7 -0
- package/dist/index.mjs +1 -1
- package/dist/{plugin-D2N2ZT5W.mjs → plugin-nmiHN7Ko.mjs} +27 -1
- package/dist/plugin-nmiHN7Ko.mjs.map +1 -0
- package/dist/plugin.mjs +1 -1
- package/package.json +1 -1
- package/src/node/models.ts +35 -0
- package/test/node/models.test.ts +32 -0
- package/dist/plugin-D2N2ZT5W.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.12.4](https://github.com/workos/oagen-emitters/compare/v0.12.3...v0.12.4) (2026-05-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **node:** emit serializers/index.ts barrel for owned and adopted services ([#109](https://github.com/workos/oagen-emitters/issues/109)) ([e176552](https://github.com/workos/oagen-emitters/commit/e17655296de50c9df759b84273b104ae828cd08e))
|
|
9
|
+
|
|
3
10
|
## [0.12.3](https://github.com/workos/oagen-emitters/compare/v0.12.2...v0.12.3) (2026-05-18)
|
|
4
11
|
|
|
5
12
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as pythonEmitter, a as rustExtractor, c as pythonExtractor, d as rustEmitter, f as rubyEmitter, g as phpEmitter, h as goEmitter, i as kotlinExtractor, l as rubyExtractor, m as dotnetEmitter, n as elixirExtractor, o as goExtractor, p as kotlinEmitter, r as dotnetExtractor, s as phpExtractor, t as workosEmittersPlugin, u as nodeExtractor, v as nodeEmitter } from "./plugin-
|
|
1
|
+
import { _ as pythonEmitter, a as rustExtractor, c as pythonExtractor, d as rustEmitter, f as rubyEmitter, g as phpEmitter, h as goEmitter, i as kotlinExtractor, l as rubyExtractor, m as dotnetEmitter, n as elixirExtractor, o as goExtractor, p as kotlinEmitter, r as dotnetExtractor, s as phpExtractor, t as workosEmittersPlugin, u as nodeExtractor, v as nodeEmitter } from "./plugin-nmiHN7Ko.mjs";
|
|
2
2
|
export { dotnetEmitter, dotnetExtractor, elixirExtractor, goEmitter, goExtractor, kotlinEmitter, kotlinExtractor, nodeEmitter, nodeExtractor, phpEmitter, phpExtractor, pythonEmitter, pythonExtractor, rubyEmitter, rubyExtractor, rustEmitter, rustExtractor, workosEmittersPlugin };
|
|
@@ -6312,6 +6312,32 @@ function generateSerializers(models, ctx, shared) {
|
|
|
6312
6312
|
});
|
|
6313
6313
|
}
|
|
6314
6314
|
ctx._skippedSerializeModels = skippedSerializeModels;
|
|
6315
|
+
const serializersByDir = /* @__PURE__ */ new Map();
|
|
6316
|
+
for (const f of files) {
|
|
6317
|
+
const match = f.path.match(/^src\/([^/]+)\/serializers\/(.+)\.serializer\.ts$/);
|
|
6318
|
+
if (!match) continue;
|
|
6319
|
+
const [, dir, stem] = match;
|
|
6320
|
+
if (!serializersByDir.has(dir)) serializersByDir.set(dir, /* @__PURE__ */ new Set());
|
|
6321
|
+
serializersByDir.get(dir).add(stem);
|
|
6322
|
+
}
|
|
6323
|
+
const liveRootForBarrel = ctx.outputDir ?? ctx.targetDir;
|
|
6324
|
+
for (const [dir, stems] of serializersByDir) {
|
|
6325
|
+
if (liveRootForBarrel) {
|
|
6326
|
+
const serializersDir = path.join(liveRootForBarrel, "src", dir, "serializers");
|
|
6327
|
+
try {
|
|
6328
|
+
for (const entry of fs.readdirSync(serializersDir)) {
|
|
6329
|
+
if (!entry.endsWith(".serializer.ts")) continue;
|
|
6330
|
+
stems.add(entry.replace(/\.serializer\.ts$/, ""));
|
|
6331
|
+
}
|
|
6332
|
+
} catch {}
|
|
6333
|
+
}
|
|
6334
|
+
const lines = [...stems].sort().map((stem) => `export * from './${stem}.serializer';`);
|
|
6335
|
+
files.push({
|
|
6336
|
+
path: `src/${dir}/serializers/index.ts`,
|
|
6337
|
+
content: lines.join("\n") + "\n",
|
|
6338
|
+
overwriteExisting: true
|
|
6339
|
+
});
|
|
6340
|
+
}
|
|
6315
6341
|
return files;
|
|
6316
6342
|
}
|
|
6317
6343
|
function generateModelsAndSerializers(models, ctx) {
|
|
@@ -26559,4 +26585,4 @@ const workosEmittersPlugin = {
|
|
|
26559
26585
|
//#endregion
|
|
26560
26586
|
export { pythonEmitter as _, rustExtractor as a, pythonExtractor as c, rustEmitter as d, rubyEmitter as f, phpEmitter as g, goEmitter as h, kotlinExtractor as i, rubyExtractor as l, dotnetEmitter as m, elixirExtractor as n, goExtractor as o, kotlinEmitter as p, dotnetExtractor as r, phpExtractor as s, workosEmittersPlugin as t, nodeExtractor as u, nodeEmitter as v };
|
|
26561
26587
|
|
|
26562
|
-
//# sourceMappingURL=plugin-
|
|
26588
|
+
//# sourceMappingURL=plugin-nmiHN7Ko.mjs.map
|