@datamitsu/datamitsu 0.4.0 → 0.5.0

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.
package/lib/index.d.ts CHANGED
@@ -192,7 +192,7 @@ type LintResult = ToolCommandResult;
192
192
  export declare const lint: (options?: ToolCommandOptions) => Promise<ToolCommandResult>;
193
193
  //#endregion
194
194
  //#region src/index.d.ts
195
- declare const _default: {
195
+ declare const api: {
196
196
  cache: {
197
197
  readonly clear: (options?: CacheClearOptions) => Promise<CacheClearResult>;
198
198
  readonly path: () => Promise<CachePathResult>;
@@ -205,5 +205,5 @@ declare const _default: {
205
205
  version: typeof version;
206
206
  };
207
207
  //#endregion
208
- export { type CacheClearOptions, type CacheClearResult, type CachePathProjectOptions, type CachePathResult, type CheckOptions, type CheckResult, type ExecOptions, type ExecResult, type FixOptions, type FixResult, type GroupJSON, type LintOptions, type LintResult, type ParallelGroupJSON, type PlanJSON, type SpawnRaw, type TaskJSON, type ToolInfo, type VersionResult, _default as default };
208
+ export { type CacheClearOptions, type CacheClearResult, type CachePathProjectOptions, type CachePathResult, type CheckOptions, type CheckResult, type ExecOptions, type ExecResult, type FixOptions, type FixResult, type GroupJSON, type LintOptions, type LintResult, type ParallelGroupJSON, type PlanJSON, type SpawnRaw, type TaskJSON, type ToolInfo, type VersionResult, api as default };
209
209
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/tool-command.ts","../src/commands/check.ts","../src/commands/exec.ts","../src/commands/version.ts","../src/commands/cache.ts","../src/commands/fix.ts","../src/commands/lint.ts","../src/index.ts"],"mappings":";UAAiB;EACf,gBAAgB;EAChB;;UAGe;EACf;EACA,OAAO;;UAGQ;EACf;EACA,QAAQ;EACR;EACA;;;;EAIA,SAAS;;UAGM;EACf;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;UC1Ce;EACf;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe,2BAA2B;EAC1C;EACA;;KAGU;EACN;EAAe;EAAkB,KAAK;EAAU;;EAChD;EAAkB,KAAK;EAAU;;EACjC;EAAgB,KAAK;EAAU;;EAC/B,MAAM;EAAU,KAAK;EAAU;;;;KClBzB,eAAe;KAEf;EACN;EAAe;EAAkB,KAAK;EAAU;;EAChD;EAAkB,KAAK;EAAU;;EACjC;EAAgB,KAAK;EAAU;;EAC/B,MAAM;EAAU,OAAO;EAAY,KAAK;EAAU;;wBAIlC,MAAM,UAAS,eAAoB,QAAQ;;;UCZhD;EACf;EACA;EACA;EACA;EACA;EACA;;KAGU;EACN;EAAe;EAAkB,KAAK;EAAU;;EAChD;EAAkB,KAAK;EAAU;EAAgB;EAAgB;;EACjE,KAAK;EAAU;EAAe,OAAO;;UAE1B;EACf;EACA;EACA;;wBAGoB,KAAK,kBAAkB,UAAS,cAAmB,QAAQ;wBA6CjE,cAAc,iBAAiB;;;KCjEnC;EACN;EAAe;EAAkB,KAAK;EAAU;;EAChD,KAAK;EAAU;EAAe;;wBAEd,WAAW,QAAQ;;;UCJxB;EACf;EACA;EACA;;KAGU;EACN;EAAe;EAAkB,KAAK;EAAU;;EAChD;EAAiB,KAAK;EAAU;;UAErB;EACf;;KAGU;EACN;EAAe;EAAkB,KAAK;EAAU;;EAChD;EAAc,KAAK;EAAU;;qBAEtB;WACU,QAAA,UAAA,sBAAyB,QAAQ;WA8BxC,YAAA,QAAQ;WAmBK,cAAA,UAAA,4BAA+B,QAAQ;;;;KClExD,aAAa;KACb,YAAY;qBAEX,MAAG,UAAA,uBAAA,QAAA;;;KCHJ,cAAc;KACd,aAAa;qBAEZ,OAAI,UAAA,uBAAA,QAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/tool-command.ts","../src/commands/check.ts","../src/commands/exec.ts","../src/commands/version.ts","../src/commands/cache.ts","../src/commands/fix.ts","../src/commands/lint.ts","../src/index.ts"],"mappings":";UAAiB;EACf,gBAAgB;EAChB;;UAGe;EACf;EACA,OAAO;;UAGQ;EACf;EACA,QAAQ;EACR;EACA;;;;EAIA,SAAS;;UAGM;EACf;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;UC1Ce;EACf;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe,2BAA2B;EAC1C;EACA;;KAGU;EACN;EAAe;EAAkB,KAAK;EAAU;;EAChD;EAAkB,KAAK;EAAU;;EACjC;EAAgB,KAAK;EAAU;;EAC/B,MAAM;EAAU,KAAK;EAAU;;;;KClBzB,eAAe;KAEf;EACN;EAAe;EAAkB,KAAK;EAAU;;EAChD;EAAkB,KAAK;EAAU;;EACjC;EAAgB,KAAK;EAAU;;EAC/B,MAAM;EAAU,OAAO;EAAY,KAAK;EAAU;;wBAIlC,MAAM,UAAS,eAAoB,QAAQ;;;UCZhD;EACf;EACA;EACA;EACA;EACA;EACA;;KAGU;EACN;EAAe;EAAkB,KAAK;EAAU;;EAChD;EAAkB,KAAK;EAAU;EAAgB;EAAgB;;EACjE,KAAK;EAAU;EAAe,OAAO;;UAE1B;EACf;EACA;EACA;;wBAGoB,KAAK,kBAAkB,UAAS,cAAmB,QAAQ;wBA6CjE,cAAc,iBAAiB;;;KCjEnC;EACN;EAAe;EAAkB,KAAK;EAAU;;EAChD,KAAK;EAAU;EAAe;;wBAEd,WAAW,QAAQ;;;UCJxB;EACf;EACA;EACA;;KAGU;EACN;EAAe;EAAkB,KAAK;EAAU;;EAChD;EAAiB,KAAK;EAAU;;UAErB;EACf;;KAGU;EACN;EAAe;EAAkB,KAAK;EAAU;;EAChD;EAAc,KAAK;EAAU;;qBAEtB;WACU,QAAA,UAAA,sBAAyB,QAAQ;WA8BxC,YAAA,QAAQ;WAmBK,cAAA,UAAA,4BAA+B,QAAQ;;;;KClExD,aAAa;KACb,YAAY;qBAEX,MAAG,UAAA,uBAAA,QAAA;;;KCHJ,cAAc;KACd,aAAa;qBAEZ,OAAI,UAAA,uBAAA,QAAA;;;cCFX;;+BAAA"}
package/lib/index.js CHANGED
@@ -272,7 +272,7 @@ async function exec(appName, options = {}) {
272
272
  success: true
273
273
  };
274
274
  }
275
- const ANSI_PATTERN = new RegExp(`${String.fromCodePoint(27)}\\[[0-9;]*m`, "g");
275
+ const ANSI_PATTERN = new RegExp(`${String.fromCharCode(27)}\\[[0-9;]*m`, "g");
276
276
  function parseToolList(output) {
277
277
  if (!output || !output.trim()) return [];
278
278
  const tools = [];
@@ -327,7 +327,7 @@ async function version() {
327
327
  }
328
328
  //#endregion
329
329
  //#region src/index.ts
330
- var src_default = {
330
+ const api = {
331
331
  cache,
332
332
  check,
333
333
  exec,
@@ -336,6 +336,6 @@ var src_default = {
336
336
  version
337
337
  };
338
338
  //#endregion
339
- export { cache, check, src_default as default, exec, fix, lint, parseToolList, version };
339
+ export { cache, check, api as default, exec, fix, lint, parseToolList, version };
340
340
 
341
341
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["buildArguments","buildArguments"],"sources":["../../../packaging/npm/datamitsu/get-exe.js","../src/spawn.ts","../src/commands/cache.ts","../src/json.ts","../src/tool-command.ts","../src/commands/check.ts","../src/commands/exec.ts","../src/commands/fix.ts","../src/commands/lint.ts","../src/commands/version.ts","../src/index.ts"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport { dirname, join } from \"node:path\";\n\nexport function getExePath() {\n const extension = process.platform === \"win32\" ? \".exe\" : \"\";\n const packageName = `@datamitsu/datamitsu-${process.platform}-${process.arch}`;\n const exeName = `datamitsu${extension}`;\n\n try {\n const require = createRequire(import.meta.url);\n const packageJson = require.resolve(`${packageName}/package.json`);\n const exePath = join(dirname(packageJson), exeName);\n\n if (existsSync(exePath)) {\n return exePath;\n }\n } catch {\n // Package not found\n }\n\n throw new Error(\n `datamitsu binary not found for platform ${process.platform}-${process.arch}.\\n` +\n `Please make sure the package \"${packageName}\" is installed.\\n` +\n `If you're seeing this error, try reinstalling: npm install @datamitsu/datamitsu`,\n );\n}\n","import { getExePath } from \"@datamitsu/datamitsu/get-exe.js\";\nimport { x } from \"tinyexec\";\n\nimport type { SpawnRaw } from \"./types.js\";\n\nexport interface SpawnOptions {\n cwd?: string;\n stdio?: \"inherit\" | \"pipe\";\n}\n\nexport async function spawn(arguments_: string[], options: SpawnOptions = {}): Promise<SpawnRaw> {\n const { cwd, stdio = \"pipe\" } = options;\n\n const binaryPath = getExePath();\n const fullArguments = [\"--binary-command\", \"datamitsu\", ...arguments_];\n\n let result;\n try {\n result = await x(binaryPath, fullArguments, {\n nodeOptions: { cwd, stdio },\n throwOnError: false,\n });\n } catch (error) {\n throw new Error(\n `Failed to execute datamitsu binary at ${binaryPath}: ${(error as Error).message}`,\n {\n cause: error,\n },\n );\n }\n\n return {\n exitCode: result.exitCode ?? 1,\n failed: result.exitCode !== 0,\n stderr: result.stderr ?? \"\",\n stdout: result.stdout ?? \"\",\n };\n}\n","import type { SpawnRaw } from \"../types.js\";\n\nimport { spawn } from \"../spawn.js\";\n\nexport interface CacheClearOptions {\n all?: boolean;\n cwd?: string;\n dryRun?: boolean;\n}\n\nexport type CacheClearResult =\n | { error: string; exitCode: number; raw: SpawnRaw; success: false }\n | { message: string; raw: SpawnRaw; success: true };\n\nexport interface CachePathProjectOptions {\n cwd?: string;\n}\n\nexport type CachePathResult =\n | { error: string; exitCode: number; raw: SpawnRaw; success: false }\n | { path: string; raw: SpawnRaw; success: true };\n\nexport const cache = {\n async clear(options: CacheClearOptions = {}): Promise<CacheClearResult> {\n const { all = false, cwd, dryRun = false } = options;\n const arguments_ = [\"cache\", \"clear\"];\n\n if (all) {\n arguments_.push(\"--all\");\n }\n\n if (dryRun) {\n arguments_.push(\"--dry-run\");\n }\n\n const raw = await spawn(arguments_, cwd ? { cwd } : {});\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n return {\n message: raw.stdout.trim(),\n raw,\n success: true,\n };\n },\n\n async path(): Promise<CachePathResult> {\n const raw = await spawn([\"cache\", \"path\"]);\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n return {\n path: raw.stdout.trim(),\n raw,\n success: true,\n };\n },\n\n async pathProject(options: CachePathProjectOptions = {}): Promise<CachePathResult> {\n const { cwd } = options;\n const raw = await spawn([\"cache\", \"path\", \"project\"], cwd ? { cwd } : {});\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n return {\n path: raw.stdout.trim(),\n raw,\n success: true,\n };\n },\n} as const;\n","export function extractAllJSON(output: string): string[] {\n if (!output) {\n return [];\n }\n const results: string[] = [];\n let pos = 0;\n while (pos < output.length) {\n const start = output.indexOf(\"{\", pos);\n if (start === -1) {\n break;\n }\n const end = findJSONEnd(output, start);\n if (end === -1) {\n break;\n }\n results.push(output.slice(start, end + 1));\n pos = end + 1;\n }\n return results;\n}\n\nexport function extractJSON(output: string): null | string {\n if (!output) {\n return null;\n }\n const start = output.indexOf(\"{\");\n if (start === -1) {\n return null;\n }\n const end = findJSONEnd(output, start);\n if (end === -1) {\n return null;\n }\n return output.slice(start, end + 1);\n}\n\nfunction findJSONEnd(output: string, start: number): number {\n let depth = 0;\n let isInString = false;\n let isEscape = false;\n for (let index = start; index < output.length; index++) {\n const ch = output[index];\n if (isEscape) {\n isEscape = false;\n } else if (isInString) {\n if (ch === \"\\\\\") {\n isEscape = true;\n } else if (ch === '\"') {\n isInString = false;\n }\n } else {\n switch (ch) {\n case '\"': {\n isInString = true;\n\n break;\n }\n case \"{\": {\n depth++;\n\n break;\n }\n case \"}\": {\n depth--;\n if (depth === 0) {\n return index;\n }\n\n break;\n }\n // No default\n }\n }\n }\n return -1;\n}\n","import type { PlanJSON, SpawnRaw } from \"./types.js\";\n\nimport { extractJSON } from \"./json.js\";\nimport { spawn } from \"./spawn.js\";\n\nexport interface BaseOptions {\n beforeConfig?: string[];\n config?: string[];\n explain?: \"detailed\" | \"json\" | \"summary\" | \"text\" | boolean;\n files?: string[];\n fileScoped?: boolean;\n noAutoConfig?: boolean;\n tools?: string[];\n}\n\nexport interface ToolCommandOptions extends BaseOptions {\n cwd?: string;\n stdio?: \"inherit\" | \"pipe\";\n}\n\nexport type ToolCommandResult =\n | { error: string; exitCode: number; raw: SpawnRaw; success: false }\n | { exitCode: number; raw: SpawnRaw; success: true }\n | { output: string; raw: SpawnRaw; success: true }\n | { plan: PlanJSON; raw: SpawnRaw; success: true };\n\nexport function buildArguments(commandName: string, options: BaseOptions = {}): string[] {\n const {\n beforeConfig = [],\n config = [],\n explain = false,\n files = [],\n fileScoped = false,\n noAutoConfig = false,\n tools = [],\n } = options;\n\n const arguments_: string[] = [commandName];\n\n if (explain === true) {\n arguments_.push(\"--explain\");\n } else if (explain) {\n arguments_.push(`--explain=${explain}`);\n }\n\n if (fileScoped) {\n arguments_.push(\"--file-scoped\");\n }\n\n if (tools.length > 0) {\n arguments_.push(\"--tools\", tools.join(\",\"));\n }\n\n for (const c of config) {\n arguments_.push(\"--config\", c);\n }\n\n for (const bc of beforeConfig) {\n arguments_.push(\"--before-config\", bc);\n }\n\n if (noAutoConfig) {\n arguments_.push(\"--no-auto-config\");\n }\n\n arguments_.push(...files);\n\n return arguments_;\n}\n\nexport function createToolCommand(\n commandName: string,\n): (options?: ToolCommandOptions) => Promise<ToolCommandResult> {\n return async function (options: ToolCommandOptions = {}): Promise<ToolCommandResult> {\n const { explain = false } = options;\n const arguments_ = buildArguments(commandName, options);\n const spawnOptions: { cwd?: string; stdio?: \"inherit\" | \"pipe\" } = {};\n if (options.cwd !== undefined) {\n spawnOptions.cwd = options.cwd;\n }\n if (options.stdio !== undefined) {\n spawnOptions.stdio = options.stdio;\n }\n const raw = await spawn(arguments_, spawnOptions);\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n if (explain === \"json\") {\n try {\n const jsonString = extractJSON(raw.stdout) || raw.stdout;\n const plan: PlanJSON = JSON.parse(jsonString);\n return { plan, raw, success: true };\n } catch {\n return {\n error: `Failed to parse JSON output: ${raw.stdout}`,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n }\n\n if (explain) {\n return { output: raw.stdout, raw, success: true };\n }\n\n return { exitCode: raw.exitCode, raw, success: true };\n };\n}\n","import type { PlanJSON, SpawnRaw } from \"../types.js\";\n\nimport { extractAllJSON } from \"../json.js\";\nimport { spawn } from \"../spawn.js\";\nimport { buildArguments, createToolCommand, type ToolCommandOptions } from \"../tool-command.js\";\n\nexport type CheckOptions = ToolCommandOptions;\n\nexport type CheckResult =\n | { error: string; exitCode: number; raw: SpawnRaw; success: false }\n | { exitCode: number; raw: SpawnRaw; success: true }\n | { output: string; raw: SpawnRaw; success: true }\n | { plan: PlanJSON; plans: PlanJSON[]; raw: SpawnRaw; success: true };\n\nconst baseCheck = createToolCommand(\"check\");\n\nexport async function check(options: CheckOptions = {}): Promise<CheckResult> {\n if (options.explain !== \"json\") {\n return baseCheck(options) as Promise<CheckResult>;\n }\n\n const arguments_ = buildArguments(\"check\", options);\n const spawnOptions: { cwd?: string; stdio?: \"inherit\" | \"pipe\" } = {};\n if (options.cwd !== undefined) {\n spawnOptions.cwd = options.cwd;\n }\n if (options.stdio !== undefined) {\n spawnOptions.stdio = options.stdio;\n }\n const raw = await spawn(arguments_, spawnOptions);\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n try {\n const jsonStrings = extractAllJSON(raw.stdout);\n if (jsonStrings.length === 0) {\n throw new Error(\"No JSON found\");\n }\n const plans: PlanJSON[] = jsonStrings.map((s) => JSON.parse(s));\n return { plan: plans[0]!, plans, raw, success: true };\n } catch {\n return {\n error: `Failed to parse JSON output: ${raw.stdout}`,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n}\n","import type { SpawnRaw } from \"../types.js\";\n\nimport { spawn } from \"../spawn.js\";\n\nexport interface ExecOptions {\n args?: string[];\n beforeConfig?: string[];\n config?: string[];\n cwd?: string;\n noAutoConfig?: boolean;\n stdio?: \"inherit\" | \"pipe\";\n}\n\nexport type ExecResult =\n | { error: string; exitCode: number; raw: SpawnRaw; success: false }\n | { exitCode: number; raw: SpawnRaw; stderr: string; stdout: string; success: true }\n | { raw: SpawnRaw; success: true; tools: ToolInfo[] };\n\nexport interface ToolInfo {\n details: string;\n name: string;\n type: string;\n}\n\nexport async function exec(appName?: string, options: ExecOptions = {}): Promise<ExecResult> {\n const spawnArguments = buildArguments(appName, options);\n const spawnOptions: { cwd?: string; stdio?: \"inherit\" | \"pipe\" } = {};\n if (options.cwd !== undefined) {\n spawnOptions.cwd = options.cwd;\n }\n if (options.stdio !== undefined) {\n spawnOptions.stdio = options.stdio;\n }\n const raw = await spawn(spawnArguments, spawnOptions);\n\n if (!appName) {\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n const tools = parseToolList(raw.stdout);\n return { raw, success: true, tools };\n }\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n return {\n exitCode: raw.exitCode,\n raw,\n stderr: raw.stderr,\n stdout: raw.stdout,\n success: true,\n };\n}\n\nconst ESC = String.fromCodePoint(0x1b);\nconst ANSI_PATTERN = new RegExp(`${ESC}\\\\[[0-9;]*m`, \"g\");\n\nexport function parseToolList(output: string): ToolInfo[] {\n if (!output || !output.trim()) {\n return [];\n }\n\n const tools: ToolInfo[] = [];\n let currentType: null | string = null;\n const typePattern = /^\\[(binary|uv|node|jvm|go|shell)\\]$/;\n const toolPattern = /^ {2}(\\S+)(?:[ \\t]{2,}(\\S.*))?$/;\n\n const lines = output.split(\"\\n\").map((line) => line.replace(ANSI_PATTERN, \"\"));\n for (const line of lines) {\n const typeMatch = line.match(typePattern);\n if (typeMatch?.[1]) {\n currentType = typeMatch[1];\n } else if (currentType) {\n const toolMatch = line.match(toolPattern);\n if (toolMatch?.[1]) {\n tools.push({\n details: toolMatch[2] || \"\",\n name: toolMatch[1],\n type: currentType,\n });\n }\n }\n }\n\n return tools;\n}\n\nfunction buildArguments(appName: string | undefined, options: ExecOptions = {}): string[] {\n const { args: arguments_ = [], beforeConfig = [], config = [], noAutoConfig = false } = options;\n\n const spawnArguments = [\"exec\"];\n\n for (const c of config) {\n spawnArguments.push(\"--config\", c);\n }\n\n for (const bc of beforeConfig) {\n spawnArguments.push(\"--before-config\", bc);\n }\n\n if (noAutoConfig) {\n spawnArguments.push(\"--no-auto-config\");\n }\n\n if (appName) {\n spawnArguments.push(appName, ...arguments_);\n }\n\n return spawnArguments;\n}\n","import {\n createToolCommand,\n type ToolCommandOptions,\n type ToolCommandResult,\n} from \"../tool-command.js\";\n\nexport type FixOptions = ToolCommandOptions;\nexport type FixResult = ToolCommandResult;\n\nexport const fix = createToolCommand(\"fix\");\n","import {\n createToolCommand,\n type ToolCommandOptions,\n type ToolCommandResult,\n} from \"../tool-command.js\";\n\nexport type LintOptions = ToolCommandOptions;\nexport type LintResult = ToolCommandResult;\n\nexport const lint = createToolCommand(\"lint\");\n","import type { SpawnRaw } from \"../types.js\";\n\nimport { spawn } from \"../spawn.js\";\n\nexport type VersionResult =\n | { error: string; exitCode: number; raw: SpawnRaw; success: false }\n | { raw: SpawnRaw; success: true; version: string };\n\nexport async function version(): Promise<VersionResult> {\n const raw = await spawn([\"version\"]);\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n const output = raw.stdout.trim().split(\"\\n\", 1)[0] ?? \"\";\n const versionString = output.replace(/^.*version\\s+/, \"\");\n return {\n raw,\n success: true,\n version: versionString,\n };\n}\n","import { cache } from \"./commands/cache.js\";\nimport { check } from \"./commands/check.js\";\nimport { exec } from \"./commands/exec.js\";\nimport { fix } from \"./commands/fix.js\";\nimport { lint } from \"./commands/lint.js\";\nimport { version } from \"./commands/version.js\";\n\nexport default { cache, check, exec, fix, lint, version };\nexport { cache } from \"./commands/cache.js\";\nexport type {\n CacheClearOptions,\n CacheClearResult,\n CachePathProjectOptions,\n CachePathResult,\n} from \"./commands/cache.js\";\nexport { check } from \"./commands/check.js\";\nexport type { CheckOptions, CheckResult } from \"./commands/check.js\";\nexport { exec, parseToolList } from \"./commands/exec.js\";\nexport type { ExecOptions, ExecResult, ToolInfo } from \"./commands/exec.js\";\nexport { fix } from \"./commands/fix.js\";\nexport type { FixOptions, FixResult } from \"./commands/fix.js\";\nexport { lint } from \"./commands/lint.js\";\nexport type { LintOptions, LintResult } from \"./commands/lint.js\";\nexport { version } from \"./commands/version.js\";\nexport type { VersionResult } from \"./commands/version.js\";\nexport type { GroupJSON, ParallelGroupJSON, PlanJSON, SpawnRaw, TaskJSON } from \"./types.js\";\n"],"mappings":";;;;;AAIA,SAAgB,aAAa;CAC3B,MAAM,YAAY,QAAQ,aAAa,UAAU,SAAS;CAC1D,MAAM,cAAc,wBAAwB,QAAQ,SAAS,GAAG,QAAQ;CACxE,MAAM,UAAU,YAAY;CAE5B,IAAI;EAEF,MAAM,cADU,cAAc,YAAY,GAChB,CAAC,CAAC,QAAQ,GAAG,YAAY,cAAc;EACjE,MAAM,UAAU,KAAK,QAAQ,WAAW,GAAG,OAAO;EAElD,IAAI,WAAW,OAAO,GACpB,OAAO;CAEX,QAAQ,CAER;CAEA,MAAM,IAAI,MACR,2CAA2C,QAAQ,SAAS,GAAG,QAAQ,KAAK,mCACzC,YAAY,iGAEjD;AACF;;;AChBA,eAAsB,MA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eAAe,KAAK,YAAY,CAAC;CAGnC,KAAK,MAAM,MAAM,cACf,eAAe,KAAK,mBAAmB,EAAE;CAG3C,IAAI,cACF,eAAe,KAAK,kBAAkB;CAGxC,IAAI,SACF,eAAe,KAAK,SAAS,GAAG,UAAU;CAG5C,OAAO;AACT;;;AChHA,MAAa,MAAM,kBAAkB,KAAK;;;ACA1C,MAAa,OAAO,kBAAkB,MAAM;;;ACD5C,eAAsB,UAAkC;CACtD,MAAM,MAAM,MAAM,MAAM,CAAC,SAAS,CAAC;CAEnC,IAAI,IAAI,QACN,OAAO;EACL,OAAO,IAAI,UAAU,IAAI;EACzB,UAAU,IAAI;EACd;EACA,SAAS;CACX;CAKF,OAAO;EACL;EACA,SAAS;EACT,UALa,IAAI,OAAO,KAAK,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC,MAAM,GAAA,CACzB,QAAQ,iBAAiB,EAI/B;CACvB;AACF;;;ACpBA,IAAA,cAAe;CAAE;CAAO;CAAO;CAAM;CAAK;CAAM;AAAQ"}
1
+ {"version":3,"file":"index.js","names":["buildArguments","buildArguments"],"sources":["../../../packaging/npm/datamitsu/get-exe.js","../src/spawn.ts","../src/commands/cache.ts","../src/json.ts","../src/tool-command.ts","../src/commands/check.ts","../src/commands/exec.ts","../src/commands/fix.ts","../src/commands/lint.ts","../src/commands/version.ts","../src/index.ts"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport { dirname, join } from \"node:path\";\n\nexport function getExePath() {\n const extension = process.platform === \"win32\" ? \".exe\" : \"\";\n const packageName = `@datamitsu/datamitsu-${process.platform}-${process.arch}`;\n const exeName = `datamitsu${extension}`;\n\n try {\n const require = createRequire(import.meta.url);\n const packageJson = require.resolve(`${packageName}/package.json`);\n const exePath = join(dirname(packageJson), exeName);\n\n if (existsSync(exePath)) {\n return exePath;\n }\n } catch {\n // Package not found\n }\n\n throw new Error(\n `datamitsu binary not found for platform ${process.platform}-${process.arch}.\\n` +\n `Please make sure the package \"${packageName}\" is installed.\\n` +\n `If you're seeing this error, try reinstalling: npm install @datamitsu/datamitsu`,\n );\n}\n","import { getExePath } from \"@datamitsu/datamitsu/get-exe.js\";\nimport { x } from \"tinyexec\";\n\nimport type { SpawnRaw } from \"./types.js\";\n\nexport interface SpawnOptions {\n cwd?: string;\n stdio?: \"inherit\" | \"pipe\";\n}\n\nexport async function spawn(arguments_: string[], options: SpawnOptions = {}): Promise<SpawnRaw> {\n const { cwd, stdio = \"pipe\" } = options;\n\n const binaryPath = getExePath();\n const fullArguments = [\"--binary-command\", \"datamitsu\", ...arguments_];\n\n let result;\n try {\n result = await x(binaryPath, fullArguments, {\n nodeOptions: { cwd, stdio },\n throwOnError: false,\n });\n } catch (error) {\n throw new Error(\n `Failed to execute datamitsu binary at ${binaryPath}: ${(error as Error).message}`,\n {\n cause: error,\n },\n );\n }\n\n return {\n exitCode: result.exitCode ?? 1,\n failed: result.exitCode !== 0,\n stderr: result.stderr ?? \"\",\n stdout: result.stdout ?? \"\",\n };\n}\n","import type { SpawnRaw } from \"../types.js\";\n\nimport { spawn } from \"../spawn.js\";\n\nexport interface CacheClearOptions {\n all?: boolean;\n cwd?: string;\n dryRun?: boolean;\n}\n\nexport type CacheClearResult =\n | { error: string; exitCode: number; raw: SpawnRaw; success: false }\n | { message: string; raw: SpawnRaw; success: true };\n\nexport interface CachePathProjectOptions {\n cwd?: string;\n}\n\nexport type CachePathResult =\n | { error: string; exitCode: number; raw: SpawnRaw; success: false }\n | { path: string; raw: SpawnRaw; success: true };\n\nexport const cache = {\n async clear(options: CacheClearOptions = {}): Promise<CacheClearResult> {\n const { all = false, cwd, dryRun = false } = options;\n const arguments_ = [\"cache\", \"clear\"];\n\n if (all) {\n arguments_.push(\"--all\");\n }\n\n if (dryRun) {\n arguments_.push(\"--dry-run\");\n }\n\n const raw = await spawn(arguments_, cwd ? { cwd } : {});\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n return {\n message: raw.stdout.trim(),\n raw,\n success: true,\n };\n },\n\n async path(): Promise<CachePathResult> {\n const raw = await spawn([\"cache\", \"path\"]);\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n return {\n path: raw.stdout.trim(),\n raw,\n success: true,\n };\n },\n\n async pathProject(options: CachePathProjectOptions = {}): Promise<CachePathResult> {\n const { cwd } = options;\n const raw = await spawn([\"cache\", \"path\", \"project\"], cwd ? { cwd } : {});\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n return {\n path: raw.stdout.trim(),\n raw,\n success: true,\n };\n },\n} as const;\n","export function extractAllJSON(output: string): string[] {\n if (!output) {\n return [];\n }\n const results: string[] = [];\n let pos = 0;\n while (pos < output.length) {\n const start = output.indexOf(\"{\", pos);\n if (start === -1) {\n break;\n }\n const end = findJSONEnd(output, start);\n if (end === -1) {\n break;\n }\n results.push(output.slice(start, end + 1));\n pos = end + 1;\n }\n return results;\n}\n\nexport function extractJSON(output: string): null | string {\n if (!output) {\n return null;\n }\n const start = output.indexOf(\"{\");\n if (start === -1) {\n return null;\n }\n const end = findJSONEnd(output, start);\n if (end === -1) {\n return null;\n }\n return output.slice(start, end + 1);\n}\n\nfunction findJSONEnd(output: string, start: number): number {\n let depth = 0;\n let isInString = false;\n let isEscape = false;\n for (let index = start; index < output.length; index++) {\n const ch = output[index];\n if (isEscape) {\n isEscape = false;\n } else if (isInString) {\n if (ch === \"\\\\\") {\n isEscape = true;\n } else if (ch === '\"') {\n isInString = false;\n }\n } else {\n switch (ch) {\n case '\"': {\n isInString = true;\n\n break;\n }\n case \"{\": {\n depth++;\n\n break;\n }\n case \"}\": {\n depth--;\n if (depth === 0) {\n return index;\n }\n\n break;\n }\n // No default\n }\n }\n }\n return -1;\n}\n","import type { PlanJSON, SpawnRaw } from \"./types.js\";\n\nimport { extractJSON } from \"./json.js\";\nimport { spawn } from \"./spawn.js\";\n\nexport interface BaseOptions {\n beforeConfig?: string[];\n config?: string[];\n explain?: \"detailed\" | \"json\" | \"summary\" | \"text\" | boolean;\n files?: string[];\n fileScoped?: boolean;\n noAutoConfig?: boolean;\n tools?: string[];\n}\n\nexport interface ToolCommandOptions extends BaseOptions {\n cwd?: string;\n stdio?: \"inherit\" | \"pipe\";\n}\n\nexport type ToolCommandResult =\n | { error: string; exitCode: number; raw: SpawnRaw; success: false }\n | { exitCode: number; raw: SpawnRaw; success: true }\n | { output: string; raw: SpawnRaw; success: true }\n | { plan: PlanJSON; raw: SpawnRaw; success: true };\n\nexport function buildArguments(commandName: string, options: BaseOptions = {}): string[] {\n const {\n beforeConfig = [],\n config = [],\n explain = false,\n files = [],\n fileScoped = false,\n noAutoConfig = false,\n tools = [],\n } = options;\n\n const arguments_: string[] = [commandName];\n\n if (explain === true) {\n arguments_.push(\"--explain\");\n } else if (explain) {\n arguments_.push(`--explain=${explain}`);\n }\n\n if (fileScoped) {\n arguments_.push(\"--file-scoped\");\n }\n\n if (tools.length > 0) {\n arguments_.push(\"--tools\", tools.join(\",\"));\n }\n\n for (const c of config) {\n arguments_.push(\"--config\", c);\n }\n\n for (const bc of beforeConfig) {\n arguments_.push(\"--before-config\", bc);\n }\n\n if (noAutoConfig) {\n arguments_.push(\"--no-auto-config\");\n }\n\n arguments_.push(...files);\n\n return arguments_;\n}\n\nexport function createToolCommand(\n commandName: string,\n): (options?: ToolCommandOptions) => Promise<ToolCommandResult> {\n return async function (options: ToolCommandOptions = {}): Promise<ToolCommandResult> {\n const { explain = false } = options;\n const arguments_ = buildArguments(commandName, options);\n const spawnOptions: { cwd?: string; stdio?: \"inherit\" | \"pipe\" } = {};\n if (options.cwd !== undefined) {\n spawnOptions.cwd = options.cwd;\n }\n if (options.stdio !== undefined) {\n spawnOptions.stdio = options.stdio;\n }\n const raw = await spawn(arguments_, spawnOptions);\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n if (explain === \"json\") {\n try {\n const jsonString = extractJSON(raw.stdout) || raw.stdout;\n const plan: PlanJSON = JSON.parse(jsonString);\n return { plan, raw, success: true };\n } catch {\n return {\n error: `Failed to parse JSON output: ${raw.stdout}`,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n }\n\n if (explain) {\n return { output: raw.stdout, raw, success: true };\n }\n\n return { exitCode: raw.exitCode, raw, success: true };\n };\n}\n","import type { PlanJSON, SpawnRaw } from \"../types.js\";\n\nimport { extractAllJSON } from \"../json.js\";\nimport { spawn } from \"../spawn.js\";\nimport { buildArguments, createToolCommand, type ToolCommandOptions } from \"../tool-command.js\";\n\nexport type CheckOptions = ToolCommandOptions;\n\nexport type CheckResult =\n | { error: string; exitCode: number; raw: SpawnRaw; success: false }\n | { exitCode: number; raw: SpawnRaw; success: true }\n | { output: string; raw: SpawnRaw; success: true }\n | { plan: PlanJSON; plans: PlanJSON[]; raw: SpawnRaw; success: true };\n\nconst baseCheck = createToolCommand(\"check\");\n\nexport async function check(options: CheckOptions = {}): Promise<CheckResult> {\n if (options.explain !== \"json\") {\n return baseCheck(options) as Promise<CheckResult>;\n }\n\n const arguments_ = buildArguments(\"check\", options);\n const spawnOptions: { cwd?: string; stdio?: \"inherit\" | \"pipe\" } = {};\n if (options.cwd !== undefined) {\n spawnOptions.cwd = options.cwd;\n }\n if (options.stdio !== undefined) {\n spawnOptions.stdio = options.stdio;\n }\n const raw = await spawn(arguments_, spawnOptions);\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n try {\n const jsonStrings = extractAllJSON(raw.stdout);\n if (jsonStrings.length === 0) {\n throw new Error(\"No JSON found\");\n }\n const plans: PlanJSON[] = jsonStrings.map((s) => JSON.parse(s));\n return { plan: plans[0]!, plans, raw, success: true };\n } catch {\n return {\n error: `Failed to parse JSON output: ${raw.stdout}`,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n}\n","import type { SpawnRaw } from \"../types.js\";\n\nimport { spawn } from \"../spawn.js\";\n\nexport interface ExecOptions {\n args?: string[];\n beforeConfig?: string[];\n config?: string[];\n cwd?: string;\n noAutoConfig?: boolean;\n stdio?: \"inherit\" | \"pipe\";\n}\n\nexport type ExecResult =\n | { error: string; exitCode: number; raw: SpawnRaw; success: false }\n | { exitCode: number; raw: SpawnRaw; stderr: string; stdout: string; success: true }\n | { raw: SpawnRaw; success: true; tools: ToolInfo[] };\n\nexport interface ToolInfo {\n details: string;\n name: string;\n type: string;\n}\n\nexport async function exec(appName?: string, options: ExecOptions = {}): Promise<ExecResult> {\n const spawnArguments = buildArguments(appName, options);\n const spawnOptions: { cwd?: string; stdio?: \"inherit\" | \"pipe\" } = {};\n if (options.cwd !== undefined) {\n spawnOptions.cwd = options.cwd;\n }\n if (options.stdio !== undefined) {\n spawnOptions.stdio = options.stdio;\n }\n const raw = await spawn(spawnArguments, spawnOptions);\n\n if (!appName) {\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n const tools = parseToolList(raw.stdout);\n return { raw, success: true, tools };\n }\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n return {\n exitCode: raw.exitCode,\n raw,\n stderr: raw.stderr,\n stdout: raw.stdout,\n success: true,\n };\n}\n\nconst ESC = String.fromCharCode(0x1b);\nconst ANSI_PATTERN = new RegExp(`${ESC}\\\\[[0-9;]*m`, \"g\");\n\nexport function parseToolList(output: string): ToolInfo[] {\n if (!output || !output.trim()) {\n return [];\n }\n\n const tools: ToolInfo[] = [];\n let currentType: null | string = null;\n const typePattern = /^\\[(binary|uv|node|jvm|go|shell)\\]$/;\n const toolPattern = /^ {2}(\\S+)(?:[ \\t]{2,}(\\S.*))?$/;\n\n const lines = output.split(\"\\n\").map((line) => line.replace(ANSI_PATTERN, \"\"));\n for (const line of lines) {\n const typeMatch = line.match(typePattern);\n if (typeMatch?.[1]) {\n currentType = typeMatch[1];\n } else if (currentType) {\n const toolMatch = line.match(toolPattern);\n if (toolMatch?.[1]) {\n tools.push({\n details: toolMatch[2] || \"\",\n name: toolMatch[1],\n type: currentType,\n });\n }\n }\n }\n\n return tools;\n}\n\nfunction buildArguments(appName: string | undefined, options: ExecOptions = {}): string[] {\n const { args: arguments_ = [], beforeConfig = [], config = [], noAutoConfig = false } = options;\n\n const spawnArguments = [\"exec\"];\n\n for (const c of config) {\n spawnArguments.push(\"--config\", c);\n }\n\n for (const bc of beforeConfig) {\n spawnArguments.push(\"--before-config\", bc);\n }\n\n if (noAutoConfig) {\n spawnArguments.push(\"--no-auto-config\");\n }\n\n if (appName) {\n spawnArguments.push(appName, ...arguments_);\n }\n\n return spawnArguments;\n}\n","import {\n createToolCommand,\n type ToolCommandOptions,\n type ToolCommandResult,\n} from \"../tool-command.js\";\n\nexport type FixOptions = ToolCommandOptions;\nexport type FixResult = ToolCommandResult;\n\nexport const fix = createToolCommand(\"fix\");\n","import {\n createToolCommand,\n type ToolCommandOptions,\n type ToolCommandResult,\n} from \"../tool-command.js\";\n\nexport type LintOptions = ToolCommandOptions;\nexport type LintResult = ToolCommandResult;\n\nexport const lint = createToolCommand(\"lint\");\n","import type { SpawnRaw } from \"../types.js\";\n\nimport { spawn } from \"../spawn.js\";\n\nexport type VersionResult =\n | { error: string; exitCode: number; raw: SpawnRaw; success: false }\n | { raw: SpawnRaw; success: true; version: string };\n\nexport async function version(): Promise<VersionResult> {\n const raw = await spawn([\"version\"]);\n\n if (raw.failed) {\n return {\n error: raw.stderr || raw.stdout,\n exitCode: raw.exitCode,\n raw,\n success: false,\n };\n }\n\n const output = raw.stdout.trim().split(\"\\n\", 1)[0] ?? \"\";\n const versionString = output.replace(/^.*version\\s+/, \"\");\n return {\n raw,\n success: true,\n version: versionString,\n };\n}\n","import { cache } from \"./commands/cache.js\";\nimport { check } from \"./commands/check.js\";\nimport { exec } from \"./commands/exec.js\";\nimport { fix } from \"./commands/fix.js\";\nimport { lint } from \"./commands/lint.js\";\nimport { version } from \"./commands/version.js\";\n\nconst api = { cache, check, exec, fix, lint, version };\n\nexport default api;\nexport { cache } from \"./commands/cache.js\";\nexport type {\n CacheClearOptions,\n CacheClearResult,\n CachePathProjectOptions,\n CachePathResult,\n} from \"./commands/cache.js\";\nexport { check } from \"./commands/check.js\";\nexport type { CheckOptions, CheckResult } from \"./commands/check.js\";\nexport { exec, parseToolList } from \"./commands/exec.js\";\nexport type { ExecOptions, ExecResult, ToolInfo } from \"./commands/exec.js\";\nexport { fix } from \"./commands/fix.js\";\nexport type { FixOptions, FixResult } from \"./commands/fix.js\";\nexport { lint } from \"./commands/lint.js\";\nexport type { LintOptions, LintResult } from \"./commands/lint.js\";\nexport { version } from \"./commands/version.js\";\nexport type { VersionResult } from \"./commands/version.js\";\nexport type { GroupJSON, ParallelGroupJSON, PlanJSON, SpawnRaw, TaskJSON } from \"./types.js\";\n"],"mappings":";;;;;AAIA,SAAgB,aAAa;CAC3B,MAAM,YAAY,QAAQ,aAAa,UAAU,SAAS;CAC1D,MAAM,cAAc,wBAAwB,QAAQ,SAAS,GAAG,QAAQ;CACxE,MAAM,UAAU,YAAY;CAE5B,IAAI;EAEF,MAAM,cADU,cAAc,YAAY,GAChB,CAAC,CAAC,QAAQ,GAAG,YAAY,cAAc;EACjE,MAAM,UAAU,KAAK,QAAQ,WAAW,GAAG,OAAO;EAElD,IAAI,WAAW,OAAO,GACpB,OAAO;CAEX,QAAQ,CAER;CAEA,MAAM,IAAI,MACR,2CAA2C,QAAQ,SAAS,GAAG,QAAQ,KAAK,mCACzC,YAAY,iGAEjD;AACF;;;AChBA,eAAsB,MAAM,YAAsB,UAAwB,CAAC,GAAsB;CAC/F,MAAM,EAAE,KAAK,QAAQ,WAAW;CAEhC,MAAM,aAA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,IAAI,cACF,eAAe,KAAK,kBAAkB;CAGxC,IAAI,SACF,eAAe,KAAK,SAAS,GAAG,UAAU;CAG5C,OAAO;AACT;;;AChHA,MAAa,MAAM,kBAAkB,KAAK;;;ACA1C,MAAa,OAAO,kBAAkB,MAAM;;;ACD5C,eAAsB,UAAkC;CACtD,MAAM,MAAM,MAAM,MAAM,CAAC,SAAS,CAAC;CAEnC,IAAI,IAAI,QACN,OAAO;EACL,OAAO,IAAI,UAAU,IAAI;EACzB,UAAU,IAAI;EACd;EACA,SAAS;CACX;CAKF,OAAO;EACL;EACA,SAAS;EACT,UALa,IAAI,OAAO,KAAK,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC,MAAM,GAAA,CACzB,QAAQ,iBAAiB,EAI/B;CACvB;AACF;;;ACpBA,MAAM,MAAM;CAAE;CAAO;CAAO;CAAM;CAAK;CAAM;AAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datamitsu/datamitsu",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Configuration management and binary distribution tool. JavaScript-configurable tool orchestration written in Go.",
5
5
  "keywords": [
6
6
  "datamitsu",
@@ -52,14 +52,14 @@
52
52
  "@shibanet0/datamitsu-config": "catalog:"
53
53
  },
54
54
  "optionalDependencies": {
55
- "@datamitsu/datamitsu-darwin-arm64": "0.4.0",
56
- "@datamitsu/datamitsu-darwin-x64": "0.4.0",
57
- "@datamitsu/datamitsu-freebsd-arm64": "0.4.0",
58
- "@datamitsu/datamitsu-freebsd-x64": "0.4.0",
59
- "@datamitsu/datamitsu-linux-arm64": "0.4.0",
60
- "@datamitsu/datamitsu-linux-x64": "0.4.0",
61
- "@datamitsu/datamitsu-win32-arm64": "0.4.0",
62
- "@datamitsu/datamitsu-win32-x64": "0.4.0"
55
+ "@datamitsu/datamitsu-darwin-arm64": "0.5.0",
56
+ "@datamitsu/datamitsu-darwin-x64": "0.5.0",
57
+ "@datamitsu/datamitsu-freebsd-arm64": "0.5.0",
58
+ "@datamitsu/datamitsu-freebsd-x64": "0.5.0",
59
+ "@datamitsu/datamitsu-linux-arm64": "0.5.0",
60
+ "@datamitsu/datamitsu-linux-x64": "0.5.0",
61
+ "@datamitsu/datamitsu-win32-arm64": "0.5.0",
62
+ "@datamitsu/datamitsu-win32-x64": "0.5.0"
63
63
  },
64
64
  "engines": {
65
65
  "node": ">=22.12.0"
package/parsers-oci.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "module": "core",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "ref": "ghcr.io/datamitsu/datamitsu-parsers",
5
- "tag": "0.4.0",
6
- "digest": "sha256:c243aef2a40723d2505355928ff01e92633c28aa59309a2608620250d51b1968",
7
- "sha256": "fabe13f65f86c8b31eac8c35969dbb046b54c9b46a5613e1f523193bf1a8594e"
5
+ "tag": "0.5.0",
6
+ "digest": "sha256:3fb800c2169c0f1a7e2edafa7c2b5dfd8ad6b52e152fe8f9bb6a940b29cc7208",
7
+ "sha256": "sha256:8cb27ccb976674b8e58494dc5e03ec1d14cdc54df10f3fa266b3a981e849d645"
8
8
  }