@sanity/plugin-kit
6.0.47.0.0
dist/index.js.map~
dist/index.js.mapModified+1−1
Index: package/dist/index.js.map
===================================================================
--- package/dist/index.js.map
+++ package/dist/index.js.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"index.js","names":["sharedFlags","commands"],"sources":["../src/cmds/index.ts","../src/cli.ts"],"sourcesContent":["export default {\n 'init': async (options: {argv: string[]}) => {\n await (await import('./init')).default(options)\n },\n 'inject': async (options: {argv: string[]}) => {\n await (await import('./inject')).default(options)\n },\n 'link-watch': async (options: {argv: string[]}) => {\n await (await import('./link-watch')).default(options)\n },\n 'verify-package': async (options: {argv: string[]}) => {\n await (await import('./verify-package')).default(options)\n },\n 'verify-studio': async (options: {argv: string[]}) => {\n await (await import('./verify-studio')).default(options)\n },\n 'version': async (options: {argv: string[]}) => {\n ;(await import('./version')).default(options)\n },\n}\n","import meow from 'meow'\n\nimport commands from './cmds'\nimport {cliName} from './constants'\nimport sharedFlags from './sharedFlags'\nimport log from './util/log'\n\n/** @public */\nexport async function cliEntry(argv = process.argv) {\n const cli = meow(\n `\n\tUsage\n\t $ ${cliName} [--help] [--debug] <command> [<args>]\n\n These are common commands used in various situations:\n\n init Create a new Sanity plugin\n inject Inject config into an existing Sanity v3 plugin\n verify-package Check that a Sanity plugin package follows V3 conventions. Prints upgrade steps.\n verify-studio Check that a Sanity Studio follows V3 conventions. Prints upgrade steps.\n link-watch Recompiles plugin automatically on changes and runs yalc push --publish\n version Show the version of ${cliName} currently installed\n\n Options\n --silent Do not print info and warning messages\n --verbose Log everything. This option conflicts with --silent\n --debug Print stack trace on errors\n --version Output the version number\n --help Output usage information\n\n Examples\n # Init a new plugin in current directory\n $ ${cliName} init\n\n # Init a new plugin in my-sanity-plugin directory\n $ ${cliName} init my-sanity-plugin\n\n # Check that a Sanity plugin package in current directory follows V3 conventions\n $ ${cliName} verify-package\n\n # Check that a Sanity Studio in current directory follows V3 conventions\n $ ${cliName} verify-studio\n`,\n {\n autoHelp: false,\n flags: sharedFlags,\n argv: argv.slice(2),\n },\n )\n\n const commandName = cli.input[0]\n if (!commandName) {\n cli.showHelp() // Exits\n }\n\n if (!(commandName in commands)) {\n console.error(`Unknown command \"${commandName}\"`)\n cli.showHelp() // Exits\n }\n\n if (cli.flags.silent && cli.flags.verbose) {\n log.error(`--silent and --verbose are mutually exclusive`)\n cli.showHelp() // Exits\n }\n\n // Lazy-load command\n const cmd = commands[commandName as keyof typeof commands]\n\n try {\n log.setVerbosity(cli.flags)\n await cmd({argv: argv.slice(3)})\n } catch (err: any) {\n log.error(err instanceof TypeError || cli.flags.debug ? err.stack : err.message)\n\n process.exit(1)\n }\n}\n"],"mappings":";;;AAAA,IAAA,eAAe;CACb,MAAQ,OAAO,YAA8B;EAC3C,OAAO,MAAM,OAAO,cAAA,CAAW,QAAQ,OAAO;CAChD;CACA,QAAU,OAAO,YAA8B;EAC7C,OAAO,MAAM,OAAO,eAAA,CAAa,QAAQ,OAAO;CAClD;CACA,cAAc,OAAO,YAA8B;EACjD,OAAO,MAAM,OAAO,mBAAA,CAAiB,QAAQ,OAAO;CACtD;CACA,kBAAkB,OAAO,YAA8B;EACrD,OAAO,MAAM,OAAO,uBAAA,CAAqB,QAAQ,OAAO;CAC1D;CACA,iBAAiB,OAAO,YAA8B;EACpD,OAAO,MAAM,OAAO,sBAAA,CAAoB,QAAQ,OAAO;CACzD;CACA,SAAW,OAAO,YAA8B;EAC7C,CAAC,MAAM,OAAO,gBAAA,CAAc,QAAQ,OAAO;CAC9C;AACF;;ACXA,eAAsB,SAAS,OAAO,QAAQ,MAAM;CAClD,IAAM,MAAM,KACV;;OAEG,QAAQ;;;;;;;;;0CAS2B,QAAQ;;;;;;;;;;;QAW1C,QAAQ;;;QAGR,QAAQ;;;QAGR,QAAQ;;;QAGR,QAAQ;GAEZ;EACE,UAAU;EACV,OAAOA;EACP,MAAM,KAAK,MAAM,CAAC;CACpB,CACF,GAEM,cAAc,IAAI,MAAM;CAU9B,AATK,eACH,IAAI,SAAS,GAGT,eAAeC,iBACnB,QAAQ,MAAM,oBAAoB,YAAY,EAAE,GAChD,IAAI,SAAS,IAGX,IAAI,MAAM,UAAU,IAAI,MAAM,YAChC,YAAI,MAAM,+CAA+C,GACzD,IAAI,SAAS;CAIf,IAAM,MAAMA,aAAS;CAErB,IAAI;EAEF,AADA,YAAI,aAAa,IAAI,KAAK,GAC1B,MAAM,IAAI,EAAC,MAAM,KAAK,MAAM,CAAC,EAAC,CAAC;CACjC,SAAS,KAAU;EAGjB,AAFA,YAAI,MAAM,eAAe,aAAa,IAAI,MAAM,QAAQ,IAAI,QAAQ,IAAI,OAAO,GAE/E,QAAQ,KAAK,CAAC;CAChB;AACF"}
\ No newline at end of file
+{"version":3,"file":"index.js","names":["sharedFlags","commands"],"sources":["../src/cmds/index.ts","../src/cli.ts"],"sourcesContent":["export default {\n 'init': async (options: {argv: string[]}) => {\n await (await import('./init')).default(options)\n },\n 'inject': async (options: {argv: string[]}) => {\n await (await import('./inject')).default(options)\n },\n 'link-watch': async (options: {argv: string[]}) => {\n await (await import('./link-watch')).default(options)\n },\n 'verify-package': async (options: {argv: string[]}) => {\n await (await import('./verify-package')).default(options)\n },\n 'verify-studio': async (options: {argv: string[]}) => {\n await (await import('./verify-studio')).default(options)\n },\n 'version': async (options: {argv: string[]}) => {\n ;(await import('./version')).default(options)\n },\n}\n","import meow from 'meow'\n\nimport commands from './cmds'\nimport {cliName} from './constants'\nimport sharedFlags from './sharedFlags'\nimport log from './util/log'\n\n/** @public */\nexport async function cliEntry(argv = process.argv) {\n const cli = meow(\n `\n\tUsage\n\t $ ${cliName} [--help] [--debug] <command> [<args>]\n\n These are common commands used in various situations:\n\n init Create a new Sanity plugin\n inject Inject config into an existing Sanity v3 plugin\n verify-package Check that a Sanity plugin package follows V3 conventions. Prints upgrade steps.\n verify-studio Check that a Sanity Studio follows V3 conventions. Prints upgrade steps.\n link-watch Recompiles plugin automatically on changes and runs yalc push --publish\n version Show the version of ${cliName} currently installed\n\n Options\n --silent Do not print info and warning messages\n --verbose Log everything. This option conflicts with --silent\n --debug Print stack trace on errors\n --version Output the version number\n --help Output usage information\n\n Examples\n # Init a new plugin in current directory\n $ ${cliName} init\n\n # Init a new plugin in my-sanity-plugin directory\n $ ${cliName} init my-sanity-plugin\n\n # Check that a Sanity plugin package in current directory follows V3 conventions\n $ ${cliName} verify-package\n\n # Check that a Sanity Studio in current directory follows V3 conventions\n $ ${cliName} verify-studio\n`,\n {\n autoHelp: false,\n flags: sharedFlags,\n argv: argv.slice(2),\n },\n )\n\n const commandName = cli.input[0]\n if (!commandName) {\n cli.showHelp() // Exits\n }\n\n if (!(commandName in commands)) {\n console.error(`Unknown command \"${commandName}\"`)\n cli.showHelp() // Exits\n }\n\n if (cli.flags.silent && cli.flags.verbose) {\n log.error(`--silent and --verbose are mutually exclusive`)\n cli.showHelp() // Exits\n }\n\n // Lazy-load command\n const cmd = commands[commandName as keyof typeof commands]\n\n try {\n log.setVerbosity(cli.flags)\n await cmd({argv: argv.slice(3)})\n } catch (err: any) {\n log.error(err instanceof TypeError || cli.flags.debug ? err.stack : err.message)\n\n process.exit(1)\n }\n}\n"],"mappings":";;;AAAA,IAAA,eAAe;CACb,MAAQ,OAAO,YAA8B;EAC3C,OAAO,MAAM,OAAO,yBAAA,CAAW,QAAQ,OAAO;CAChD;CACA,QAAU,OAAO,YAA8B;EAC7C,OAAO,MAAM,OAAO,0BAAA,CAAa,QAAQ,OAAO;CAClD;CACA,cAAc,OAAO,YAA8B;EACjD,OAAO,MAAM,OAAO,8BAAA,CAAiB,QAAQ,OAAO;CACtD;CACA,kBAAkB,OAAO,YAA8B;EACrD,OAAO,MAAM,OAAO,kCAAA,CAAqB,QAAQ,OAAO;CAC1D;CACA,iBAAiB,OAAO,YAA8B;EACpD,OAAO,MAAM,OAAO,iCAAA,CAAoB,QAAQ,OAAO;CACzD;CACA,SAAW,OAAO,YAA8B;EAC7C,CAAC,MAAM,OAAO,2BAAA,CAAc,QAAQ,OAAO;CAC9C;A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