@sanity/cli-core 0.1.0-alpha.10 → 0.1.0-alpha.12

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.
@@ -1,3 +1,4 @@
1
+ import { pathToFileURL } from 'node:url';
1
2
  import { getTsconfig } from 'get-tsconfig';
2
3
  import { tsImport } from 'tsx/esm/api';
3
4
  import { debug } from '../../debug.js';
@@ -47,7 +48,7 @@ import { cliConfigSchema } from './schemas.js';
47
48
  // main thread with tsx registered.
48
49
  const tsconfig = getTsconfig(rootPath);
49
50
  // Ensure we get the default export (sometimes we get a bit of a mixed bag)
50
- cliConfig = await tsImport(configPath, {
51
+ cliConfig = await tsImport(pathToFileURL(configPath).href, {
51
52
  parentURL: import.meta.url,
52
53
  tsconfig: tsconfig?.path ?? undefined
53
54
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/cli/getCliConfig.ts"],"sourcesContent":["import {getTsconfig} from 'get-tsconfig'\nimport {tsImport} from 'tsx/esm/api'\n\nimport {debug} from '../../debug.js'\nimport {tsxWorkerTask} from '../../loaders/tsx/tsxWorkerTask.js'\nimport {NotFoundError} from '../../util/NotFoundError.js'\nimport {tryGetDefaultExport} from '../../util/tryGetDefaultExport.js'\nimport {findPathForFiles} from '../util/findConfigsPaths.js'\nimport {cliConfigSchema} from './schemas.js'\nimport {type CliConfig} from './types/cliConfig.js'\n\n/**\n * Get the CLI config for a project, given the root path.\n *\n * We really want to avoid loading the CLI config in the main thread, as we'll need\n * TypeScript loading logic, potentially with ts path aliases, syntax extensions and all\n * sorts of nonsense. Thus, we _attempt_ to use a worker thread - but have to fall back\n * to using the main thread if not possible. This can be the case if the configuration\n * contains non-serializable properties, such as functions. This is unfortunately used\n * by the vite config, for example.\n *\n * @param rootPath - Root path for the project, eg where `sanity.cli.(ts|js)` is located.\n * @returns The CLI config\n * @internal\n */\nexport async function getCliConfig(rootPath: string): Promise<CliConfig> {\n const paths = await findPathForFiles(rootPath, ['sanity.cli.ts', 'sanity.cli.js'])\n const configPaths = paths.filter((path) => path.exists)\n\n if (configPaths.length === 0) {\n throw new NotFoundError(`No CLI config found at ${rootPath}/sanity.cli.(ts|js)`)\n }\n\n if (configPaths.length > 1) {\n throw new Error(\n `Multiple CLI config files found (${configPaths.map((path) => path.path).join(', ')})`,\n )\n }\n\n const configPath = configPaths[0].path\n\n let cliConfig: CliConfig | undefined\n try {\n cliConfig = await tsxWorkerTask<CliConfig | undefined>(\n new URL('getCliConfig.worker.js', import.meta.url),\n {\n name: 'cliConfig',\n rootPath,\n workerData: {configPath},\n },\n )\n } catch (err) {\n debug('Failed to load CLI config in worker thread: %s', err)\n\n // Assuming that didn't work because of unseriazable properties, so we'll try the\n // main thread with tsx registered.\n const tsconfig = getTsconfig(rootPath)\n\n // Ensure we get the default export (sometimes we get a bit of a mixed bag)\n cliConfig = await tsImport(configPath, {\n parentURL: import.meta.url,\n tsconfig: tsconfig?.path ?? undefined,\n })\n cliConfig = tryGetDefaultExport(cliConfig) as CliConfig | undefined\n\n if (!cliConfig) {\n throw new Error('Invalid CLI config structure')\n }\n }\n\n const {data, error, success} = cliConfigSchema.safeParse(cliConfig)\n if (!success) {\n throw new Error(`Invalid CLI config: ${error.message}`)\n }\n\n // There is a minor difference here because of the `vite` property and how the types\n // aren't as specific as our manually typed `CliConfig` type, thus the cast.\n return data as CliConfig\n}\n"],"names":["getTsconfig","tsImport","debug","tsxWorkerTask","NotFoundError","tryGetDefaultExport","findPathForFiles","cliConfigSchema","getCliConfig","rootPath","paths","configPaths","filter","path","exists","length","Error","map","join","configPath","cliConfig","URL","url","name","workerData","err","tsconfig","parentURL","undefined","data","error","success","safeParse","message"],"mappings":"AAAA,SAAQA,WAAW,QAAO,eAAc;AACxC,SAAQC,QAAQ,QAAO,cAAa;AAEpC,SAAQC,KAAK,QAAO,iBAAgB;AACpC,SAAQC,aAAa,QAAO,qCAAoC;AAChE,SAAQC,aAAa,QAAO,8BAA6B;AACzD,SAAQC,m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AAMG,OAAO,EAAE;IACxD;IAEA,oFAAoF;IACpF,4EAA4E;IAC5E,OAAOJ;AACT"}
1
+ {"version":3,"sources":["../../../src/config/cli/getCliConfig.ts"],"sourcesContent":["import {pathToFileURL} from 'node:url'\n\nimport {getTsconfig} from 'get-tsconfig'\nimport {tsImport} from 'tsx/esm/api'\n\nimport {debug} from '../../debug.js'\nimport {tsxWorkerTask} from '../../loaders/tsx/tsxWorkerTask.js'\nimport {NotFoundError} from '../../util/NotFoundError.js'\nimport {tryGetDefaultExport} from '../../util/tryGetDefaultExport.js'\nimport {findPathForFiles} from '../util/findConfigsPaths.js'\nimport {cliConfigSchema} from './schemas.js'\nimport {type CliConfig} from './types/cliConfig.js'\n\n/**\n * Get the CLI config for a project, given the root path.\n *\n * We really want to avoid loading the CLI config in the main thread, as we'll need\n * TypeScript loading logic, potentially with ts path aliases, syntax extensions and all\n * sorts of nonsense. Thus, we _attempt_ to use a worker thread - but have to fall back\n * to using the main thread if not possible. This can be the case if the configuration\n * contains non-serializable properties, such as functions. This is unfortunately used\n * by the vite config, for example.\n *\n * @param rootPath - Root path for the project, eg where `sanity.cli.(ts|js)` is located.\n * @returns The CLI config\n * @internal\n */\nexport async function getCliConfig(rootPath: string): Promise<CliConfig> {\n const paths = await findPathForFiles(rootPath, ['sanity.cli.ts', 'sanity.cli.js'])\n const configPaths = paths.filter((path) => path.exists)\n\n if (configPaths.length === 0) {\n throw new NotFoundError(`No CLI config found at ${rootPath}/sanity.cli.(ts|js)`)\n }\n\n if (configPaths.length > 1) {\n throw new Error(\n `Multiple CLI config files found (${configPaths.map((path) => path.path).join(', ')})`,\n )\n }\n\n const configPath = configPaths[0].path\n\n let cliConfig: CliConfig | undefined\n try {\n cliConfig = await tsxWorkerTask<CliConfig | undefined>(\n new URL('getCliConfig.worker.js', import.meta.url),\n {\n name: 'cliConfig',\n rootPath,\n workerData: {configPath},\n },\n )\n } catch (err) {\n debug('Failed to load CLI config in worker thread: %s', err)\n\n // Assuming that didn't work because of unseriazable properties, so we'll try the\n // main thread with tsx registered.\n const tsconfig = getTsconfig(rootPath)\n\n // Ensure we get the default export (sometimes we get a bit of a mixed bag)\n cliConfig = await tsImport(pathToFileURL(configPath).href, {\n parentURL: import.meta.url,\n tsconfig: tsconfig?.path ?? undefined,\n })\n cliConfig = tryGetDefaultExport(cliConfig) as CliConfig | undefined\n\n if (!cliConfig) {\n throw new Error('Invalid CLI config structure')\n }\n }\n\n const {data, error, success} = cliConfigSchema.safeParse(cliConfig)\n if (!success) {\n throw new Error(`Invalid CLI config: ${error.message}`)\n }\n\n // There is a minor difference here because of the `vite` property and how the types\n // aren't as specific as our manually typed `CliConfig` type, thus the cast.\n return data as CliConfig\n}\n"],"names":["pathToFileURL","getTsconfig","tsImport","debug","tsxWorkerTask","NotFoundError","tryGetDefaultExport","findPathForFiles","cliConfigSchema","getCliConfig","rootPath","paths","configPaths","filter","path","exists","length","Error","map","join","configPath","cliConfig","URL","url","name","workerData","err","tsconfig","href","parentURL","undefined","data","error","success","safeParse","message"],"mappings":"AAAA,SAAQA,aAAa,QAAO,WAAU;AAEtC,SAAQC,WAAW,QAAO,eAAc;AACxC,SAAQC,QAAQ,QAAO,cAAa;AAEpC,SAAQC,KAAK,QAAO,iBAAgB;AACpC,SAAQC,aAAa,QAAO,qCAAoC;AAChE,SAAQC,aAAa,QAAO,8BAA6B;AACzD,SAAQC,mBAAmB,QAAO,oCAAmC;AACrE,SAAQC,gBAAgB,QAAO,8BAA6B;AAC5D,SAAQC,eAAe,QAAO,eAAc;AAG5C;;;;;;;;;;;;;CAaC,GACD,OAAO,eAAeC,aAAaC,QAAgB;IACjD,MAAMC,QAAQ,MAAMJ,iBAAiBG,UAAU;QAAC;QAAiB;KAAgB;IACjF,MAAME,cAAcD,MAAME,MAAM,CAAC,CAACC,OAASA,KAAKC,MAAM;IAEtD,IAAIH,YAAYI,MAAM,KAAK,GAAG;QAC5B,MAAM,IAAIX,cAAc,CAAC,uBAAuB,EAAEK,SAAS,mBAAmB,CAAC;IACjF;IAEA,IAAIE,YAAYI,MAAM,GAAG,GAAG;QAC1B,MAAM,IAAIC,MACR,CAAC,iCAAiC,EAAEL,YAAYM,GAAG,CAAC,CAACJ,OAASA,KAAKA,IAAI,EAAEK,IAAI,CAAC,MAAM,CAAC,CAAC;IAE1F;IAEA,MAAMC,aAAaR,WAAW,CAAC,EAAE,CAACE,IAAI;IAEtC,IAAIO;IACJ,IAAI;QACFA,YAAY,MAAMjB,cAChB,IAAIkB,IAAI,0BAA0B,YAAYC,GAAG,GACjD;YACEC,MAAM;YACNd;YACAe,YAAY;gBAACL;YAAU;QACzB;IAEJ,EAAE,OAAOM,KAAK;QACZvB,MAAM,kDAAkDuB;QAExD,iFAAiF;QACjF,mCAAmC;QACnC,MAAMC,WAAW1B,YAAYS;QAE7B,2EAA2E;QAC3EW,YAAY,MAAMnB,SAASF,cAAcoB,YAAYQ,IAAI,EAAE;YACzDC,WAAW,YAAYN,GAAG;YAC1BI,UAAUA,UAAUb,QAAQgB;QAC9B;QACAT,YAAYf,oBAAoBe;QAEhC,IAAI,CAACA,WAAW;YACd,MAAM,IAAIJ,MAAM;QAClB;IACF;IAEA,MAAM,EAACc,IAAI,EAAEC,KAAK,EAAEC,OAAO,EAAC,GAAGzB,gBAAgB0B,SAAS,CAACb;IACzD,IAAI,CAACY,SAAS;QACZ,MAAM,IAAIhB,MAAM,CAAC,oBAAoB,EAAEe,MAAMG,OAAO,EAAE;IACxD;IAEA,oFAAoF;IACpF,4EAA4E;IAC5E,OAAOJ;AACT"}
@@ -1,5 +1,6 @@
1
1
  import { stat } from 'node:fs/promises';
2
2
  import { dirname } from 'node:path';
3
+ import { isMainThread } from 'node:worker_threads';
3
4
  import { firstValueFrom, of } from 'rxjs';
4
5
  import { doImport } from '../../util/doImport.js';
5
6
  import { getEmptyAuth } from '../../util/getEmptyAuth.js';
@@ -9,10 +10,15 @@ import { isStudioConfig } from './isStudioConfig.js';
9
10
  /**
10
11
  * Resolves the workspaces from the studio config.
11
12
  *
12
- * @param options - The options for the function
13
+ * NOTE: This function should only be called from a worker thread.
14
+ *
15
+ * @param configPath - The path to the studio config
13
16
  * @returns The workspaces
14
17
  * @internal
15
18
  */ export async function getStudioWorkspaces(configPath) {
19
+ if (isMainThread) {
20
+ throw new Error('getStudioWorkspaces should only be called from a worker thread');
21
+ }
16
22
  const isDirectory = (await stat(configPath)).isDirectory();
17
23
  if (isDirectory) {
18
24
  configPath = await findStudioConfigPath(configPath);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/studio/getStudioWorkspaces.ts"],"sourcesContent":["import {stat} from 'node:fs/promises'\nimport {dirname} from 'node:path'\n\nimport {firstValueFrom, of} from 'rxjs'\nimport {type Workspace} from 'sanity'\n\nimport {doImport} from '../../util/doImport.js'\nimport {getEmptyAuth} from '../../util/getEmptyAuth.js'\nimport {resolveLocalPackage} from '../../util/resolveLocalPackage.js'\nimport {findStudioConfigPath} from '../util/findStudioConfigPath.js'\nimport {isStudioConfig} from './isStudioConfig.js'\n\n/**\n * Resolves the workspaces from the studio config.\n *\n * @param options - The options for the function\n * @returns The workspaces\n * @internal\n */\nexport async function getStudioWorkspaces(configPath: string): Promise<Workspace[]> {\n const isDirectory = (await stat(configPath)).isDirectory()\n if (isDirectory) {\n configPath = await findStudioConfigPath(configPath)\n }\n let config = await doImport(configPath)\n if (!isStudioConfig(config)) {\n if (!('default' in config) || !isStudioConfig(config.default)) {\n throw new TypeError(`Invalid studio config format in \"${configPath}\"`)\n }\n\n config = config.default\n }\n\n const workDir = dirname(configPath)\n const {resolveConfig} = await resolveLocalPackage<typeof import('sanity')>('sanity', workDir)\n if (typeof resolveConfig !== 'function') {\n throw new TypeError('Expected `resolveConfig` from `sanity` to be a function')\n }\n\n // We will also want to stub out some configuration - we don't need to resolve the\n // users' logged in state, for instance - so let's disable the auth implementation.\n const rawWorkspaces = Array.isArray(config)\n ? config\n : [{...config, basePath: config.basePath || '/', name: config.name || 'default'}]\n\n const unauthedWorkspaces = rawWorkspaces.map((workspace) => ({\n ...workspace,\n auth: {state: of(getEmptyAuth())},\n }))\n\n return firstValueFrom(resolveConfig(unauthedWorkspaces))\n}\n"],"names":["stat","dirname","firstValueFrom","of","doImport","getEmptyAuth","resolveLocalPackage","findStudioConfigPath","isStudioConfig","getStudioWorkspaces","configPath","isDirectory","config","default","TypeError","workDir","resolveConfig","rawWorkspaces","Array","isArray","basePath","name","unauthedWorkspaces","map","workspace","auth","state"],"mappings":"AAAA,SAAQA,IAAI,QAAO,mBAAkB;AACrC,SAAQC,OAAO,QAAO,YAAW;AAEjC,SAAQC,cAAc,EAAEC,EAAE,QAAO,OAAM;AAGvC,SAAQC,QAAQ,QAAO,yBAAwB;AAC/C,SAAQC,YAAY,QAAO,6BAA4B;AACvD,SAAQC,mBAAmB,QAAO,oCAAmC;AACrE,SAAQC,oBAAoB,QAAO,kCAAiC;AACpE,SAAQC,cAAc,QAAO,sBAAqB;AAElD;;;;;;CAMC,GACD,OAAO,eAAeC,oBAAoBC,UAAkB;IAC1D,MAAMC,cAAc,AAAC,CAAA,MAAMX,KAAKU,WAAU,EAAGC,WAAW;IACxD,IAAIA,aAAa;QACfD,aAAa,MAAMH,qBAAqBG;IAC1C;IACA,IAAIE,SAAS,MAAMR,SAASM;IAC5B,IAAI,CAACF,eAAeI,SAAS;QAC3B,IAAI,CAAE,CAAA,aAAaA,MAAK,KAAM,CAACJ,eAAeI,OAAOC,OAAO,GAAG;YAC7D,MAAM,IAAIC,UAAU,CAAC,iCAAiC,EAAEJ,WAAW,CAAC,CAAC;QACvE;QAEAE,SAASA,OAAOC,OAAO;IACzB;IAEA,MAAME,UAAUd,QAAQS;IACxB,MAAM,EAACM,aAAa,EAAC,GAAG,MAAMV,oBAA6C,UAAUS;IACrF,IAAI,OAAOC,kBAAkB,YAAY;QACvC,MAAM,IAAIF,UAAU;IACtB;IAEA,kFAAkF;IAClF,mFAAmF;IACnF,MAAMG,gBAAgBC,MAAMC,OAAO,CAACP,UAChCA,SACA;QAAC;YAAC,GAAGA,MAAM;YAAEQ,UAAUR,OAAOQ,QAAQ,IAAI;YAAKC,MAAMT,OAAOS,IAAI,IAAI;QAAS;KAAE;IAEnF,MAAMC,qBAAqBL,cAAcM,GAAG,CAAC,CAACC,YAAe,CAAA;YAC3D,GAAGA,SAAS;YACZC,MAAM;gBAACC,OAAOvB,GAAGE;YAAe;QAClC,CAAA;IAEA,OAAOH,eAAec,cAAcM;AACtC"}
1
+ {"version":3,"sources":["../../../src/config/studio/getStudioWorkspaces.ts"],"sourcesContent":["import {stat} from 'node:fs/promises'\nimport {dirname} from 'node:path'\nimport {isMainThread} from 'node:worker_threads'\n\nimport {firstValueFrom, of} from 'rxjs'\nimport {type Workspace} from 'sanity'\n\nimport {doImport} from '../../util/doImport.js'\nimport {getEmptyAuth} from '../../util/getEmptyAuth.js'\nimport {resolveLocalPackage} from '../../util/resolveLocalPackage.js'\nimport {findStudioConfigPath} from '../util/findStudioConfigPath.js'\nimport {isStudioConfig} from './isStudioConfig.js'\n\n/**\n * Resolves the workspaces from the studio config.\n *\n * NOTE: This function should only be called from a worker thread.\n *\n * @param configPath - The path to the studio config\n * @returns The workspaces\n * @internal\n */\nexport async function getStudioWorkspaces(configPath: string): Promise<Workspace[]> {\n if (isMainThread) {\n throw new Error('getStudioWorkspaces should only be called from a worker thread')\n }\n const isDirectory = (await stat(configPath)).isDirectory()\n if (isDirectory) {\n configPath = await findStudioConfigPath(configPath)\n }\n let config = await doImport(configPath)\n if (!isStudioConfig(config)) {\n if (!('default' in config) || !isStudioConfig(config.default)) {\n throw new TypeError(`Invalid studio config format in \"${configPath}\"`)\n }\n\n config = config.default\n }\n\n const workDir = dirname(configPath)\n const {resolveConfig} = await resolveLocalPackage<typeof import('sanity')>('sanity', workDir)\n if (typeof resolveConfig !== 'function') {\n throw new TypeError('Expected `resolveConfig` from `sanity` to be a function')\n }\n\n // We will also want to stub out some configuration - we don't need to resolve the\n // users' logged in state, for instance - so let's disable the auth implementation.\n const rawWorkspaces = Array.isArray(config)\n ? config\n : [{...config, basePath: config.basePath || '/', name: config.name || 'default'}]\n\n const unauthedWorkspaces = rawWorkspaces.map((workspace) => ({\n ...workspace,\n auth: {state: of(getEmptyAuth())},\n }))\n\n return firstValueFrom(resolveConfig(unauthedWorkspaces))\n}\n"],"names":["stat","dirname","isMainThread","firstValueFrom","of","doImport","getEmptyAuth","resolveLocalPackage","findStudioConfigPath","isStudioConfig","getStudioWorkspaces","configPath","Error","isDirectory","config","default","TypeError","workDir","resolveConfig","rawWorkspaces","Array","isArray","basePath","name","unauthedWorkspaces","map","workspace","auth","state"],"mappings":"AAAA,SAAQA,IAAI,QAAO,mBAAkB;AACrC,SAAQC,OAAO,QAAO,YAAW;AACjC,SAAQC,YAAY,QAAO,sBAAqB;AAEhD,SAAQC,cAAc,EAAEC,EAAE,QAAO,OAAM;AAGvC,SAAQC,QAAQ,QAAO,yBAAwB;AAC/C,SAAQC,YAAY,QAAO,6BAA4B;AACvD,SAAQC,mBAAmB,QAAO,oCAAmC;AACrE,SAAQC,oBAAoB,QAAO,kCAAiC;AACpE,SAAQC,cAAc,QAAO,sBAAqB;AAElD;;;;;;;;CAQC,GACD,OAAO,eAAeC,oBAAoBC,UAAkB;IAC1D,IAAIT,cAAc;QAChB,MAAM,IAAIU,MAAM;IAClB;IACA,MAAMC,cAAc,AAAC,CAAA,MAAMb,KAAKW,WAAU,EAAGE,WAAW;IACxD,IAAIA,aAAa;QACfF,aAAa,MAAMH,qBAAqBG;IAC1C;IACA,IAAIG,SAAS,MAAMT,SAASM;IAC5B,IAAI,CAACF,eAAeK,SAAS;QAC3B,IAAI,CAAE,CAAA,aAAaA,MAAK,KAAM,CAACL,eAAeK,OAAOC,OAAO,GAAG;YAC7D,MAAM,IAAIC,UAAU,CAAC,iCAAiC,EAAEL,WAAW,CAAC,CAAC;QACvE;QAEAG,SAASA,OAAOC,OAAO;IACzB;IAEA,MAAME,UAAUhB,QAAQU;IACxB,MAAM,EAACO,a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