@sanity/cli 3.86.1 → 3.86.2-experimental.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/lib/_chunks-cjs/generateAction.js +118 -96
- package/lib/_chunks-cjs/generateAction.js.map +1 -1
- package/lib/_chunks-cjs/journeyConfig.js +24 -5
- package/lib/_chunks-cjs/journeyConfig.js.map +1 -1
- package/lib/_chunks-cjs/loadEnv.js +3 -3
- package/lib/_chunks-cjs/loadEnv.js.map +1 -1
- package/lib/_chunks-cjs/workerChannel.js +84 -0
- package/lib/_chunks-cjs/workerChannel.js.map +1 -0
- package/lib/workers/typegenGenerate.d.ts +104 -36
- package/lib/workers/typegenGenerate.js +24 -111
- package/lib/workers/typegenGenerate.js.map +1 -1
- package/package.json +18 -20
- package/src/actions/typegen/generate.telemetry.ts +5 -3
- package/src/actions/typegen/generateAction.ts +165 -130
- package/src/cli.ts +0 -0
- package/src/commands/projects/listProjectsCommand.ts +0 -0
- package/src/commands/projects/projectsGroup.ts +0 -0
- package/src/util/__tests__/workerChannel.test.ts +222 -0
- package/src/util/journeyConfig.ts +3 -2
- package/src/util/workerChannel.ts +312 -0
- package/src/workers/typegenGenerate.ts +55 -193
@@ -0,0 +1,84 @@
|
|
1
|
+
"use strict";
|
2
|
+
class MessageQueue {
|
3
|
+
resolver = null;
|
4
|
+
queue = [];
|
5
|
+
ended = !1;
|
6
|
+
// Flag to indicate if end() was called
|
7
|
+
push(message) {
|
8
|
+
this.ended || (this.resolver ? (this.resolver({ value: message, done: !1 }), this.resolver = null) : this.queue.push(message));
|
9
|
+
}
|
10
|
+
next() {
|
11
|
+
return this.queue.length ? Promise.resolve({ value: this.queue.shift(), done: !1 }) : this.ended ? Promise.resolve({ value: void 0, done: !0 }) : new Promise((resolve) => this.resolver = resolve);
|
12
|
+
}
|
13
|
+
end() {
|
14
|
+
this.resolver ? (this.resolver({ value: void 0, done: !0 }), this.resolver = null) : this.ended = !0;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
function isWorkerChannelMessage(message) {
|
18
|
+
return typeof message != "object" || !message || !("type" in message) || typeof message.type != "string" ? !1 : ["event", "emission", "end"].includes(message.type);
|
19
|
+
}
|
20
|
+
function createReceiver(worker) {
|
21
|
+
const _events = /* @__PURE__ */ new Map(), _streams = /* @__PURE__ */ new Map(), errors = new MessageQueue(), eventQueue = (name) => {
|
22
|
+
const queue = _events.get(name) ?? new MessageQueue();
|
23
|
+
return _events.has(name) || _events.set(name, queue), queue;
|
24
|
+
}, streamQueue = (name) => {
|
25
|
+
const queue = _streams.get(name) ?? new MessageQueue();
|
26
|
+
return _streams.has(name) || _streams.set(name, queue), queue;
|
27
|
+
}, handleMessage = (message) => {
|
28
|
+
isWorkerChannelMessage(message) && (message.type === "event" && eventQueue(message.name).push(message), message.type === "emission" && streamQueue(message.name).push(message), message.type === "end" && streamQueue(message.name).end());
|
29
|
+
}, handleError = (error) => {
|
30
|
+
errors.push({ type: "error", error });
|
31
|
+
};
|
32
|
+
return worker.addListener("message", handleMessage), worker.addListener("error", handleError), {
|
33
|
+
event: new Proxy({}, {
|
34
|
+
get: (target, name) => typeof name != "string" ? target[name] : async () => {
|
35
|
+
const { value } = await Promise.race([eventQueue(name).next(), errors.next()]);
|
36
|
+
if (value.type === "error") throw value.error;
|
37
|
+
return value.payload;
|
38
|
+
}
|
39
|
+
}),
|
40
|
+
stream: new Proxy({}, {
|
41
|
+
get: (target, prop) => {
|
42
|
+
if (typeof prop != "string") return target[prop];
|
43
|
+
const name = prop;
|
44
|
+
async function* streamReceiver() {
|
45
|
+
for (; ; ) {
|
46
|
+
const { value, done } = await Promise.race([streamQueue(name).next(), errors.next()]);
|
47
|
+
if (done) return;
|
48
|
+
if (value.type === "error") throw value.error;
|
49
|
+
yield value.payload;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
return streamReceiver;
|
53
|
+
}
|
54
|
+
}),
|
55
|
+
dispose: () => (worker.removeListener("message", handleMessage), worker.removeListener("error", handleError), worker.terminate())
|
56
|
+
};
|
57
|
+
}
|
58
|
+
function createReporter(parentPort) {
|
59
|
+
if (!parentPort)
|
60
|
+
throw new Error("parentPart was falsy");
|
61
|
+
return {
|
62
|
+
event: new Proxy({}, {
|
63
|
+
get: (target, name) => typeof name != "string" ? target[name] : (payload) => {
|
64
|
+
const message = { type: "event", name, payload };
|
65
|
+
parentPort.postMessage(message);
|
66
|
+
}
|
67
|
+
}),
|
68
|
+
stream: new Proxy({}, {
|
69
|
+
get: (target, name) => typeof name != "string" ? target[name] : {
|
70
|
+
emit: (payload) => {
|
71
|
+
const message = { type: "emission", name, payload };
|
72
|
+
parentPort.postMessage(message);
|
73
|
+
},
|
74
|
+
end: () => {
|
75
|
+
const message = { type: "end", name };
|
76
|
+
parentPort.postMessage(message);
|
77
|
+
}
|
78
|
+
}
|
79
|
+
})
|
80
|
+
};
|
81
|
+
}
|
82
|
+
exports.createReceiver = createReceiver;
|
83
|
+
exports.createReporter = createReporter;
|
84
|
+
//# sourceMappingURL=workerChannel.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"workerChannel.js","sources":["../../src/util/workerChannel.ts"],"sourcesContent":["// NOTE: this file was originally copied from\n// https://github.com/sanity-io/sanity/blob/4c4e03d407106dbda12f52cfd9511fbfe75a9696/packages/sanity/src/_internal/cli/util/workerChannels.ts\nimport {type MessagePort, type Worker} from 'node:worker_threads'\n\ntype StreamReporter<TPayload = unknown> = {emit: (payload: TPayload) => void; end: () => void}\ntype EventReporter<TPayload = unknown> = (payload: TPayload) => void\ntype EventReceiver<TPayload = unknown> = () => Promise<TPayload>\ntype StreamReceiver<TPayload = unknown> = () => AsyncIterable<TPayload>\n\ntype EventKeys<TWorkerChannel extends WorkerChannel> = {\n [K in keyof TWorkerChannel]: TWorkerChannel[K] extends WorkerChannelEvent<any> ? K : never\n}[keyof TWorkerChannel]\ntype StreamKeys<TWorkerChannel extends WorkerChannel> = {\n [K in keyof TWorkerChannel]: TWorkerChannel[K] extends WorkerChannelStream<any> ? K : never\n}[keyof TWorkerChannel]\n\ntype EventMessage<TPayload = unknown> = {type: 'event'; name: string; payload: TPayload}\ntype StreamEmissionMessage<TPayload = unknown> = {type: 'emission'; name: string; payload: TPayload}\ntype StreamEndMessage = {type: 'end'; name: string}\ntype WorkerChannelMessage = EventMessage | StreamEmissionMessage | StreamEndMessage\n\n/**\n * Represents the definition of a \"worker channel\" to report progress from the\n * worker to the parent. Worker channels can define named events or streams and\n * the worker will report events and streams while the parent will await them.\n * This allows the control flow of the parent to follow the control flow of the\n * worker 1-to-1.\n *\n * @example\n *\n * ```ts\n * // Define the channel interface (shared between parent and worker)\n * type MyWorkerChannel = WorkerChannel<{\n * compileStart: WorkerChannelEvent<void>\n * compileProgress: WorkerChannelStream<{ file: string; progress: number }>\n * compileEnd: WorkerChannelEvent<{ duration: number }>\n * }>;\n *\n * // --- In the worker file (e.g., worker.ts) ---\n * import { parentPort } from 'node:worker_threads';\n * import { createReporter } from './workerChannels';\n *\n * const report = createReporter<MyWorkerChannel>(parentPort);\n *\n * async function runCompilation() {\n * report.event.compileStart(); // Signal start\n *\n * const files = ['a.js', 'b.js', 'c.js'];\n * for (const file of files) {\n * // Simulate work and report progress\n * await new Promise(resolve => setTimeout(resolve, 100));\n * report.stream.compileProgress.emit({ file, progress: 100 });\n * }\n * report.stream.compileProgress.end(); // Signal end of progress stream\n *\n * report.event.compileEnd({ duration: 300 }); // Signal end with result\n * }\n *\n * runCompilation();\n *\n * // --- In the parent file (e.g., main.ts) ---\n * import { Worker } from 'node:worker_threads';\n * import { createReceiver } from './workerChannels';\n *\n * const worker = new Worker('./worker.js');\n * const receiver = createReceiver<MyWorkerChannel>(worker);\n *\n * async function monitorCompilation() {\n * console.log('Waiting for compilation to start...');\n * await receiver.event.compileStart();\n * console.log('Compilation started.');\n *\n * console.log('Receiving progress:');\n * for await (const progress of receiver.stream.compileProgress()) {\n * console.log(` - ${progress.file}: ${progress.progress}%`);\n * }\n *\n * console.log('Waiting for compilation to end...');\n * const { duration } = await receiver.event.compileEnd();\n * console.log(`Compilation finished in ${duration}ms.`);\n *\n * await receiver.dispose(); // Clean up listeners and terminate worker\n * }\n *\n * monitorCompilation();\n * ```\n *\n * @internal\n */\nexport type WorkerChannel<\n TWorkerChannel extends Record<\n string,\n WorkerChannelEvent<unknown> | WorkerChannelStream<unknown>\n > = Record<string, WorkerChannelEvent<unknown> | WorkerChannelStream<unknown>>,\n> = TWorkerChannel\n\n/** @internal */\nexport type WorkerChannelEvent<TPayload = void> = {type: 'event'; payload: TPayload}\n/** @internal */\nexport type WorkerChannelStream<TPayload = void> = {type: 'stream'; payload: TPayload}\n\nexport interface WorkerChannelReporter<TWorkerChannel extends WorkerChannel> {\n event: {\n [K in EventKeys<TWorkerChannel>]: TWorkerChannel[K] extends WorkerChannelEvent<infer TPayload>\n ? EventReporter<TPayload>\n : void\n }\n stream: {\n [K in StreamKeys<TWorkerChannel>]: TWorkerChannel[K] extends WorkerChannelStream<infer TPayload>\n ? StreamReporter<TPayload>\n : void\n }\n}\n\nexport interface WorkerChannelReceiver<TWorkerChannel extends WorkerChannel> {\n event: {\n [K in EventKeys<TWorkerChannel>]: TWorkerChannel[K] extends WorkerChannelEvent<infer TPayload>\n ? EventReceiver<TPayload>\n : void\n }\n stream: {\n [K in StreamKeys<TWorkerChannel>]: TWorkerChannel[K] extends WorkerChannelStream<infer TPayload>\n ? StreamReceiver<TPayload>\n : void\n }\n // TODO: good candidate for [Symbol.asyncDispose] when our tooling better supports it\n dispose: () => Promise<number>\n}\n\n/**\n * A simple queue that has two primary methods: `push(message)` and\n * `await next()`. This message queue is used by the \"receiver\" of the worker\n * channel and this class handles buffering incoming messages if the worker is\n * producing faster than the parent as well as returning a promise if there is\n * no message yet in the queue when the parent awaits `next()`.\n */\nclass MessageQueue<T> {\n resolver: ((result: IteratorResult<T>) => void) | null = null\n queue: T[] = []\n private ended = false // Flag to indicate if end() was called\n\n push(message: T) {\n if (this.ended) {\n // Don't push messages after the queue has ended\n return\n }\n if (this.resolver) {\n this.resolver({value: message, done: false})\n this.resolver = null\n } else {\n this.queue.push(message)\n }\n }\n\n next(): Promise<IteratorResult<T>> {\n if (this.queue.length) {\n return Promise.resolve({value: this.queue.shift()!, done: false})\n }\n\n if (this.ended) {\n // If end() was called before and queue is empty, resolve immediately as done\n return Promise.resolve({value: undefined, done: true})\n }\n\n return new Promise((resolve) => (this.resolver = resolve))\n }\n\n end() {\n if (this.resolver) {\n this.resolver({value: undefined, done: true})\n this.resolver = null // Clear resolver after ending\n } else {\n // If resolver is null, it means next() hasn't been called yet or\n // previous next() was resolved by a push(). Mark as ended so the\n // *next* call to next() resolves immediately as done.\n this.ended = true\n }\n }\n}\n\nfunction isWorkerChannelMessage(message: unknown): message is WorkerChannelMessage {\n if (typeof message !== 'object') return false\n if (!message) return false\n if (!('type' in message)) return false\n if (typeof message.type !== 'string') return false\n const types: string[] = ['event', 'emission', 'end'] satisfies WorkerChannelMessage['type'][]\n return types.includes(message.type)\n}\n\n/**\n * Creates a \"worker channel receiver\" that subscribes to incoming messages\n * from the given worker and returns promises for worker channel events and\n * async iterators for worker channel streams.\n */\nexport function createReceiver<TWorkerChannel extends WorkerChannel>(\n worker: Worker,\n): WorkerChannelReceiver<TWorkerChannel> {\n const _events = new Map<string, MessageQueue<EventMessage>>()\n const _streams = new Map<string, MessageQueue<StreamEmissionMessage>>()\n const errors = new MessageQueue<{type: 'error'; error: unknown}>()\n\n const eventQueue = (name: string) => {\n const queue = _events.get(name) ?? new MessageQueue()\n if (!_events.has(name)) _events.set(name, queue)\n return queue\n }\n\n const streamQueue = (name: string) => {\n const queue = _streams.get(name) ?? new MessageQueue()\n if (!_streams.has(name)) _streams.set(name, queue)\n return queue\n }\n\n const handleMessage = (message: unknown) => {\n if (!isWorkerChannelMessage(message)) return\n if (message.type === 'event') eventQueue(message.name).push(message)\n if (message.type === 'emission') streamQueue(message.name).push(message)\n if (message.type === 'end') streamQueue(message.name).end()\n }\n\n const handleError = (error: unknown) => {\n errors.push({type: 'error', error})\n }\n\n worker.addListener('message', handleMessage)\n worker.addListener('error', handleError)\n\n return {\n event: new Proxy({} as WorkerChannelReceiver<TWorkerChannel>['event'], {\n get: (target, name) => {\n if (typeof name !== 'string') return target[name as keyof typeof target]\n\n const eventReceiver: EventReceiver = async () => {\n const {value} = await Promise.race([eventQueue(name).next(), errors.next()])\n if (value.type === 'error') throw value.error\n return value.payload\n }\n\n return eventReceiver\n },\n }),\n stream: new Proxy({} as WorkerChannelReceiver<TWorkerChannel>['stream'], {\n get: (target, prop) => {\n if (typeof prop !== 'string') return target[prop as keyof typeof target]\n const name = prop // alias for better typescript narrowing\n\n async function* streamReceiver() {\n while (true) {\n const {value, done} = await Promise.race([streamQueue(name).next(), errors.next()])\n if (done) return\n if (value.type === 'error') throw value.error\n yield value.payload\n }\n }\n\n return streamReceiver satisfies StreamReceiver\n },\n }),\n dispose: () => {\n worker.removeListener('message', handleMessage)\n worker.removeListener('error', handleError)\n return worker.terminate()\n },\n }\n}\n\n/**\n * Creates a \"worker channel reporter\" that sends messages to the given\n * `parentPort` to be received by a worker channel receiver.\n *\n * @internal\n */\nexport function createReporter<TWorkerChannel extends WorkerChannel>(\n parentPort: MessagePort | null,\n): WorkerChannelReporter<TWorkerChannel> {\n if (!parentPort) {\n throw new Error('parentPart was falsy')\n }\n\n return {\n event: new Proxy({} as WorkerChannelReporter<TWorkerChannel>['event'], {\n get: (target, name) => {\n if (typeof name !== 'string') return target[name as keyof typeof target]\n\n const eventReporter: EventReporter = (payload) => {\n const message: EventMessage = {type: 'event', name, payload}\n parentPort.postMessage(message)\n }\n\n return eventReporter\n },\n }),\n stream: new Proxy({} as WorkerChannelReporter<TWorkerChannel>['stream'], {\n get: (target, name) => {\n if (typeof name !== 'string') return target[name as keyof typeof target]\n\n const streamReporter: StreamReporter = {\n emit: (payload) => {\n const message: StreamEmissionMessage = {type: 'emission', name, payload}\n parentPort.postMessage(message)\n },\n end: () => {\n const message: StreamEndMessage = {type: 'end', name}\n parentPort.postMessage(message)\n },\n }\n\n return streamReporter\n },\n }),\n }\n}\n"],"names":[],"mappings":"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"}
|
@@ -1,43 +1,111 @@
|
|
1
|
+
import {GeneratedQueries} from '@sanity/codegen'
|
2
|
+
import {GeneratedSchema} from '@sanity/codegen'
|
3
|
+
import {GeneratedTypemap} from '@sanity/codegen'
|
4
|
+
|
1
5
|
export declare interface TypegenGenerateTypesWorkerData {
|
2
6
|
workDir: string
|
3
|
-
|
4
|
-
|
7
|
+
schemas: {
|
8
|
+
projectId: string | 'default'
|
9
|
+
dataset: string | 'default'
|
10
|
+
schemaPath: string
|
11
|
+
}[]
|
5
12
|
searchPath: string | string[]
|
6
|
-
overloadClientMethods
|
13
|
+
overloadClientMethods: boolean
|
14
|
+
augmentGroqModule: boolean
|
15
|
+
}
|
16
|
+
|
17
|
+
/** @internal */
|
18
|
+
export declare type TypegenWorkerChannel = WorkerChannel<{
|
19
|
+
schema: WorkerChannelEvent<GeneratedSchema>
|
20
|
+
queries: WorkerChannelStream<GeneratedQueries>
|
21
|
+
typemap: WorkerChannelEvent<GeneratedTypemap>
|
22
|
+
}>
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Represents the definition of a "worker channel" to report progress from the
|
26
|
+
* worker to the parent. Worker channels can define named events or streams and
|
27
|
+
* the worker will report events and streams while the parent will await them.
|
28
|
+
* This allows the control flow of the parent to follow the control flow of the
|
29
|
+
* worker 1-to-1.
|
30
|
+
*
|
31
|
+
* @example
|
32
|
+
*
|
33
|
+
* ```ts
|
34
|
+
* // Define the channel interface (shared between parent and worker)
|
35
|
+
* type MyWorkerChannel = WorkerChannel<{
|
36
|
+
* compileStart: WorkerChannelEvent<void>
|
37
|
+
* compileProgress: WorkerChannelStream<{ file: string; progress: number }>
|
38
|
+
* compileEnd: WorkerChannelEvent<{ duration: number }>
|
39
|
+
* }>;
|
40
|
+
*
|
41
|
+
* // --- In the worker file (e.g., worker.ts) ---
|
42
|
+
* import { parentPort } from 'node:worker_threads';
|
43
|
+
* import { createReporter } from './workerChannels';
|
44
|
+
*
|
45
|
+
* const report = createReporter<MyWorkerChannel>(parentPort);
|
46
|
+
*
|
47
|
+
* async function runCompilation() {
|
48
|
+
* report.event.compileStart(); // Signal start
|
49
|
+
*
|
50
|
+
* const files = ['a.js', 'b.js', 'c.js'];
|
51
|
+
* for (const file of files) {
|
52
|
+
* // Simulate work and report progress
|
53
|
+
* await new Promise(resolve => setTimeout(resolve, 100));
|
54
|
+
* report.stream.compileProgress.emit({ file, progress: 100 });
|
55
|
+
* }
|
56
|
+
* report.stream.compileProgress.end(); // Signal end of progress stream
|
57
|
+
*
|
58
|
+
* report.event.compileEnd({ duration: 300 }); // Signal end with result
|
59
|
+
* }
|
60
|
+
*
|
61
|
+
* runCompilation();
|
62
|
+
*
|
63
|
+
* // --- In the parent file (e.g., main.ts) ---
|
64
|
+
* import { Worker } from 'node:worker_threads';
|
65
|
+
* import { createReceiver } from './workerChannels';
|
66
|
+
*
|
67
|
+
* const worker = new Worker('./worker.js');
|
68
|
+
* const receiver = createReceiver<MyWorkerChannel>(worker);
|
69
|
+
*
|
70
|
+
* async function monitorCompilation() {
|
71
|
+
* console.log('Waiting for compilation to start...');
|
72
|
+
* await receiver.event.compileStart();
|
73
|
+
* console.log('Compilation started.');
|
74
|
+
*
|
75
|
+
* console.log('Receiving progress:');
|
76
|
+
* for await (const progress of receiver.stream.compileProgress()) {
|
77
|
+
* console.log(` - ${progress.file}: ${progress.progress}%`);
|
78
|
+
* }
|
79
|
+
*
|
80
|
+
* console.log('Waiting for compilation to end...');
|
81
|
+
* const { duration } = await receiver.event.compileEnd();
|
82
|
+
* console.log(`Compilation finished in ${duration}ms.`);
|
83
|
+
*
|
84
|
+
* await receiver.dispose(); // Clean up listeners and terminate worker
|
85
|
+
* }
|
86
|
+
*
|
87
|
+
* monitorCompilation();
|
88
|
+
* ```
|
89
|
+
*
|
90
|
+
* @internal
|
91
|
+
*/
|
92
|
+
declare type WorkerChannel<
|
93
|
+
TWorkerChannel extends Record<
|
94
|
+
string,
|
95
|
+
WorkerChannelEvent<unknown> | WorkerChannelStream<unknown>
|
96
|
+
> = Record<string, WorkerChannelEvent<unknown> | WorkerChannelStream<unknown>>,
|
97
|
+
> = TWorkerChannel
|
98
|
+
|
99
|
+
/** @internal */
|
100
|
+
declare type WorkerChannelEvent<TPayload = void> = {
|
101
|
+
type: 'event'
|
102
|
+
payload: TPayload
|
7
103
|
}
|
8
104
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
query?: string
|
15
|
-
filename?: string
|
16
|
-
}
|
17
|
-
| {
|
18
|
-
type: 'types'
|
19
|
-
filename: string
|
20
|
-
types: {
|
21
|
-
queryName: string
|
22
|
-
query: string
|
23
|
-
type: string
|
24
|
-
unknownTypeNodesGenerated: number
|
25
|
-
typeNodesGenerated: number
|
26
|
-
emptyUnionTypeNodesGenerated: number
|
27
|
-
}[]
|
28
|
-
}
|
29
|
-
| {
|
30
|
-
type: 'schema'
|
31
|
-
filename: string
|
32
|
-
schema: string
|
33
|
-
length: number
|
34
|
-
}
|
35
|
-
| {
|
36
|
-
type: 'typemap'
|
37
|
-
typeMap: string
|
38
|
-
}
|
39
|
-
| {
|
40
|
-
type: 'complete'
|
41
|
-
}
|
105
|
+
/** @internal */
|
106
|
+
declare type WorkerChannelStream<TPayload = void> = {
|
107
|
+
type: 'stream'
|
108
|
+
payload: TPayload
|
109
|
+
}
|
42
110
|
|
43
111
|
export {}
|
@@ -1,124 +1,37 @@
|
|
1
1
|
"use strict";
|
2
|
-
var node_worker_threads = require("node:worker_threads"), codegen = require("@sanity/codegen"),
|
2
|
+
var node_worker_threads = require("node:worker_threads"), codegen = require("@sanity/codegen"), debugIt = require("debug"), workerChannel = require("../_chunks-cjs/workerChannel.js");
|
3
3
|
function _interopDefaultCompat(e) {
|
4
4
|
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
5
5
|
}
|
6
|
-
var
|
7
|
-
const $info =
|
8
|
-
createDebug__default.default("sanity:codegen:generate:warn");
|
6
|
+
var debugIt__default = /* @__PURE__ */ _interopDefaultCompat(debugIt);
|
7
|
+
const $info = debugIt__default.default("sanity:codegen:generate:info");
|
9
8
|
if (node_worker_threads.isMainThread || !node_worker_threads.parentPort)
|
10
9
|
throw new Error("This module must be run as a worker thread");
|
11
|
-
const opts = node_worker_threads.workerData;
|
12
|
-
codegen.registerBabel();
|
10
|
+
const report = workerChannel.createReporter(node_worker_threads.parentPort), opts = node_worker_threads.workerData;
|
13
11
|
async function main() {
|
14
|
-
const
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
const queries = codegen.findQueriesInPath({
|
24
|
-
path: opts.searchPath,
|
25
|
-
resolver
|
26
|
-
}), allQueries = [];
|
27
|
-
for await (const result of queries) {
|
28
|
-
if (result.type === "error") {
|
29
|
-
node_worker_threads.parentPort?.postMessage({
|
30
|
-
type: "error",
|
31
|
-
error: result.error,
|
32
|
-
fatal: !1,
|
33
|
-
filename: result.filename
|
34
|
-
});
|
35
|
-
continue;
|
36
|
-
}
|
37
|
-
$info(`Processing ${result.queries.length} queries in "${result.filename}"...`);
|
38
|
-
const fileQueryTypes = [];
|
39
|
-
for (const { name: queryName, result: query } of result.queries)
|
40
|
-
try {
|
41
|
-
const ast = codegen.safeParseQuery(query), queryTypes = groqJs.typeEvaluate(ast, schema), typeName = `${queryName}Result`, type = typeGenerator.generateTypeNodeTypes(typeName, queryTypes), queryTypeStats = walkAndCountQueryTypeNodeStats(queryTypes);
|
42
|
-
fileQueryTypes.push({
|
43
|
-
queryName,
|
44
|
-
query,
|
45
|
-
typeName,
|
46
|
-
typeNode: queryTypes,
|
47
|
-
type: `${type.trim()}
|
48
|
-
`,
|
49
|
-
unknownTypeNodesGenerated: queryTypeStats.unknownTypes,
|
50
|
-
typeNodesGenerated: queryTypeStats.allTypes,
|
51
|
-
emptyUnionTypeNodesGenerated: queryTypeStats.emptyUnions
|
52
|
-
});
|
53
|
-
} catch (err) {
|
54
|
-
node_worker_threads.parentPort?.postMessage({
|
55
|
-
type: "error",
|
56
|
-
error: new Error(
|
57
|
-
`Error generating types for query "${queryName}" in "${result.filename}": ${err.message}`,
|
58
|
-
{ cause: err }
|
59
|
-
),
|
60
|
-
fatal: !1,
|
61
|
-
query
|
62
|
-
});
|
63
|
-
}
|
64
|
-
fileQueryTypes.length > 0 && ($info(`Generated types for ${fileQueryTypes.length} queries in "${result.filename}"
|
65
|
-
`), node_worker_threads.parentPort?.postMessage({
|
66
|
-
type: "types",
|
67
|
-
types: fileQueryTypes,
|
68
|
-
filename: result.filename
|
69
|
-
})), fileQueryTypes.length > 0 && allQueries.push(...fileQueryTypes);
|
70
|
-
}
|
71
|
-
if (opts.overloadClientMethods && allQueries.length > 0) {
|
72
|
-
const typeMap = `${typeGenerator.generateQueryMap(allQueries).trim()}
|
73
|
-
`;
|
74
|
-
node_worker_threads.parentPort?.postMessage({
|
75
|
-
type: "typemap",
|
76
|
-
typeMap
|
12
|
+
const schemas = [];
|
13
|
+
for (const schemaConfig of opts.schemas) {
|
14
|
+
$info(`Reading schema from ${schemaConfig.schemaPath}...`);
|
15
|
+
const schema = await codegen.readSchema(schemaConfig.schemaPath);
|
16
|
+
schemas.push({
|
17
|
+
schema,
|
18
|
+
projectId: schemaConfig.projectId,
|
19
|
+
dataset: schemaConfig.dataset,
|
20
|
+
filename: schemaConfig.schemaPath
|
77
21
|
});
|
78
22
|
}
|
79
|
-
|
80
|
-
|
23
|
+
$info(`Read ${schemas.length} schema definition${schemas.length === 1 ? "" : "s"} successfully.`);
|
24
|
+
const resolver = codegen.getResolver(), result = codegen.generateTypes({
|
25
|
+
schemas,
|
26
|
+
queriesByFile: codegen.findQueriesInPath({ path: opts.searchPath, resolver }),
|
27
|
+
augmentGroqModule: opts.augmentGroqModule,
|
28
|
+
overloadClientMethods: opts.overloadClientMethods
|
81
29
|
});
|
30
|
+
report.event.schema(await result.generatedSchema());
|
31
|
+
for await (const { filename, results } of result.generatedQueries())
|
32
|
+
report.stream.queries.emit({ filename, results });
|
33
|
+
report.stream.queries.end(), report.event.typemap(await result.generatedTypemap());
|
82
34
|
}
|
83
|
-
|
84
|
-
switch (typeNode.type) {
|
85
|
-
case "unknown":
|
86
|
-
return { allTypes: 1, unknownTypes: 1, emptyUnions: 0 };
|
87
|
-
case "array": {
|
88
|
-
const acc = walkAndCountQueryTypeNodeStats(typeNode.of);
|
89
|
-
return acc.allTypes += 1, acc;
|
90
|
-
}
|
91
|
-
case "object": {
|
92
|
-
if (typeNode.rest && typeNode.rest.type === "unknown")
|
93
|
-
return { allTypes: 2, unknownTypes: 1, emptyUnions: 0 };
|
94
|
-
const restStats = typeNode.rest ? walkAndCountQueryTypeNodeStats(typeNode.rest) : { allTypes: 1, unknownTypes: 0, emptyUnions: 0 };
|
95
|
-
return Object.values(typeNode.attributes).reduce((acc, attribute) => {
|
96
|
-
const { allTypes, unknownTypes, emptyUnions } = walkAndCountQueryTypeNodeStats(
|
97
|
-
attribute.value
|
98
|
-
);
|
99
|
-
return {
|
100
|
-
allTypes: acc.allTypes + allTypes,
|
101
|
-
unknownTypes: acc.unknownTypes + unknownTypes,
|
102
|
-
emptyUnions: acc.emptyUnions + emptyUnions
|
103
|
-
};
|
104
|
-
}, restStats);
|
105
|
-
}
|
106
|
-
case "union":
|
107
|
-
return typeNode.of.length === 0 ? { allTypes: 1, unknownTypes: 0, emptyUnions: 1 } : typeNode.of.reduce(
|
108
|
-
(acc, type) => {
|
109
|
-
const { allTypes, unknownTypes, emptyUnions } = walkAndCountQueryTypeNodeStats(type);
|
110
|
-
return {
|
111
|
-
allTypes: acc.allTypes + allTypes,
|
112
|
-
unknownTypes: acc.unknownTypes + unknownTypes,
|
113
|
-
emptyUnions: acc.emptyUnions + emptyUnions
|
114
|
-
};
|
115
|
-
},
|
116
|
-
{ allTypes: 1, unknownTypes: 0, emptyUnions: 0 }
|
117
|
-
// count the union type itself
|
118
|
-
);
|
119
|
-
default:
|
120
|
-
return { allTypes: 1, unknownTypes: 0, emptyUnions: 0 };
|
121
|
-
}
|
122
|
-
}
|
35
|
+
codegen.registerBabel();
|
123
36
|
main();
|
124
37
|
//# sourceMappingURL=typegenGenerate.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"typegenGenerate.js","sources":["../../src/workers/typegenGenerate.ts"],"sourcesContent":["import {isMainThread, parentPort, workerData as _workerData} from 'node:worker_threads'\n\nimport {\n findQueriesInPath,\n
|
1
|
+
{"version":3,"file":"typegenGenerate.js","sources":["../../src/workers/typegenGenerate.ts"],"sourcesContent":["import {isMainThread, parentPort, workerData as _workerData} from 'node:worker_threads'\n\nimport {\n findQueriesInPath,\n type GeneratedQueries,\n type GeneratedSchema,\n type GeneratedTypemap,\n generateTypes,\n getResolver,\n readSchema,\n registerBabel,\n} from '@sanity/codegen'\nimport createDebug from 'debug'\nimport {type SchemaType} from 'groq-js'\n\nimport {\n createReporter,\n type WorkerChannel,\n type WorkerChannelEvent,\n type WorkerChannelStream,\n} from '../util/workerChannel'\n\nconst $info = createDebug('sanity:codegen:generate:info')\n\nexport interface TypegenGenerateTypesWorkerData {\n workDir: string\n schemas: {\n projectId: string | 'default'\n dataset: string | 'default'\n schemaPath: string\n }[]\n searchPath: string | string[]\n overloadClientMethods: boolean\n augmentGroqModule: boolean\n}\n\n/** @internal */\nexport type TypegenWorkerChannel = WorkerChannel<{\n schema: WorkerChannelEvent<GeneratedSchema>\n queries: WorkerChannelStream<GeneratedQueries>\n typemap: WorkerChannelEvent<GeneratedTypemap>\n}>\n\nif (isMainThread || !parentPort) {\n throw new Error('This module must be run as a worker thread')\n}\n\nconst report = createReporter<TypegenWorkerChannel>(parentPort)\nconst opts = _workerData as TypegenGenerateTypesWorkerData\n\nasync function main() {\n const schemas: {\n schema: SchemaType\n projectId: string | 'default'\n dataset: string | 'default'\n filename: string\n }[] = []\n\n for (const schemaConfig of opts.schemas) {\n $info(`Reading schema from ${schemaConfig.schemaPath}...`)\n const schema = await readSchema(schemaConfig.schemaPath)\n schemas.push({\n schema,\n projectId: schemaConfig.projectId,\n dataset: schemaConfig.dataset,\n filename: schemaConfig.schemaPath,\n })\n }\n $info(`Read ${schemas.length} schema definition${schemas.length === 1 ? '' : 's'} successfully.`)\n\n const resolver = getResolver()\n\n const result = generateTypes({\n schemas,\n queriesByFile: findQueriesInPath({path: opts.searchPath, resolver}),\n augmentGroqModule: opts.augmentGroqModule,\n overloadClientMethods: opts.overloadClientMethods,\n })\n\n report.event.schema(await result.generatedSchema())\n\n for await (const {filename, results} of result.generatedQueries()) {\n report.stream.queries.emit({filename, results})\n }\n report.stream.queries.end()\n\n report.event.typemap(await result.generatedTypemap())\n}\n\nregisterBabel()\nmain()\n"],"names":["createDebug","isMainThread","parentPort","createReporter","_workerData","readSchema","getResolver","generateTypes","findQueriesInPath","registerBabel"],"mappings":";;;;;;AAsBA,MAAM,QAAQA,yBAAY,8BAA8B;AAqBxD,IAAIC,oBAAAA,gBAAgB,CAACC,oBAAA;AACb,QAAA,IAAI,MAAM,4CAA4C;AAG9D,MAAM,SAASC,cAAA,eAAqCD,8BAAU,GACxD,OAAOE,oBAAA;AAEb,eAAe,OAAO;AACpB,QAAM,UAKA,CAAC;AAEI,aAAA,gBAAgB,KAAK,SAAS;AACjC,UAAA,uBAAuB,aAAa,UAAU,KAAK;AACzD,UAAM,SAAS,MAAMC,mBAAW,aAAa,UAAU;AACvD,YAAQ,KAAK;AAAA,MACX;AAAA,MACA,WAAW,aAAa;AAAA,MACxB,SAAS,aAAa;AAAA,MACtB,UAAU,aAAa;AAAA,IAAA,CACxB;AAAA,EAAA;AAEG,QAAA,QAAQ,QAAQ,MAAM,qBAAqB,QAAQ,WAAW,IAAI,KAAK,GAAG,gBAAgB;AAEhG,QAAM,WAAWC,QAAAA,eAEX,SAASC,QAAAA,cAAc;AAAA,IAC3B;AAAA,IACA,eAAeC,QAAkB,kBAAA,EAAC,MAAM,KAAK,YAAY,UAAS;AAAA,IAClE,mBAAmB,KAAK;AAAA,IACxB,uBAAuB,KAAK;AAAA,EAAA,CAC7B;AAED,SAAO,MAAM,OAAO,MAAM,OAAO,iBAAiB;AAElD,mBAAiB,EAAC,UAAU,QAAO,KAAK,OAAO,iBAAiB;AAC9D,WAAO,OAAO,QAAQ,KAAK,EAAC,UAAU,SAAQ;AAEzC,SAAA,OAAO,QAAQ,OAEtB,OAAO,MAAM,QAAQ,MAAM,OAAO,kBAAkB;AACtD;AAEAC,QAAAA,cAAc;AACd,KAAK;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sanity/cli",
|
3
|
-
"version": "3.86.
|
3
|
+
"version": "3.86.2-experimental.0",
|
4
4
|
"description": "Sanity CLI tool for managing Sanity installations, managing plugins, schemas and datasets",
|
5
5
|
"keywords": [
|
6
6
|
"sanity",
|
@@ -46,24 +46,13 @@
|
|
46
46
|
"src",
|
47
47
|
"templates"
|
48
48
|
],
|
49
|
-
"scripts": {
|
50
|
-
"build": "pkg-utils build --strict --check --clean",
|
51
|
-
"check:types": "tsc --project tsconfig.lib.json",
|
52
|
-
"clean": "rimraf lib",
|
53
|
-
"lint": "eslint --cache .",
|
54
|
-
"prepublishOnly": "turbo run build",
|
55
|
-
"test": "vitest",
|
56
|
-
"ts": "node -r esbuild-register",
|
57
|
-
"watch": "pkg-utils watch"
|
58
|
-
},
|
59
49
|
"dependencies": {
|
60
50
|
"@babel/traverse": "^7.23.5",
|
61
51
|
"@sanity/client": "^6.29.0",
|
62
|
-
"@sanity/codegen": "3.86.1",
|
63
52
|
"@sanity/runtime-cli": "^3.0.0",
|
64
53
|
"@sanity/telemetry": "^0.8.0",
|
65
54
|
"@sanity/template-validator": "^2.4.3",
|
66
|
-
"@sanity/util": "
|
55
|
+
"@sanity/util": "",
|
67
56
|
"chalk": "^4.1.2",
|
68
57
|
"debug": "^4.3.4",
|
69
58
|
"decompress": "^4.2.0",
|
@@ -74,16 +63,14 @@
|
|
74
63
|
"pkg-dir": "^5.0.0",
|
75
64
|
"prettier": "^3.3.0",
|
76
65
|
"semver": "^7.3.5",
|
77
|
-
"validate-npm-package-name": "^3.0.0"
|
66
|
+
"validate-npm-package-name": "^3.0.0",
|
67
|
+
"@sanity/codegen": "3.86.2-experimental.0"
|
78
68
|
},
|
79
69
|
"devDependencies": {
|
80
|
-
"@repo/package.config": "0.0.0",
|
81
|
-
"@repo/test-config": "0.0.0",
|
82
70
|
"@rexxars/gitconfiglocal": "^3.0.1",
|
83
71
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
84
72
|
"@sanity/eslint-config-studio": "^4.0.0",
|
85
73
|
"@sanity/generate-help-url": "^3.0.0",
|
86
|
-
"@sanity/types": "3.86.1",
|
87
74
|
"@types/babel__traverse": "^7.20.5",
|
88
75
|
"@types/configstore": "^5.0.1",
|
89
76
|
"@types/cpx": "^1.5.2",
|
@@ -130,10 +117,21 @@
|
|
130
117
|
"vite": "^6.2.4",
|
131
118
|
"vitest": "^3.1.1",
|
132
119
|
"which": "^2.0.2",
|
133
|
-
"xdg-basedir": "^4.0.0"
|
120
|
+
"xdg-basedir": "^4.0.0",
|
121
|
+
"@repo/package.config": "0.0.0",
|
122
|
+
"@sanity/types": "3.86.1",
|
123
|
+
"@repo/test-config": "0.0.0"
|
134
124
|
},
|
135
125
|
"engines": {
|
136
126
|
"node": ">=18"
|
137
127
|
},
|
138
|
-
"
|
139
|
-
|
128
|
+
"scripts": {
|
129
|
+
"build": "pkg-utils build --strict --check --clean",
|
130
|
+
"check:types": "tsc --project tsconfig.lib.json",
|
131
|
+
"clean": "rimraf lib",
|
132
|
+
"lint": "eslint --cache .",
|
133
|
+
"test": "vitest",
|
134
|
+
"ts": "node -r esbuild-register",
|
135
|
+
"watch": "pkg-utils watch"
|
136
|
+
}
|
137
|
+
}
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import {defineTrace} from '@sanity/telemetry'
|
2
2
|
|
3
|
-
interface
|
3
|
+
interface TypesGeneratedTraceAttributes {
|
4
4
|
outputSize: number
|
5
5
|
queriesCount: number
|
6
|
+
projectionsCount: number
|
6
7
|
schemaTypesCount: number
|
7
8
|
queryFilesCount: number
|
8
9
|
filesWithErrors: number
|
@@ -11,10 +12,11 @@ interface TypesGeneratedTraceAttrubutes {
|
|
11
12
|
unknownTypeNodesRatio: number
|
12
13
|
emptyUnionTypeNodesGenerated: number
|
13
14
|
configOverloadClientMethods: boolean
|
15
|
+
configAugmentGroqModule: boolean
|
14
16
|
}
|
15
17
|
|
16
|
-
export const TypesGeneratedTrace = defineTrace<
|
18
|
+
export const TypesGeneratedTrace = defineTrace<TypesGeneratedTraceAttributes>({
|
17
19
|
name: 'Types Generated',
|
18
|
-
version:
|
20
|
+
version: 1,
|
19
21
|
description: 'Trace emitted when generating TypeScript types for queries',
|
20
22
|
})
|