@kubb/studio 5.5.2 → 5.5.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.
@@ -0,0 +1,175 @@
1
+ import "./rolldown-runtime-CRm0XQPb.js";
2
+ import { createHash } from "node:crypto";
3
+ import { glob, mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
4
+ import { join, relative, sep } from "node:path";
5
+ import { promisify } from "node:util";
6
+ import { tmpdir } from "node:os";
7
+ import { gzip } from "node:zlib";
8
+ import { build } from "tsdown";
9
+ //#region src/operations/snapshotPackage.ts
10
+ const gzipAsync = promisify(gzip);
11
+ const UPLOAD_TIMEOUT_MS = 12e4;
12
+ /**
13
+ * Maps a generated file's path to its place inside the tarball, stripping everything before a
14
+ * `src`/`dist` segment and any `..`/empty path segment so a crafted file name cannot escape the
15
+ * `package/` root.
16
+ */
17
+ function packagePath(filePath) {
18
+ const normalized = filePath.replaceAll("\\", "/");
19
+ return `package/${(normalized.match(/\/(?:src|dist)\/.*$/)?.[0].slice(1) ?? normalized.replace(/^\/+/, "")).split("/").filter((part) => part && part !== "." && part !== "..").join("/")}`;
20
+ }
21
+ /**
22
+ * Splits a tarball entry path into the legacy 100-byte `name` field and, when the path does not
23
+ * fit, the 155-byte USTAR `prefix` field that extends it. Throws rather than silently truncating
24
+ * a path the format cannot address (max 256 bytes: 100 name + 1 separator + 155 prefix).
25
+ */
26
+ function splitEntryPath(path) {
27
+ if (Buffer.byteLength(path, "utf8") <= 100) return {
28
+ name: path,
29
+ prefix: ""
30
+ };
31
+ for (let i = path.length - 1; i >= 0; i--) {
32
+ if (path[i] !== "/") continue;
33
+ const prefix = path.slice(0, i);
34
+ const name = path.slice(i + 1);
35
+ if (Buffer.byteLength(prefix, "utf8") <= 155 && Buffer.byteLength(name, "utf8") <= 100) return {
36
+ name,
37
+ prefix
38
+ };
39
+ }
40
+ throw new Error(`Snapshot path is too long for a tar entry: ${path}`);
41
+ }
42
+ function header(path, size) {
43
+ const { name, prefix } = splitEntryPath(path);
44
+ const value = Buffer.alloc(512);
45
+ value.write(name, 0, "utf8");
46
+ value.write("0000644\0", 100, "ascii");
47
+ value.write("0000000\0", 108, "ascii");
48
+ value.write("0000000\0", 116, "ascii");
49
+ value.write(`${size.toString(8).padStart(11, "0")}\0`, 124, "ascii");
50
+ value.write(`${Math.floor(Date.now() / 1e3).toString(8).padStart(11, "0")}\0`, 136, "ascii");
51
+ value.fill(32, 148, 156);
52
+ value.write("0", 156, "ascii");
53
+ value.write("ustar\0", 257, "ascii");
54
+ value.write("00", 263, "ascii");
55
+ value.write("0000000\0", 265, "ascii");
56
+ value.write("0000000\0", 297, "ascii");
57
+ value.write(prefix, 345, "utf8");
58
+ const checksum = [...value].reduce((sum, byte) => sum + byte, 0);
59
+ value.write(`${checksum.toString(8).padStart(6, "0")}\0 `, 148, "ascii");
60
+ return value;
61
+ }
62
+ /**
63
+ * Packs a generation's files into a gzipped, npm-installable tarball: a `package/` root with the
64
+ * generated sources, a `tsdown`-built `dist/` (esm + cjs), and a `package.json` manifest.
65
+ */
66
+ async function createSnapshotPackage(files, packageInfo) {
67
+ const root = await mkdtemp(join(tmpdir(), "kubb-snapshot-"));
68
+ const dist = join(root, "dist");
69
+ const resolvedPaths = Object.entries(files).map(([name, content]) => ({
70
+ name,
71
+ content,
72
+ target: packagePath(name)
73
+ }));
74
+ const targetOwners = /* @__PURE__ */ new Map();
75
+ for (const { name, target } of resolvedPaths) {
76
+ const owner = targetOwners.get(target);
77
+ if (owner) throw new Error(`Snapshot has two generated files that sanitize to the same path "${target}": "${owner}" and "${name}"`);
78
+ targetOwners.set(target, name);
79
+ }
80
+ try {
81
+ await mkdir(dist);
82
+ await Promise.all(resolvedPaths.map(async ({ content, target }) => {
83
+ const path = join(root, target.slice(8));
84
+ await mkdir(join(path, ".."), { recursive: true });
85
+ await writeFile(path, content);
86
+ }));
87
+ const sourceEntries = resolvedPaths.filter(({ name }) => /\.(?:[cm]?[jt]sx?)$/.test(name)).map(({ target }) => join(root, target.slice(8)));
88
+ if (sourceEntries.length) await build({
89
+ entry: sourceEntries,
90
+ outDir: dist,
91
+ format: ["esm", "cjs"],
92
+ dts: false,
93
+ sourcemap: false,
94
+ unbundle: true,
95
+ report: false,
96
+ logLevel: "silent",
97
+ fixedExtension: true
98
+ });
99
+ const builtEntries = await Promise.all((await Array.fromAsync(glob("**/*", {
100
+ cwd: dist,
101
+ withFileTypes: true
102
+ }))).filter((entry) => entry.isFile()).map(async (entry) => {
103
+ const filePath = join(entry.parentPath, entry.name);
104
+ return [`package/dist/${relative(dist, filePath).split(sep).join("/")}`, await readFile(filePath, "utf8")];
105
+ }));
106
+ const builtPaths = new Set(builtEntries.map(([path]) => path));
107
+ const hasBarrel = builtPaths.has("package/dist/index.mjs") && builtPaths.has("package/dist/index.cjs");
108
+ const barrelFields = hasBarrel ? {
109
+ main: "./dist/index.cjs",
110
+ module: "./dist/index.mjs"
111
+ } : {};
112
+ const barrelExport = hasBarrel ? { ".": {
113
+ import: "./dist/index.mjs",
114
+ require: "./dist/index.cjs"
115
+ } } : {};
116
+ const entries = {
117
+ "package/package.json": JSON.stringify({
118
+ ...packageInfo,
119
+ type: "module",
120
+ ...barrelFields,
121
+ exports: {
122
+ ...barrelExport,
123
+ "./*": {
124
+ import: "./dist/*.mjs",
125
+ require: "./dist/*.cjs"
126
+ }
127
+ }
128
+ }, null, 2),
129
+ ...Object.fromEntries(resolvedPaths.map(({ content, target }) => [target, content])),
130
+ ...Object.fromEntries(builtEntries)
131
+ };
132
+ const chunks = [];
133
+ for (const [name, content] of Object.entries(entries)) {
134
+ const bytes = Buffer.from(content);
135
+ chunks.push(header(name, bytes.length), bytes, Buffer.alloc((512 - bytes.length % 512) % 512));
136
+ }
137
+ const bytes = await gzipAsync(Buffer.concat([...chunks, Buffer.alloc(1024)]));
138
+ return {
139
+ bytes,
140
+ integrity: `sha512-${createHash("sha512").update(bytes).digest("base64")}`
141
+ };
142
+ } finally {
143
+ await rm(root, {
144
+ recursive: true,
145
+ force: true
146
+ });
147
+ }
148
+ }
149
+ async function uploadSnapshot({ bytes, uploadPath, studioUrl, token, shutdown }) {
150
+ const uploadUrl = new URL(uploadPath, studioUrl);
151
+ if (uploadUrl.origin !== new URL(studioUrl).origin) throw new Error("Snapshot upload path must stay on the Studio origin");
152
+ const timeout = AbortSignal.timeout(UPLOAD_TIMEOUT_MS);
153
+ const signal = shutdown ? AbortSignal.any([shutdown, timeout]) : timeout;
154
+ const redirect = await fetch(uploadUrl, {
155
+ method: "PUT",
156
+ headers: { Authorization: `Bearer ${token}` },
157
+ redirect: "manual",
158
+ signal
159
+ });
160
+ const storageUrl = redirect.headers.get("location");
161
+ if (redirect.status !== 307 || !storageUrl) throw new Error(`Studio did not provide a storage URL (status ${redirect.status})`);
162
+ const storage = new URL(storageUrl);
163
+ if (storage.protocol !== "https:" && storage.hostname !== "localhost" && storage.hostname !== "127.0.0.1") throw new Error(`Refusing snapshot upload to ${storage.origin}`);
164
+ const response = await fetch(storage, {
165
+ method: "PUT",
166
+ body: new Uint8Array(bytes),
167
+ redirect: "error",
168
+ signal
169
+ });
170
+ if (!response.ok) throw new Error(`Snapshot upload failed with status ${response.status}`);
171
+ }
172
+ //#endregion
173
+ export { createSnapshotPackage, uploadSnapshot };
174
+
175
+ //# sourceMappingURL=snapshotPackage-I8bt8KTR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshotPackage-I8bt8KTR.js","names":[],"sources":["../src/operations/snapshotPackage.ts"],"sourcesContent":["import { createHash } from 'node:crypto'\nimport { glob, mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'\nimport { tmpdir } from 'node:os'\nimport { join, relative, sep } from 'node:path'\nimport { promisify } from 'node:util'\nimport { gzip } from 'node:zlib'\nimport { build } from 'tsdown'\n\nconst gzipAsync = promisify(gzip)\nconst UPLOAD_TIMEOUT_MS = 120_000\n\ntype SnapshotFiles = Record<string, string>\ntype SnapshotPackage = { name: string; version: string; peerDependencies: Record<string, string> }\n\n/**\n * Maps a generated file's path to its place inside the tarball, stripping everything before a\n * `src`/`dist` segment and any `..`/empty path segment so a crafted file name cannot escape the\n * `package/` root.\n */\nfunction packagePath(filePath: string): string {\n const normalized = filePath.replaceAll('\\\\', '/')\n const relativePath = normalized.match(/\\/(?:src|dist)\\/.*$/)?.[0].slice(1) ?? normalized.replace(/^\\/+/, '')\n const safe = relativePath\n .split('/')\n .filter((part) => part && part !== '.' && part !== '..')\n .join('/')\n return `package/${safe}`\n}\n\n/**\n * Splits a tarball entry path into the legacy 100-byte `name` field and, when the path does not\n * fit, the 155-byte USTAR `prefix` field that extends it. Throws rather than silently truncating\n * a path the format cannot address (max 256 bytes: 100 name + 1 separator + 155 prefix).\n */\nfunction splitEntryPath(path: string): { name: string; prefix: string } {\n if (Buffer.byteLength(path, 'utf8') <= 100) {\n return { name: path, prefix: '' }\n }\n\n for (let i = path.length - 1; i >= 0; i--) {\n if (path[i] !== '/') continue\n\n const prefix = path.slice(0, i)\n const name = path.slice(i + 1)\n if (Buffer.byteLength(prefix, 'utf8') <= 155 && Buffer.byteLength(name, 'utf8') <= 100) {\n return { name, prefix }\n }\n }\n\n throw new Error(`Snapshot path is too long for a tar entry: ${path}`)\n}\n\nfunction header(path: string, size: number): Buffer {\n const { name, prefix } = splitEntryPath(path)\n const value = Buffer.alloc(512)\n value.write(name, 0, 'utf8')\n value.write('0000644\\0', 100, 'ascii')\n value.write('0000000\\0', 108, 'ascii')\n value.write('0000000\\0', 116, 'ascii')\n value.write(`${size.toString(8).padStart(11, '0')}\\0`, 124, 'ascii')\n value.write(\n `${Math.floor(Date.now() / 1000)\n .toString(8)\n .padStart(11, '0')}\\0`,\n 136,\n 'ascii',\n )\n value.fill(32, 148, 156)\n value.write('0', 156, 'ascii')\n value.write('ustar\\0', 257, 'ascii')\n value.write('00', 263, 'ascii')\n value.write('0000000\\0', 265, 'ascii')\n value.write('0000000\\0', 297, 'ascii')\n value.write(prefix, 345, 'utf8')\n const checksum = [...value].reduce((sum, byte) => sum + byte, 0)\n value.write(`${checksum.toString(8).padStart(6, '0')}\\0 `, 148, 'ascii')\n return value\n}\n\n/**\n * Packs a generation's files into a gzipped, npm-installable tarball: a `package/` root with the\n * generated sources, a `tsdown`-built `dist/` (esm + cjs), and a `package.json` manifest.\n */\nexport async function createSnapshotPackage(files: SnapshotFiles, packageInfo: SnapshotPackage): Promise<{ bytes: Buffer; integrity: string }> {\n const root = await mkdtemp(join(tmpdir(), 'kubb-snapshot-'))\n const dist = join(root, 'dist')\n\n // Resolved once so the sanitized target for each file is computed exactly one way, and any two\n // generated files that collide after sanitizing (e.g. `a/../index.ts` and `a/index.ts`) are\n // caught here instead of silently overwriting one another later.\n const resolvedPaths = Object.entries(files).map(([name, content]) => ({ name, content, target: packagePath(name) }))\n const targetOwners = new Map<string, string>()\n for (const { name, target } of resolvedPaths) {\n const owner = targetOwners.get(target)\n if (owner) {\n throw new Error(`Snapshot has two generated files that sanitize to the same path \"${target}\": \"${owner}\" and \"${name}\"`)\n }\n targetOwners.set(target, name)\n }\n\n try {\n await mkdir(dist)\n await Promise.all(\n resolvedPaths.map(async ({ content, target }) => {\n const path = join(root, target.slice('package/'.length))\n await mkdir(join(path, '..'), { recursive: true })\n await writeFile(path, content)\n }),\n )\n const sourceEntries = resolvedPaths.filter(({ name }) => /\\.(?:[cm]?[jt]sx?)$/.test(name)).map(({ target }) => join(root, target.slice('package/'.length)))\n if (sourceEntries.length)\n await build({\n entry: sourceEntries,\n outDir: dist,\n format: ['esm', 'cjs'],\n dts: false,\n sourcemap: false,\n unbundle: true,\n report: false,\n logLevel: 'silent',\n // The manifest below always points at `.mjs`/`.cjs`, so the build must produce those\n // extensions regardless of the host process's own `package.json` \"type\" (tsdown otherwise\n // infers it from the nearest ancestor package.json, which differs by host).\n fixedExtension: true,\n })\n const builtEntries = await Promise.all(\n (await Array.fromAsync(glob('**/*', { cwd: dist, withFileTypes: true })))\n .filter((entry) => entry.isFile())\n .map(async (entry) => {\n // `unbundle: true` preserves dist's own subdirectory structure, so the archive path must\n // follow suit: `entry.name` alone is just the basename and would flatten (and collide)\n // nested output files.\n const filePath = join(entry.parentPath, entry.name)\n const distRelativePath = relative(dist, filePath).split(sep).join('/')\n return [`package/dist/${distRelativePath}`, await readFile(filePath, 'utf8')] as const\n }),\n )\n // Without `@kubb/plugin-barrel` the build produces no `dist/index.*`, so pointing\n // `main`/`module`/`exports['.']` at it would ship a manifest with missing files.\n const builtPaths = new Set(builtEntries.map(([path]) => path))\n const hasBarrel = builtPaths.has('package/dist/index.mjs') && builtPaths.has('package/dist/index.cjs')\n const barrelFields = hasBarrel ? { main: './dist/index.cjs', module: './dist/index.mjs' } : {}\n const barrelExport = hasBarrel ? { '.': { import: './dist/index.mjs', require: './dist/index.cjs' } } : {}\n\n const entries = {\n 'package/package.json': JSON.stringify(\n {\n ...packageInfo,\n type: 'module',\n ...barrelFields,\n // `exports` denies any subpath it doesn't list, so the wildcard keeps individual\n // generated files (e.g. `models/Pet`) importable without a barrel.\n exports: { ...barrelExport, './*': { import: './dist/*.mjs', require: './dist/*.cjs' } },\n },\n null,\n 2,\n ),\n ...Object.fromEntries(resolvedPaths.map(({ content, target }) => [target, content])),\n ...Object.fromEntries(builtEntries),\n }\n const chunks: Array<Buffer> = []\n\n for (const [name, content] of Object.entries(entries)) {\n const bytes = Buffer.from(content)\n chunks.push(header(name, bytes.length), bytes, Buffer.alloc((512 - (bytes.length % 512)) % 512))\n }\n\n const bytes = await gzipAsync(Buffer.concat([...chunks, Buffer.alloc(1024)]))\n return { bytes, integrity: `sha512-${createHash('sha512').update(bytes).digest('base64')}` }\n } finally {\n await rm(root, { recursive: true, force: true })\n }\n}\n\nexport async function uploadSnapshot({\n bytes,\n uploadPath,\n studioUrl,\n token,\n shutdown,\n}: {\n bytes: Buffer\n uploadPath: string\n studioUrl: string\n token: string\n shutdown?: AbortSignal\n}): Promise<void> {\n const uploadUrl = new URL(uploadPath, studioUrl)\n if (uploadUrl.origin !== new URL(studioUrl).origin) throw new Error('Snapshot upload path must stay on the Studio origin')\n\n const timeout = AbortSignal.timeout(UPLOAD_TIMEOUT_MS)\n const signal = shutdown ? AbortSignal.any([shutdown, timeout]) : timeout\n const redirect = await fetch(uploadUrl, { method: 'PUT', headers: { Authorization: `Bearer ${token}` }, redirect: 'manual', signal })\n const storageUrl = redirect.headers.get('location')\n if (redirect.status !== 307 || !storageUrl) throw new Error(`Studio did not provide a storage URL (status ${redirect.status})`)\n\n const storage = new URL(storageUrl)\n if (storage.protocol !== 'https:' && storage.hostname !== 'localhost' && storage.hostname !== '127.0.0.1') {\n throw new Error(`Refusing snapshot upload to ${storage.origin}`)\n }\n const response = await fetch(storage, { method: 'PUT', body: new Uint8Array(bytes), redirect: 'error', signal })\n if (!response.ok) throw new Error(`Snapshot upload failed with status ${response.status}`)\n}\n"],"mappings":";;;;;;;;;AAQA,MAAM,YAAY,UAAU,IAAI;AAChC,MAAM,oBAAoB;;;;;;AAU1B,SAAS,YAAY,UAA0B;CAC7C,MAAM,aAAa,SAAS,WAAW,MAAM,GAAG;CAMhD,OAAO,YALc,WAAW,MAAM,qBAAqB,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,WAAW,QAAQ,QAAQ,EAAE,EAAA,CAExG,MAAM,GAAG,CAAC,CACV,QAAQ,SAAS,QAAQ,SAAS,OAAO,SAAS,IAAI,CAAC,CACvD,KAAK,GACa;AACvB;;;;;;AAOA,SAAS,eAAe,MAAgD;CACtE,IAAI,OAAO,WAAW,MAAM,MAAM,KAAK,KACrC,OAAO;EAAE,MAAM;EAAM,QAAQ;CAAG;CAGlC,KAAK,IAAI,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK;EACzC,IAAI,KAAK,OAAO,KAAK;EAErB,MAAM,SAAS,KAAK,MAAM,GAAG,CAAC;EAC9B,MAAM,OAAO,KAAK,MAAM,IAAI,CAAC;EAC7B,IAAI,OAAO,WAAW,QAAQ,MAAM,KAAK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,MAAM,YAAY,IAAI,IAAI,YAAY,SAAS;CAC/C,IAAI,UAAU,WAAW,IAAI,IAAI,SAAS,CAAC,CAAC,QAAQ,MAAM,IAAI,MAAM,qDAAqD;CAEzH,MAAM,UAAU,YAAY,QAAQ,iBAAiB;CACrD,MAAM,SAAS,WAAW,YAAY,IAAI,CAAC,UAAU,OAAO,CAAC,IAAI;CACjE,MAAM,WAAW,MAAM,MAAM,WAAW;EAAE,QAAQ;EAAO,SAAS,EAAE,eAAe,UAAU,QAAQ;EAAG,UAAU;EAAU;CAAO,CAAC;CACpI,MAAM,aAAa,SAAS,QAAQ,IAAI,UAAU;CAClD,IAAI,SAAS,WAAW,OAAO,CAAC,YAAY,MAAM,IAAI,MAAM,gDAAgD,SAAS,OAAO,EAAE;CAE9H,MAAM,UAAU,IAAI,IAAI,UAAU;CAClC,IAAI,QAAQ,aAAa,YAAY,QAAQ,aAAa,eAAe,QAAQ,aAAa,aAC5F,MAAM,IAAI,MAAM,+BAA+B,QAAQ,QAAQ;CAEjE,MAAM,WAAW,MAAM,MAAM,SAAS;EAAE,QAAQ;EAAO,MAAM,IAAI,WAAW,KAAK;EAAG,UAAU;EAAS;CAAO,CAAC;CAC/G,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,MAAM,sCAAsC,SAAS,QAAQ;AAC3F"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/studio",
3
- "version": "5.5.2",
3
+ "version": "5.5.4",
4
4
  "description": "Kubb Studio client runtime. Connects a Kubb project to Kubb Studio over WebSocket and streams code generation events, shared by the `kubb studio` CLI command and the Docker agent.",
5
5
  "keywords": [
6
6
  "agent",
@@ -62,11 +62,10 @@
62
62
  "registry": "https://registry.npmjs.org/"
63
63
  },
64
64
  "dependencies": {
65
- "@kubb/core": "5.5.2",
65
+ "@kubb/core": "5.5.4",
66
66
  "capnweb": "^0.12.0",
67
67
  "magicast": "^0.5.5",
68
68
  "ofetch": "^1.5.1",
69
- "remeda": "^2.50.0",
70
69
  "tinyexec": "^1.3.1",
71
70
  "tsdown": "^0.23.0",
72
71
  "unstorage": "^1.17.5",
@@ -74,8 +73,8 @@
74
73
  },
75
74
  "devDependencies": {
76
75
  "@internals/utils": "0.0.1",
77
- "@kubb/adapter-oas": "5.5.2",
78
- "@kubb/ast": "5.5.2",
76
+ "@kubb/adapter-oas": "5.5.4",
77
+ "@kubb/ast": "5.5.4",
79
78
  "@types/ws": "^8.18.2"
80
79
  },
81
80
  "engines": {