jiek 0.4.7-alpha.13 → 0.4.7-alpha.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/bin/jiek.js +4 -7
  2. package/dist/cli.d.mts.map +1 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +95 -4277
  5. package/dist/cli.js.map +1 -0
  6. package/dist/cli.min.js +1 -19
  7. package/dist/cli.min.js.map +1 -0
  8. package/dist/cli.min.mjs +1 -0
  9. package/dist/cli.min.mjs.map +1 -0
  10. package/dist/cli.mjs +803 -0
  11. package/dist/cli.mjs.map +1 -0
  12. package/dist/index.d.mts.map +1 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +3 -1
  15. package/dist/index.js.map +1 -0
  16. package/dist/index.min.js +1 -1
  17. package/dist/index.min.js.map +1 -0
  18. package/dist/index.min.mjs +1 -0
  19. package/dist/index.min.mjs.map +1 -0
  20. package/dist/index.mjs +3 -0
  21. package/dist/index.mjs.map +1 -0
  22. package/dist/rollup/index.d.mts.map +1 -0
  23. package/dist/rollup/index.d.ts.map +1 -0
  24. package/dist/rollup/index.js +68 -4183
  25. package/dist/rollup/index.js.map +1 -0
  26. package/dist/rollup/index.min.js +1 -19
  27. package/dist/rollup/index.min.js.map +1 -0
  28. package/dist/rollup/index.min.mjs +1 -0
  29. package/dist/rollup/index.min.mjs.map +1 -0
  30. package/dist/rollup/index.mjs +551 -0
  31. package/dist/rollup/index.mjs.map +1 -0
  32. package/package.json +11 -13
  33. package/src/commands/base.ts +2 -1
  34. package/src/commands/build.ts +2 -4
  35. package/src/pkg.ts +1 -0
  36. package/src/rollup/index.ts +3 -5
  37. package/src/utils/filterSupport.ts +0 -2
  38. package/src/utils/tsRegister.ts +0 -4
  39. package/dist/cli.cjs +0 -5037
  40. package/dist/cli.min.cjs +0 -19
  41. package/dist/index.cjs +0 -5
  42. package/dist/index.min.cjs +0 -1
  43. package/dist/rollup/index.cjs +0 -4683
  44. package/dist/rollup/index.min.cjs +0 -19
  45. /package/dist/{cli.d.cts → cli.d.mts} +0 -0
  46. /package/dist/{index.d.cts → index.d.mts} +0 -0
  47. /package/dist/rollup/{index.d.cts → index.d.mts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.mjs","sources":["../src/utils/getRoot.ts","../src/utils/getWD.ts","../src/utils/filterSupport.ts","../src/pkg.ts","../src/commands/base.ts","../src/inner.ts","../src/utils/tsRegister.ts","../src/utils/loadConfig.ts","../src/commands/build.ts","../src/commands/init.ts","../src/merge-package-json.ts","../src/commands/publish.ts","../src/cli.ts"],"sourcesContent":["import path from 'node:path'\n\nimport { program } from 'commander'\n\nlet root: string\nexport function getRoot() {\n if (root) return root\n\n const rootOption = program.getOptionValue('root')\n root = rootOption\n ? path.isAbsolute(rootOption)\n ? rootOption\n : path.resolve(process.cwd(), rootOption)\n : undefined\n return root\n}\n","import { getWorkspaceDir, isWorkspaceDir } from '@jiek/utils/getWorkspaceDir'\n\nimport { type } from './filterSupport'\nimport { getRoot } from './getRoot'\n\nlet wd: string\nlet notWorkspace = false\n\nexport function getWD() {\n if (wd) return { wd, notWorkspace }\n\n const root = getRoot()\n if (root !== undefined) {\n const isWorkspace = isWorkspaceDir(root, type)\n notWorkspace = !isWorkspace\n wd = root\n return { wd, notWorkspace }\n }\n try {\n wd = getWorkspaceDir(type)\n } catch (e) {\n // @ts-ignore\n if ('message' in e && e.message === 'workspace root not found') {\n wd = root\n notWorkspace = true\n } else {\n throw e\n }\n }\n return { wd, notWorkspace }\n}\n","import fs from 'node:fs'\nimport path from 'node:path'\n\nimport { filterPackagesFromDir } from '@pnpm/filter-workspace-packages'\nimport { program } from 'commander'\nimport { load } from 'js-yaml'\n\nimport { getRoot } from './getRoot'\nimport { getWD } from './getWD'\n\nexport let type = ''\n\ntry {\n require.resolve('@pnpm/filter-workspace-packages')\n type = 'pnpm'\n} catch { /* empty */ }\nif (type !== '') {\n program\n .option('-f, --filter <filter>', 'filter packages')\n}\n\ninterface ProjectsGraph {\n wd: string\n root: string\n value?: Record<string, {\n name?: string\n }>\n}\n\nexport async function getSelectedProjectsGraph(): Promise<ProjectsGraph> {\n let filter = program.getOptionValue('filter')\n const root = getRoot()\n const { wd, notWorkspace } = getWD()\n if (!notWorkspace && type === 'pnpm') {\n const pnpmWorkspaceFilePath = path.resolve(wd, 'pnpm-workspace.yaml')\n const pnpmWorkspaceFileContent = fs.readFileSync(pnpmWorkspaceFilePath, 'utf-8')\n const pnpmWorkspace = load(pnpmWorkspaceFileContent) as {\n packages: string[]\n }\n if (root === wd && !filter) {\n throw new Error('root path is workspace root, please provide a filter')\n // TODO inquirer prompt support user select packages\n }\n if (root !== wd && !filter) {\n const packageJSONIsExist = fs.existsSync(path.resolve(root, 'package.json'))\n if (!packageJSONIsExist) {\n throw new Error('root path is not workspace root, please provide a filter')\n }\n const packageJSON = JSON.parse(fs.readFileSync(path.resolve(root, 'package.json'), 'utf-8'))\n if (!packageJSON.name) {\n throw new Error('root path is not workspace root, please provide a filter')\n }\n filter = packageJSON.name\n }\n const { selectedProjectsGraph } = await filterPackagesFromDir(wd, [{\n filter: filter ?? '',\n followProdDepsOnly: true\n }], {\n prefix: root,\n workspaceDir: wd,\n patterns: pnpmWorkspace.packages\n })\n return {\n wd,\n root,\n value: Object.entries(selectedProjectsGraph)\n .reduce((acc, [key, value]) => {\n acc[key] = value.package.manifest\n return acc\n }, {} as NonNullable<ProjectsGraph['value']>)\n }\n }\n return {\n wd,\n root,\n value: {\n [wd]: JSON.parse(fs.readFileSync(path.resolve(wd, 'package.json'), 'utf-8'))\n }\n }\n}\n","export default require('../package.json')\n","import { program } from 'commander'\n\nimport pkg from '../pkg'\n\nprogram\n .version(pkg.version)\n .description(pkg.description)\n .option('--root <root>', 'root path')\n .option('-c, --config-path <configPath>', 'config path')\n","let resolve: () => void\n\nexport let actionFuture: Promise<void>\n\nexport function actionDone() {\n resolve()\n}\n\nexport function actionRestore() {\n actionFuture = new Promise<void>(r => resolve = r)\n}\n","function packageIsExist(name: string) {\n try {\n require.resolve(name)\n return true\n } catch (e) {\n return false\n }\n}\n\nexport let tsRegisterName: string | undefined\nconst registers = [\n process.env.JIEK_TS_REGISTER,\n 'esbuild-register',\n '@swc-node/register',\n 'ts-node/register'\n].filter(Boolean) as string[]\nfor (const register of registers) {\n if (packageIsExist(register)) {\n tsRegisterName = register\n break\n }\n}\n","import fs from 'node:fs'\nimport path from 'node:path'\n\nimport { program } from 'commander'\nimport type { Config } from 'jiek'\nimport { load } from 'js-yaml'\n\nimport { getWD } from './getWD'\nimport { tsRegisterName } from './tsRegister'\n\nlet configName = 'jiek.config'\n\nfunction getConfigPath(root: string) {\n const isSupportTsLoader = !!tsRegisterName\n function configWithExtIsExist(ext: string) {\n const filenames = [\n path.resolve(process.cwd(), `${configName}.${ext}`),\n path.resolve(process.cwd(), `.${configName}.${ext}`),\n path.resolve(root, `${configName}.${ext}`),\n path.resolve(root, `.${configName}.${ext}`)\n ]\n for (const filename of filenames) {\n if (\n fs.existsSync(filename)\n && fs.lstatSync(filename)\n .isFile()\n ) {\n return filename\n }\n }\n return\n }\n configName = configWithExtIsExist('js') ?? configName\n configName = configWithExtIsExist('json') ?? configName\n configName = configWithExtIsExist('yaml') ?? configName\n if (isSupportTsLoader) {\n configName = configWithExtIsExist('ts') ?? configName\n }\n return path.resolve(root, configName)\n}\n\nexport function loadConfig(): Config {\n const { wd: root, notWorkspace } = getWD()\n if (notWorkspace) {\n throw new Error('not in workspace')\n }\n\n let configPath = program.getOptionValue('configPath')\n\n if (!configPath) {\n configPath = getConfigPath(root)\n } else {\n if (!fs.existsSync(configPath)) {\n throw new Error(`config file not found: ${configPath}`)\n }\n if (!path.isAbsolute(configPath)) {\n configPath = path.resolve(root, configPath)\n }\n }\n const ext = path.extname(configPath)\n\n let module: any\n switch (ext) {\n case '.js':\n module = require(configPath)\n break\n case '.json':\n return require(configPath)\n case '.yaml':\n return load(fs.readFileSync(configPath, 'utf-8')) as Config\n case '.ts':\n if (tsRegisterName) {\n require(tsRegisterName)\n module = require(configPath)\n break\n }\n throw new Error(\n 'ts config file is not supported without ts register, '\n + 'please install esbuild-register or set JIEK_TS_REGISTER env for custom ts register'\n )\n case '.config':\n module = {}\n break\n default:\n throw new Error(`unsupported config file type: ${ext}`)\n }\n if (!module) throw new Error('config file is empty')\n\n return module.default ?? module\n}\n","import '../rollup/base'\n\nimport fs from 'node:fs'\nimport path from 'node:path'\n\nimport { MultiBar, Presets } from 'cli-progress'\nimport { program } from 'commander'\nimport { execaCommand } from 'execa'\n\nimport { actionDone, actionRestore } from '../inner'\nimport type { RollupProgressEvent } from '../rollup/base'\nimport { getSelectedProjectsGraph } from '../utils/filterSupport'\nimport { loadConfig } from '../utils/loadConfig'\nimport { tsRegisterName } from '../utils/tsRegister'\n\nconst FILE_TEMPLATE = (manifest: unknown) => (`\nconst manifest = ${JSON.stringify(manifest, null, 2)}\nmodule.exports = require('jiek/rollup').template(manifest)\n`.trimStart())\n\nprogram\n .command('build')\n .option('-s, --silent', \"Don't display logs.\")\n .option('-e, --entries <ENTRIES>', \"Specify the entries of the package.json's 'exports' field.(support glob)\")\n .action(async ({\n silent,\n entries\n }: {\n silent: boolean\n entries: string\n }) => {\n actionRestore()\n const { build } = loadConfig()\n silent = silent ?? build?.silent ?? false\n const {\n wd,\n value = {}\n } = await getSelectedProjectsGraph() ?? {}\n\n if (Object.keys(value).length === 0) {\n throw new Error('no package found')\n }\n const wdNodeModules = path.resolve(wd, 'node_modules')\n if (!fs.existsSync(wdNodeModules)) {\n fs.mkdirSync(wdNodeModules)\n }\n const jiekTempDir = (...paths: string[]) => path.resolve(wdNodeModules, '.jiek', ...paths)\n if (!fs.existsSync(jiekTempDir())) {\n fs.mkdirSync(jiekTempDir())\n }\n\n const rollupBinaryPath = require.resolve('rollup')\n .replace(/dist\\/rollup.js$/, 'dist/bin/rollup')\n const multiBars = new MultiBar({\n clearOnComplete: false,\n hideCursor: true,\n format: '- {bar} | {status} | {input} | {message}'\n }, Presets.shades_classic)\n let i = 0\n await Promise.all(\n Object.entries(value).map(async ([dir, manifest]) => {\n // TODO support auto build child packages in workspaces\n const escapeManifestName = manifest.name?.replace(/^@/g, '').replace(/\\//g, '+')\n const configFile = jiekTempDir(\n `${escapeManifestName ?? `anonymous-${i++}`}.rollup.config.js`\n )\n fs.writeFileSync(configFile, FILE_TEMPLATE(manifest))\n let prefix = ''\n if (tsRegisterName) {\n prefix = `node -r ${tsRegisterName} `\n }\n // TODO replace with `spawn` to support watch mode\n const command = `${prefix}${rollupBinaryPath} --silent -c ${configFile}`\n const child = execaCommand(command, {\n ipc: true,\n cwd: dir,\n env: {\n ...process.env,\n JIEK_ROOT: wd,\n JIEK_ENTRIES: entries\n }\n })\n const bars: Record<string, ReturnType<typeof multiBars.create>> = {}\n let inputMaxLen = 10\n child.on('message', (e: RollupProgressEvent) => {\n if (e.type === 'debug') console.log(...(Array.isArray(e.data) ? e.data : [e.data]))\n })\n !silent && child.on('message', (e: RollupProgressEvent) => {\n if (e.type === 'init') {\n const { leafMap, targetsLength } = e.data\n const leafs = Array\n .from(leafMap.entries())\n .flatMap(([input, pathAndCondiions]) =>\n pathAndCondiions.map(([path, ...conditions]) => ({\n input,\n path,\n conditions\n }))\n )\n console.log(`Package '${manifest.name}' has ${targetsLength} targets to build`)\n leafs.forEach(({ input }) => {\n inputMaxLen = Math.max(inputMaxLen, input.length)\n })\n leafs.forEach(({ input, path }) => {\n const key = `${input}:${path}`\n if (bars[key]) return\n bars[key] = multiBars.create(50, 0, {\n input: input.padEnd(inputMaxLen),\n status: 'waiting'.padEnd(10)\n }, {\n barsize: 20,\n linewrap: true\n })\n })\n }\n if (e.type === 'progress') {\n const {\n path,\n tags,\n input,\n event,\n message\n } = e.data\n const bar = bars[`${input}:${path}`]\n if (!bar) return\n bar.update(\n {\n start: 0,\n resolve: 20,\n end: 50\n }[event ?? 'start'] ?? 0,\n {\n input: input.padEnd(inputMaxLen),\n status: event?.padEnd(10),\n message: `${tags?.join(', ')}: ${message}`\n }\n )\n }\n })\n await new Promise<void>((resolve, reject) => {\n let errorStr = ''\n child.stderr?.on('data', (data) => {\n errorStr += data\n })\n child.once('exit', (code) =>\n code === 0\n ? resolve()\n : reject(new Error(`rollup build failed:\\n${errorStr}`)))\n })\n })\n ).finally(() => {\n multiBars.stop()\n })\n\n actionDone()\n })\n","import fs from 'node:fs'\nimport path from 'node:path'\n\nimport { program } from 'commander'\nimport detectIndent from 'detect-indent'\nimport inquirer from 'inquirer'\nimport type { Config, InitNamed } from 'jiek'\nimport { applyEdits, modify } from 'jsonc-parser'\nimport { isMatch } from 'micromatch'\n\nimport { getWD } from '../utils/getWD'\nimport { loadConfig } from '../utils/loadConfig'\n\ndeclare module 'jiek' {\n export type InitNamedFunction = (\n argument: string,\n paths: {\n full: string\n relative: string\n basename?: string\n }\n ) => [name?: string, path?: string]\n export type InitNamed =\n | InitNamedFunction\n | {\n [key: string]: string | InitNamedFunction\n }\n export interface Config {\n init?: {\n /**\n * the package.json template file path or file content\n *\n * if it can be parsed as json, it will be parsed\n * if it is a relative file path, it will be resolved to an absolute path based on the current working directory\n * if it is an absolute file path, it will be used directly\n * @default '.jiek.template.package.json'\n */\n template?: string\n /**\n * the readme content\n *\n * $name will be replaced with the package name\n * $license will be replaced with the license\n */\n readme?:\n | string\n | ((ctx: {\n dir: string\n packageJson: Record<string, any>\n }) => string)\n /**\n * the readme template file path\n * @default '.jiek.template.readme.md'\n */\n readmeTemplate?: string\n bug?: {\n /**\n * @default 'bug_report.yml'\n */\n template?: string\n /**\n * @default ['bug']\n */\n labels?:\n | string[]\n | ((ctx: {\n name: string\n dir: string\n }) => string[])\n }\n named?: InitNamed\n }\n }\n}\n\nconst PACKAGE_JSON_TEMPLATE = `{\n \"name\": \"\",\n \"version\": \"0.0.1\",\n \"description\": \"\",\n \"license\": \"\",\n \"author\": \"\",\n \"files\": [\"dist\"],\n \"exports\": {\n \".\": \"./src/index.ts\"\n },\n \"scripts\": {\n },\n \"homepage\": \"\",\n \"repository\": \"\",\n \"bugs\": \"\"\n}`.trimStart()\nconst README_TEMPLATE = `# $name\n\n## Installation\n\n\\`\\`\\`bash\nnpm install $name\n# or\npnpm install $name\n# or\nyarn add $name\n\\`\\`\\`\n\n## Usage\n\n\n## License\n\n$license\n`.trimStart()\n\nfunction getTemplateStr(wd: string, template: string | undefined) {\n let templateString = template ?? PACKAGE_JSON_TEMPLATE\n let isTemplateFile = false\n try {\n if (template) JSON.parse(template)\n } catch (e) {\n isTemplateFile = true\n }\n if (isTemplateFile) {\n const templatePath = path.resolve(wd, template!)\n templateString = fs.readFileSync(templatePath, 'utf-8')\n }\n return templateString\n}\nconst wdCache = new Map<string, Record<string, any>>()\nfunction getWDPackageJSONFiled(wd: string, field: string) {\n if (wdCache.has(wd)) {\n return wdCache.get(wd)![field]\n }\n const packageJSONPath = path.resolve(wd, 'package.json')\n const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath, 'utf-8'))\n wdCache.set(wd, packageJSON)\n return packageJSON[field]\n}\nasync function getName(\n named: InitNamed | undefined,\n name: string,\n {\n wd,\n cwd,\n workspaceName\n }: {\n wd: string\n cwd: string\n workspaceName: string\n }\n): Promise<[name?: string, path?: string]> {\n const relativePath = cwd.replace(`${wd}/`, '')\n let basename = path.basename(cwd)\n\n if (typeof named === 'function') {\n return named(name, {\n full: wd,\n relative: cwd\n })\n }\n\n let isParentMatched = false\n let matchedKey: string | undefined\n let matchedRule: NonNullable<typeof named>[string] | undefined\n if (typeof named === 'object') {\n const isWD = cwd === wd\n if (isWD) {\n const { rule } = await inquirer.prompt<{ rule: string }>({\n type: 'list',\n name: 'rule',\n message: 'choose a rule',\n default: 'default',\n choices: ['default'].concat(Object.keys(named))\n })\n if (rule !== 'default') {\n matchedKey = rule\n matchedRule = named[rule]\n }\n } else {\n for (const [key, value] of Object.entries(named)) {\n if (isMatch(relativePath, key)) {\n matchedKey = key\n matchedRule = value\n break\n }\n if (isMatch(`${relativePath}/jiek_ignore_dont_use_same_file_name`, key)) {\n isParentMatched = true\n matchedKey = key\n matchedRule = value\n break\n }\n }\n }\n }\n if (!matchedRule) {\n matchedKey = 'packages/*'\n matchedRule = `@${workspaceName}/$basename`\n }\n if (!matchedRule) {\n throw new Error('no matched rule')\n }\n if (!name && isParentMatched) {\n basename = await inquirer.prompt<{ name: string }>({\n type: 'input',\n name: 'name',\n message: `the matched rule is \\`${String(matchedRule)}\\`, please input the basename\\n`\n }).then(({ name }) => name)\n }\n\n if (typeof matchedRule === 'function') {\n return matchedRule(name, {\n full: wd,\n relative: cwd,\n basename: basename\n })\n }\n if (typeof matchedRule === 'string') {\n const dirName = name ?? basename\n return [\n matchedRule.replace(/\\$basename/g, dirName),\n matchedKey?.replace(/\\/\\*$/g, `/${dirName}`)\n ]\n }\n throw new Error('no matched rule')\n}\n\nprogram\n .command('init [name]')\n .option('-t, --template <template>', 'the package.json template file path or file content')\n .action(async () => {\n const [, name] = program.args\n const cwd = process.cwd()\n const { init = {} }: Config = loadConfig() ?? {}\n const { wd } = getWD()\n const workspaceName = path.basename(wd)\n\n const {\n named,\n template,\n bug = {},\n readme: _readme = README_TEMPLATE,\n readmeTemplate\n } = init\n const resolvedBug = {\n template: 'bug_report.yml',\n labels: ['bug'],\n ...bug\n }\n let readme = _readme\n if (readmeTemplate) {\n const readmeTemplatePath = path.resolve(wd, readmeTemplate)\n readme = fs.readFileSync(readmeTemplatePath, 'utf-8')\n }\n\n const templateString = getTemplateStr(wd, template)\n // TODO detectIndent by editorconfig\n const { indent = ' ' } = detectIndent(templateString)\n const formattingOptions = {\n tabSize: indent.length,\n insertSpaces: true\n }\n const passFields = [\n 'license',\n 'author'\n ]\n let newJSONString = templateString\n for (const field of passFields) {\n newJSONString = applyEdits(\n newJSONString,\n modify(\n newJSONString,\n [field],\n getWDPackageJSONFiled(wd, field),\n { formattingOptions }\n )\n )\n }\n let [pkgName, pkgDir] = await getName(named, name, {\n wd,\n cwd,\n workspaceName\n })\n if (!pkgDir) {\n const { dir } = await inquirer.prompt<{ dir: string }>({\n type: 'input',\n name: 'dir',\n message: 'package directory',\n default: name\n })\n pkgDir = dir\n }\n if (!pkgName) {\n const { name: inputName } = await inquirer.prompt<{\n name: string\n }>({\n type: 'input',\n name: 'name',\n message: 'package name',\n default: name\n })\n pkgName = inputName\n }\n newJSONString = applyEdits(newJSONString, modify(newJSONString, ['name'], pkgName, { formattingOptions }))\n\n let pkgRepo = getWDPackageJSONFiled(wd, 'repository')\n if (typeof pkgRepo === 'string') {\n pkgRepo = {\n type: 'git',\n url: pkgRepo,\n directory: pkgDir\n }\n }\n newJSONString = applyEdits(\n newJSONString,\n modify(\n newJSONString,\n ['repository'],\n pkgRepo,\n { formattingOptions }\n )\n )\n const homepage = `${pkgRepo?.url}/blob/master/${pkgDir}/README.md`\n newJSONString = applyEdits(\n newJSONString,\n modify(\n newJSONString,\n ['homepage'],\n homepage,\n { formattingOptions }\n )\n )\n let labels = resolvedBug.labels\n if (typeof labels === 'function') {\n labels = labels({\n name: pkgName,\n dir: pkgDir\n })\n }\n labels.push(`scope:${pkgName}`)\n const bugs = `${pkgRepo?.url}/issues/new?template=${resolvedBug.template}&labels=${labels.join(',')}`\n newJSONString = applyEdits(\n newJSONString,\n modify(\n newJSONString,\n ['bugs'],\n bugs,\n { formattingOptions }\n )\n )\n\n function pkgDirTo(to: string) {\n if (!pkgDir) throw new Error('pkgDir is not defined')\n\n return path.resolve(pkgDir, to)\n }\n if (!fs.existsSync(pkgDir)) fs.mkdirSync(pkgDir)\n const pkgJSONFilePath = pkgDirTo('package.json')\n if (fs.existsSync(pkgJSONFilePath)) {\n throw new Error('package.json already exists')\n }\n fs.writeFileSync(pkgJSONFilePath, newJSONString)\n console.log(newJSONString, 'written to', pkgJSONFilePath)\n\n const license = getWDPackageJSONFiled(wd, 'license')\n const readmeFilePath = pkgDirTo('README.md')\n if (typeof readme === 'function') {\n readme = readme({\n dir: pkgDir,\n packageJson: JSON.parse(newJSONString)\n })\n }\n const readmeContent = readme\n .replace(/\\$name/g, pkgName)\n .replace(/\\$license/g, license)\n fs.writeFileSync(readmeFilePath, readmeContent)\n })\n","import path from 'node:path'\n\nimport { type Options, pkger } from '@jiek/pkger'\nimport { commondir } from '@jiek/utils/commondir'\nimport type { Manifest } from '@pnpm/workspace.pkgs-graph'\n\nexport function mergePackageJson(manifest: Manifest & {\n jiek?: Options\n exports?: unknown | unknown[]\n}, cwd: string, options: {\n excludeDistInExports?: boolean\n} = {}) {\n const {\n excludeDistInExports = false\n } = options\n const {\n jiek: { cwd: _, ...jiek } = {}\n } = manifest\n const { outdir = 'dist' } = jiek\n let { exports } = manifest\n let includeIndex = false\n if (typeof exports === 'string') {\n includeIndex = true\n exports = { '.': exports }\n }\n if (exports === undefined) {\n exports = { '.': './src/index.ts' }\n }\n if (typeof exports === 'object') {\n if (Array.isArray(exports) && exports.length > 0) {\n includeIndex = true\n } else {\n includeIndex = !!(<Record<string, unknown>>exports)['.']\n }\n }\n let inputs = Array.isArray(exports)\n ? exports as string[]\n : Object\n .entries(<Record<string, unknown>>exports)\n .reduce((acc, [key, value]) => {\n if (typeof value === 'string') return key === '.'\n ? [value, ...acc]\n : acc.concat(value)\n if (Array.isArray(value)) return acc.concat(value)\n\n throw new TypeError(`Unexpected value type for key \"${key}\" in exports, expected string, got ${typeof value}`)\n }, [] as string[])\n if (excludeDistInExports) {\n inputs = inputs.filter(input => !input.startsWith(`./${outdir}`) && !input.startsWith(outdir))\n }\n if (inputs.length === 0)\n throw new Error('No inputs found')\n\n const absoluteInputs = inputs.map(input => path.isAbsolute(input)\n ? input\n : path.resolve(cwd, input)\n )\n let cDir = path.dirname(absoluteInputs[0])\n if (absoluteInputs.length > 1) {\n cDir = commondir(absoluteInputs, cwd)\n }\n const resolvedInputs = absoluteInputs.map(input => {\n return path.relative(cDir, input)\n })\n return {\n ...manifest,\n ...pkger({\n cwd,\n noIndex: !includeIndex,\n source: path.relative(cwd, cDir),\n inputs: resolvedInputs,\n ...jiek\n })\n }\n}\n","import * as childProcess from 'node:child_process'\nimport fs from 'node:fs'\nimport path from 'node:path'\n\nimport { bump, type BumperType } from '@jiek/utils/bumper'\nimport { program } from 'commander'\nimport detectIndent from 'detect-indent'\nimport { applyEdits, modify } from 'jsonc-parser'\n\nimport { actionDone, actionRestore } from '../inner'\nimport { mergePackageJson } from '../merge-package-json'\nimport { getSelectedProjectsGraph } from '../utils/filterSupport'\n\nprogram\n .command('publish')\n .aliases(['pub', 'p'])\n .option('-b, --bumper <bumper>', 'bump version', 'patch')\n .option('-p, --preview', 'preview publish')\n .action(async ({ preview, bumper, ...options }: {\n preview?: boolean\n bumper: BumperType\n }) => {\n actionRestore()\n\n const { value = {} } = await getSelectedProjectsGraph() ?? {}\n const selectedProjectsGraphEntries = Object.entries(value)\n if (selectedProjectsGraphEntries.length === 0) {\n throw new Error('no packages selected')\n }\n const mainfests = selectedProjectsGraphEntries\n .map(([dir, manifest]) => [\n dir, mergePackageJson(manifest, dir)\n ] as const)\n const passArgs = Object\n .entries(options)\n .reduce((acc, [key, value]) => {\n if (value) {\n acc.push(`--${key}`, value as string)\n }\n return acc\n }, [] as string[])\n for (const [dir, manifest] of mainfests) {\n const oldJSONString = fs.readFileSync(path.join(dir, 'package.json'), 'utf-8')\n const oldJSON = JSON.parse(oldJSONString) ?? '0.0.0'\n const newVersion = bump(oldJSON.version, bumper)\n // TODO detectIndent by editorconfig\n const { indent = ' ' } = detectIndent(oldJSONString)\n const formattingOptions = {\n tabSize: indent.length,\n insertSpaces: true\n }\n let newJSONString = oldJSONString\n newJSONString = applyEdits(newJSONString, modify(\n newJSONString, ['version'], newVersion, { formattingOptions }\n ))\n for (const [key, value] of Object.entries(manifest)) {\n if (JSON.stringify(value) === JSON.stringify(oldJSON[key])) continue\n\n if (key !== 'exports') {\n newJSONString = applyEdits(newJSONString, modify(\n newJSONString, ['publishConfig', key], value, { formattingOptions }\n ))\n } else {\n for (const [k, v] of Object.entries(value)) {\n newJSONString = applyEdits(newJSONString, modify(\n newJSONString, ['publishConfig', 'exports', k], v, { formattingOptions }\n ))\n }\n }\n }\n try {\n fs.renameSync(path.join(dir, 'package.json'), path.join(dir, 'package.json.bak'))\n fs.writeFileSync(path.join(dir, 'package.json'), newJSONString)\n console.log(newJSONString)\n if (preview) {\n console.warn('preview mode')\n continue\n }\n childProcess.execSync(['pnpm', 'publish', '--access', 'public', '--no-git-checks', ...passArgs].join(' '), {\n cwd: dir,\n stdio: 'inherit'\n })\n const modifyVersionPackageJSON = applyEdits(oldJSONString, modify(oldJSONString, ['version'], newVersion, {}))\n fs.writeFileSync(path.join(dir, 'package.json.bak'), modifyVersionPackageJSON)\n } finally {\n fs.unlinkSync(path.join(dir, 'package.json'))\n fs.renameSync(path.join(dir, 'package.json.bak'), path.join(dir, 'package.json'))\n }\n }\n actionDone()\n })\n","import './utils/filterSupport'\nimport './commands/base'\nimport './commands/build'\nimport './commands/init'\nimport './commands/publish'\n\nimport { program } from 'commander'\n\nprogram.parse(process.argv)\n"],"names":["path","name","value"],"mappings":";;;;;;;;;;;;;;;;;AAIA,IAAI,IAAA,CAAA;AACG,SAAS,OAAU,GAAA;AACxB,EAAI,IAAA,IAAA;AAAM,IAAO,OAAA,IAAA,CAAA;AAEjB,EAAM,MAAA,UAAA,GAAa,OAAQ,CAAA,cAAA,CAAe,MAAM,CAAA,CAAA;AAChD,EAAA,IAAA,GAAO,UACH,GAAA,IAAA,CAAK,UAAW,CAAA,UAAU,CACxB,GAAA,UAAA,GACA,IAAK,CAAA,OAAA,CAAQ,OAAQ,CAAA,GAAA,EAAO,EAAA,UAAU,CACxC,GAAA,KAAA,CAAA,CAAA;AACJ,EAAO,OAAA,IAAA,CAAA;AACT;;ACVA,IAAI,EAAA,CAAA;AACJ,IAAI,YAAe,GAAA,KAAA,CAAA;AAEZ,SAAS,KAAQ,GAAA;AACtB,EAAI,IAAA,EAAA;AAAI,IAAO,OAAA,EAAE,IAAI,YAAa,EAAA,CAAA;AAElC,EAAA,MAAM,OAAO,OAAQ,EAAA,CAAA;AACrB,EAAA,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AAK,EAAA,kBAAkB,GAAG,wBAAwB,CAAA,CAAA;AAAA,KAC7E,SAAA;AACA,MAAA,EAAA,CAAG,UAAW,CAAA,IAAA,CAAK,IAAK,CAAA,GAAA,EAAK,cAAc,CAAC,CAAA,CAAA;AAC5C,MAAG,EAAA,CAAA,UAAA,CAAW,IAAK,CAAA,IAAA,CAAK,GAAK,EAAA,kBAAkB,GAAG,IAAK,CAAA,IAAA,CAAK,GAAK,EAAA,cAAc,CAAC,CAAA,CAAA;AAAA,KAClF;AAAA,GACF;AACA,EAAW,UAAA,EAAA,CAAA;AACb,CAAC,CAAA;;AClFH,OAAQ,CAAA,KAAA,CAAM,QAAQ,IAAI,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ 'use strict';
2
+
1
3
  const defineConfig = (config) => config;
2
4
 
3
- export { defineConfig };
5
+ exports.defineConfig = defineConfig;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type {} from './commands/base'\nimport type {} from './commands/build'\nimport type {} from './commands/init'\nimport type {} from './commands/publish'\n\nexport interface Config {}\n\nexport const defineConfig = (config: Config) => config\n"],"names":[],"mappings":";;AAOa,MAAA,YAAA,GAAe,CAAC,MAAmB,KAAA;;;;"}
package/dist/index.min.js CHANGED
@@ -1 +1 @@
1
- const o=o=>o;export{o as defineConfig};
1
+ "use strict";exports.defineConfig=e=>e;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.min.js","sources":["../src/index.ts"],"sourcesContent":["import type {} from './commands/base'\nimport type {} from './commands/build'\nimport type {} from './commands/init'\nimport type {} from './commands/publish'\n\nexport interface Config {}\n\nexport const defineConfig = (config: Config) => config\n"],"names":["config"],"mappings":"kCAO6BA,GAAmBA"}
@@ -0,0 +1 @@
1
+ const o=o=>o;export{o as defineConfig};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.min.mjs","sources":["../src/index.ts"],"sourcesContent":["import type {} from './commands/base'\nimport type {} from './commands/build'\nimport type {} from './commands/init'\nimport type {} from './commands/publish'\n\nexport interface Config {}\n\nexport const defineConfig = (config: Config) => config\n"],"names":["defineConfig","config"],"mappings":"AAOa,MAAAA,EAAgBC,GAAmBA"}
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ const defineConfig = (config) => config;
2
+
3
+ export { defineConfig };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import type {} from './commands/base'\nimport type {} from './commands/build'\nimport type {} from './commands/init'\nimport type {} from './commands/publish'\n\nexport interface Config {}\n\nexport const defineConfig = (config: Config) => config\n"],"names":[],"mappings":"AAOa,MAAA,YAAA,GAAe,CAAC,MAAmB,KAAA;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}