openpencil/packages/cli/src/app-target.ts
Danila Poyarkov 7f91594d0c refactor: standardize acronym casing
- Rename first-party API, RPC, JSON, CORS, SVG, JSX, and related identifiers to preserve acronym casing
- Keep upstream and serialized boundary names unchanged
- Add a lint guardrail and migration notes for exported APIs
2026-08-10 15:48:16 +03:00

28 lines
666 B
TypeScript

export type AppTargetCLIArgs = {
'document-id'?: string
'page-id'?: string
}
export const appTargetOptions = {
'document-id': {
type: 'string',
description: 'Target OpenPencil document/tab ID when connected to the running app',
required: false
},
'page-id': {
type: 'string',
description: 'Target page ID when connected to the running app',
required: false
}
} as const
export function appTargetRPCArgs(args: AppTargetCLIArgs): {
document_id?: string
page_id?: string
} {
return {
...(args['document-id'] ? { document_id: args['document-id'] } : {}),
...(args['page-id'] ? { page_id: args['page-id'] } : {})
}
}