@sanity/cli-core 3.8.0 → 3.8.1

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.
@@ -2,9 +2,6 @@ import { createRequire } from 'node:module';
2
2
  import { dirname } from 'node:path';
3
3
  import { fileURLToPath, pathToFileURL } from 'node:url';
4
4
  import { ESModulesEvaluator, ssrModuleExportsKey } from 'vite/module-runner';
5
- function isCommonJsCode(code) {
6
- return /\bmodule\.exports\b/.test(code) || /\bexports\.[a-zA-Z_$]/.test(code) || /(?:^|[;\n])\s*exports\s=/.test(code) || /(?:^|\n|\s)require\s*\(/.test(code);
7
- }
8
5
  function isPrimitive(value) {
9
6
  return !value || typeof value !== 'object' && typeof value !== 'function';
10
7
  }
@@ -41,9 +38,6 @@ function exportAll(exports, sourceModule) {
41
38
  return this.esmEvaluator.runExternalModule(filepath);
42
39
  }
43
40
  runInlinedModule(context, code, module) {
44
- if (!isCommonJsCode(code)) {
45
- return this.esmEvaluator.runInlinedModule(context, code, module);
46
- }
47
41
  return this.runCommonJsModule(context, code, module);
48
42
  }
49
43
  async runCommonJsModule(context, code, module) {
@@ -61,7 +55,9 @@ function exportAll(exports, sourceModule) {
61
55
  },
62
56
  getPrototypeOf: ()=>Object.prototype,
63
57
  set: (_, property, value)=>{
64
- if (property === 'default') {
58
+ // Keep the module default when CommonJS aliases it back to `module.exports`.
59
+ if (property === 'default' && cjsExports !== value) {
60
+ exportAll(exports, value);
65
61
  exports.default = value;
66
62
  return true;
67
63
  }
@@ -72,7 +68,7 @@ function exportAll(exports, sourceModule) {
72
68
  defineExport(exports, String(property), ()=>{});
73
69
  return true;
74
70
  }
75
- if (!isPrimitive(exports.default) && typeof exports.default === 'object') {
71
+ if (!isPrimitive(exports.default)) {
76
72
  ;
77
73
  exports.default[String(property)] = value;
78
74
  }
@@ -104,11 +100,9 @@ function exportAll(exports, sourceModule) {
104
100
  if (normalizedCode[0] === '#') {
105
101
  normalizedCode = normalizedCode.replace(/^#!.*/, (line)=>' '.repeat(line.length));
106
102
  }
107
- // Use AsyncFunction (same as ESModulesEvaluator) so the shared `startOffset`
108
- // ModuleRunner applies to inlined sourcemaps matches this wrapper's padding.
109
103
  const AsyncFunction = (async function() {}).constructor;
110
104
  const parameterNames = Object.keys(cjsContext);
111
- const runner = new AsyncFunction(...parameterNames, `"use strict";\n${normalizedCode}`);
105
+ const runner = new AsyncFunction(...parameterNames, `"use strict";{\n${normalizedCode}\n}`);
112
106
  await runner(...parameterNames.map((name)=>cjsContext[name]));
113
107
  }
114
108
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/loaders/studio/studioModuleEvaluator.ts"],"sourcesContent":["import {createRequire} from 'node:module'\nimport {dirname} from 'node:path'\nimport {fileURLToPath, pathToFileURL} from 'node:url'\n\nimport {\n ESModulesEvaluator,\n type EvaluatedModuleNode,\n type ModuleEvaluator,\n type ModuleRunnerContext,\n ssrModuleExportsKey,\n} from 'vite/module-runner'\n\nfunction isCommonJsCode(code: string): boolean {\n return (\n /\\bmodule\\.exports\\b/.test(code) ||\n /\\bexports\\.[a-zA-Z_$]/.test(code) ||\n /(?:^|[;\\n])\\s*exports\\s=/.test(code) ||\n /(?:^|\\n|\\s)require\\s*\\(/.test(code)\n )\n}\n\nfunction isPrimitive(value: unknown): boolean {\n return !value || (typeof value !== 'object' && typeof value !== 'function')\n}\n\nfunction defineExport(exports: Record<string, unknown>, key: string, getter: () => unknown) {\n Object.defineProperty(exports, key, {\n configurable: true,\n enumerable: true,\n get: getter,\n })\n}\n\nfunction exportAll(exports: Record<string, unknown>, sourceModule: unknown) {\n if (exports === sourceModule) return\n if (isPrimitive(sourceModule) || Array.isArray(sourceModule) || sourceModule instanceof Promise) {\n return\n }\n\n for (const key in sourceModule as Record<string, unknown>) {\n if (key !== 'default' && !(key in exports)) {\n try {\n defineExport(exports, key, () => (sourceModule as Record<string, unknown>)[key])\n } catch {\n // ignore non-configurable exports\n }\n }\n }\n}\n\n/**\n * Module evaluator that can execute raw CommonJS modules in addition to\n * Vite's SSR-transformed ESM. Matches vite-node's CJS execution behavior,\n * which ModuleRunner's default ESModulesEvaluator does not support.\n */\nexport class StudioModuleEvaluator implements ModuleEvaluator {\n private readonly esmEvaluator = new ESModulesEvaluator()\n readonly startOffset = this.esmEvaluator.startOffset\n\n runExternalModule(filepath: string): Promise<unknown> {\n return this.esmEvaluator.runExternalModule(filepath)\n }\n\n runInlinedModule(\n context: ModuleRunnerContext,\n code: string,\n module: Readonly<EvaluatedModuleNode>,\n ): Promise<void> {\n if (!isCommonJsCode(code)) {\n return (this.esmEvaluator as ModuleEvaluator).runInlinedModule(context, code, module)\n }\n\n return this.runCommonJsModule(context, code, module)\n }\n\n private async runCommonJsModule(\n context: ModuleRunnerContext,\n code: string,\n module: Readonly<EvaluatedModuleNode>,\n ): Promise<void> {\n const modulePath = module.file || module.id\n const href = pathToFileURL(modulePath).href\n const __filename = fileURLToPath(href)\n const __dirname = dirname(__filename)\n\n const exports = context[ssrModuleExportsKey]\n const moduleNotDefined = Symbol('not defined')\n let moduleExports: unknown = moduleNotDefined\n\n const cjsExports = new Proxy(exports, {\n get: (target, property, receiver) => {\n if (Reflect.has(target, property)) return Reflect.get(target, property, receiver)\n return Reflect.get(Object.prototype, property, receiver)\n },\n getPrototypeOf: () => Object.prototype,\n set: (_, property, value) => {\n if (property === 'default') {\n exports.default = value\n return true\n }\n if (!Reflect.has(exports, 'default')) {\n exports.default = {}\n }\n if (moduleExports !== moduleNotDefined && isPrimitive(moduleExports)) {\n defineExport(exports, String(property), () => {})\n return true\n }\n if (!isPrimitive(exports.default) && typeof exports.default === 'object') {\n ;(exports.default as Record<string, unknown>)[String(property)] = value\n }\n if (property !== 'default') {\n defineExport(exports, String(property), () => value)\n }\n return true\n },\n })\n\n const moduleProxy = {\n get exports() {\n return cjsExports\n },\n set exports(value: unknown) {\n exportAll(exports, value)\n exports.default = value\n moduleExports = value\n },\n }\n\n const cjsContext: Record<string, unknown> = {\n ...context,\n __dirname,\n __filename,\n exports: cjsExports,\n module: moduleProxy,\n require: createRequire(href),\n }\n\n let normalizedCode = code\n if (normalizedCode[0] === '#') {\n normalizedCode = normalizedCode.replace(/^#!.*/, (line) => ' '.repeat(line.length))\n }\n\n // Use AsyncFunction (same as ESModulesEvaluator) so the shared `startOffset`\n // ModuleRunner applies to inlined sourcemaps matches this wrapper's padding.\n const AsyncFunction = async function () {}.constructor as new (\n ...args: string[]\n ) => (...args: unknown[]) => Promise<unknown>\n const parameterNames = Object.keys(cjsContext)\n const runner = new AsyncFunction(...parameterNames, `\"use strict\";\\n${normalizedCode}`)\n await runner(...parameterNames.map((name) => cjsContext[name]))\n }\n}\n"],"names":["createRequire","dirname","fileURLToPath","pathToFileURL","ESModulesEvaluator","ssrModuleExportsKey","isCommonJsCode","code","test","isPrimitive","value","defineExport","exports","key","getter","Object","defineProperty","configurable","enumerable","get","exportAll","sourceModule","Array","isArray","Promise","StudioModuleEvaluator","esmEvaluator","startOffset","runExternalModule","filepath","runInlinedModule","context","module","runCommonJsModule","modulePath","file","id","href","__filename","__dirname","moduleNotDefined","Symbol","moduleExports","cjsExports","Proxy","target","property","receiver","Reflect","has","prototype","getPrototypeOf","set","_","default","String","moduleProxy","cjsContext","require","normalizedCode","replace","line","repeat","length","AsyncFunction","parameterNames","keys","runner","map","name"],"mappings":"AAAA,SAAQA,aAAa,QAAO,cAAa;AACzC,SAAQC,OAAO,QAAO,YAAW;AACjC,SAAQC,aAAa,EAAEC,aAAa,QAAO,WAAU;AAErD,SACEC,kBAAkB,EAIlBC,mBAAmB,QACd,qBAAoB;AAE3B,SAASC,eAAeC,IAAY;IAClC,OACE,sBAAsBC,IAAI,CAACD,SAC3B,wBAAwBC,IAAI,CAACD,SAC7B,2BAA2BC,IAAI,CAACD,SAChC,0BAA0BC,IAAI,CAACD;AAEnC;AAEA,SAASE,YAAYC,KAAc;IACjC,OAAO,CAACA,SAAU,OAAOA,UAAU,YAAY,OAAOA,UAAU;AAClE;AAEA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cAAc,CAAC,EAAE,KAAK,KAAK;YAC7BA,iBAAiBA,eAAeC,OAAO,CAAC,SAAS,CAACC,OAAS,IAAIC,MAAM,CAACD,KAAKE,MAAM;QACnF;QAEA,6EAA6E;QAC7E,6EAA6E;QAC7E,MAAMC,gBAAgB,CAAA,kBAAmB,CAAA,EAAE,WAAW;QAGtD,MAAMC,iBAAiBlD,OAAOmD,IAAI,CAACT;QACnC,MAAMU,SAAS,IAAIH,iBAAiBC,gBAAgB,CAAC,eAAe,EAAEN,gBAAgB;QACtF,MAAMQ,UAAUF,eAAeG,GAAG,CAAC,CAACC,OAASZ,UAAU,CAACY,KAAK;IAC/D;AACF"}
1
+ {"version":3,"sources":["../../../src/loaders/studio/studioModuleEvaluator.ts"],"sourcesContent":["import {createRequire} from 'node:module'\nimport {dirname} from 'node:path'\nimport {fileURLToPath, pathToFileURL} from 'node:url'\n\nimport {\n ESModulesEvaluator,\n type EvaluatedModuleNode,\n type ModuleEvaluator,\n type ModuleRunnerContext,\n ssrModuleExportsKey,\n} from 'vite/module-runner'\n\nfunction isPrimitive(value: unknown): boolean {\n return !value || (typeof value !== 'object' && typeof value !== 'function')\n}\n\nfunction defineExport(exports: Record<string, unknown>, key: string, getter: () => unknown) {\n Object.defineProperty(exports, key, {\n configurable: true,\n enumerable: true,\n get: getter,\n })\n}\n\nfunction exportAll(exports: Record<string, unknown>, sourceModule: unknown) {\n if (exports === sourceModule) return\n if (isPrimitive(sourceModule) || Array.isArray(sourceModule) || sourceModule instanceof Promise) {\n return\n }\n\n for (const key in sourceModule as Record<string, unknown>) {\n if (key !== 'default' && !(key in exports)) {\n try {\n defineExport(exports, key, () => (sourceModule as Record<string, unknown>)[key])\n } catch {\n // ignore non-configurable exports\n }\n }\n }\n}\n\n/**\n * Module evaluator that can execute raw CommonJS modules in addition to\n * Vite's SSR-transformed ESM. Matches vite-node's CJS execution behavior,\n * which ModuleRunner's default ESModulesEvaluator does not support.\n */\nexport class StudioModuleEvaluator implements ModuleEvaluator {\n private readonly esmEvaluator = new ESModulesEvaluator()\n readonly startOffset = this.esmEvaluator.startOffset\n\n runExternalModule(filepath: string): Promise<unknown> {\n return this.esmEvaluator.runExternalModule(filepath)\n }\n\n runInlinedModule(\n context: ModuleRunnerContext,\n code: string,\n module: Readonly<EvaluatedModuleNode>,\n ): Promise<void> {\n return this.runCommonJsModule(context, code, module)\n }\n\n private async runCommonJsModule(\n context: ModuleRunnerContext,\n code: string,\n module: Readonly<EvaluatedModuleNode>,\n ): Promise<void> {\n const modulePath = module.file || module.id\n const href = pathToFileURL(modulePath).href\n const __filename = fileURLToPath(href)\n const __dirname = dirname(__filename)\n\n const exports = context[ssrModuleExportsKey]\n const moduleNotDefined = Symbol('not defined')\n let moduleExports: unknown = moduleNotDefined\n\n const cjsExports = new Proxy(exports, {\n get: (target, property, receiver) => {\n if (Reflect.has(target, property)) return Reflect.get(target, property, receiver)\n return Reflect.get(Object.prototype, property, receiver)\n },\n getPrototypeOf: () => Object.prototype,\n set: (_, property, value) => {\n // Keep the module default when CommonJS aliases it back to `module.exports`.\n if (property === 'default' && cjsExports !== value) {\n exportAll(exports, value)\n exports.default = value\n return true\n }\n if (!Reflect.has(exports, 'default')) {\n exports.default = {}\n }\n if (moduleExports !== moduleNotDefined && isPrimitive(moduleExports)) {\n defineExport(exports, String(property), () => {})\n return true\n }\n if (!isPrimitive(exports.default)) {\n ;(exports.default as Record<string, unknown>)[String(property)] = value\n }\n if (property !== 'default') {\n defineExport(exports, String(property), () => value)\n }\n return true\n },\n })\n\n const moduleProxy = {\n get exports() {\n return cjsExports\n },\n set exports(value: unknown) {\n exportAll(exports, value)\n exports.default = value\n moduleExports = value\n },\n }\n\n const cjsContext: Record<string, unknown> = {\n ...context,\n __dirname,\n __filename,\n exports: cjsExports,\n module: moduleProxy,\n require: createRequire(href),\n }\n\n let normalizedCode = code\n if (normalizedCode[0] === '#') {\n normalizedCode = normalizedCode.replace(/^#!.*/, (line) => ' '.repeat(line.length))\n }\n\n const AsyncFunction = async function () {}.constructor as new (\n ...args: string[]\n ) => (...args: unknown[]) => Promise<unknown>\n const parameterNames = Object.keys(cjsContext)\n const runner = new AsyncFunction(...parameterNames, `\"use strict\";{\\n${normalizedCode}\\n}`)\n await runner(...parameterNames.map((name) => cjsContext[name]))\n }\n}\n"],"names":["createRequire","dirname","fileURLToPath","pathToFileURL","ESModulesEvaluator","ssrModuleExportsKey","isPrimitive","value","defineExport","exports","key","getter","Object","defineProperty","configurable","enumerable","get","exportAll","sourceModule","Array","isArray","Promise","StudioModuleEvaluator","esmEvaluator","startOffset","runExternalModule","filepath","runInlinedModule","context","code","module","runCommonJsModule","modulePath","file","id","href","__filename","__dirname","moduleNotDefined","Symbol","moduleExports","cjsExports","Proxy","target","property","receiver","Reflect","has","prototype","getPrototypeOf","set","_","default","String","moduleProxy","cjsContext","require","normalizedCode","replace","line","repeat","length","AsyncFunction","parameterNames","keys","runner","map","name"],"mappings":"AAAA,SAAQA,aAAa,QAAO,cAAa;AACzC,SAAQC,OAAO,QAAO,YAAW;AACjC,SAAQC,aAAa,EAAEC,aAAa,QAAO,WAAU;AAErD,SACEC,kBAAkB,EAIlBC,mBAAmB,QACd,qBAAoB;AAE3B,SAASC,YAAYC,KAAc;IACjC,OAAO,CAACA,SAAU,OAAOA,UAAU,YAAY,OAAOA,UAAU;AAClE;AAEA,SAASC,aAAaC,OAAgC,EAAEC,GAAW,EAAEC,MAAqB;IACxFC,OAAOC,cAAc,CAACJ,SAASC,KAAK;QAClCI,cAAc;QACdC,YAAY;QACZC,KAAKL;IACP;AACF;AAEA,SAASM,UAAUR,OAAgC,EAAES,YAAqB;IACxE,IAAIT,YAAYS,cAAc;IAC9B,IAAIZ,YAAYY,iBAAiBC,MAAMC,OAAO,CAACF,iBAAiBA,wBAAwBG,SAAS;QAC/F;IACF;IAEA,IAAK,MAAMX,OAAOQ,aAAyC;QACzD,IAAIR,QAAQ,aAAa,CAAEA,CAAAA,OAAOD,OAAM,GAAI;YAC1C,IAAI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LI core package",
5
5
  "keywords": [
6
6
  "cli",