@datamitsu/datamitsu 0.2.2 → 0.3.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.
package/lib/index.d.ts CHANGED
@@ -98,7 +98,7 @@ type CheckResult = {
98
98
  raw: SpawnRaw;
99
99
  success: true;
100
100
  };
101
- declare function check(options?: CheckOptions): Promise<CheckResult>;
101
+ export declare function check(options?: CheckOptions): Promise<CheckResult>;
102
102
  //#endregion
103
103
  //#region src/commands/exec.d.ts
104
104
  interface ExecOptions {
@@ -130,8 +130,8 @@ interface ToolInfo {
130
130
  name: string;
131
131
  type: string;
132
132
  }
133
- declare function exec(appName?: string, options?: ExecOptions): Promise<ExecResult>;
134
- declare function parseToolList(output: string): ToolInfo[];
133
+ export declare function exec(appName?: string, options?: ExecOptions): Promise<ExecResult>;
134
+ export declare function parseToolList(output: string): ToolInfo[];
135
135
  //#endregion
136
136
  //#region src/commands/version.d.ts
137
137
  type VersionResult = {
@@ -144,7 +144,7 @@ type VersionResult = {
144
144
  success: true;
145
145
  version: string;
146
146
  };
147
- declare function version(): Promise<VersionResult>;
147
+ export declare function version(): Promise<VersionResult>;
148
148
  //#endregion
149
149
  //#region src/commands/cache.d.ts
150
150
  interface CacheClearOptions {
@@ -175,7 +175,7 @@ type CachePathResult = {
175
175
  raw: SpawnRaw;
176
176
  success: true;
177
177
  };
178
- declare const cache: {
178
+ export declare const cache: {
179
179
  readonly clear: (options?: CacheClearOptions) => Promise<CacheClearResult>;
180
180
  readonly path: () => Promise<CachePathResult>;
181
181
  readonly pathProject: (options?: CachePathProjectOptions) => Promise<CachePathResult>;
@@ -184,12 +184,12 @@ declare const cache: {
184
184
  //#region src/commands/fix.d.ts
185
185
  type FixOptions = ToolCommandOptions;
186
186
  type FixResult = ToolCommandResult;
187
- declare const fix: (options?: ToolCommandOptions) => Promise<ToolCommandResult>;
187
+ export declare const fix: (options?: ToolCommandOptions) => Promise<ToolCommandResult>;
188
188
  //#endregion
189
189
  //#region src/commands/lint.d.ts
190
190
  type LintOptions = ToolCommandOptions;
191
191
  type LintResult = ToolCommandResult;
192
- declare const lint: (options?: ToolCommandOptions) => Promise<ToolCommandResult>;
192
+ export declare const lint: (options?: ToolCommandOptions) => Promise<ToolCommandResult>;
193
193
  //#endregion
194
194
  //#region src/index.d.ts
195
195
  declare const _default: {
@@ -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, cache, check, _default as default, exec, fix, lint, parseToolList, version };
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 };
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;;iBAIlC,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;;iBAGoB,KAAK,kBAAkB,UAAS,cAAmB,QAAQ;iBA6CjE,cAAc,iBAAiB;;;KCjEnC;EACN;EAAe;EAAkB,KAAK;EAAU;;EAChD,KAAK;EAAU;EAAe;;iBAEd,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;;cAEtB;WACU,QAAA,UAAA,sBAAyB,QAAQ;WA8BxC,YAAA,QAAQ;WAmBK,cAAA,UAAA,4BAA+B,QAAQ;;;;KClExD,aAAa;KACb,YAAY;cAEX,MAAG,UAAA,uBAAA,QAAA;;;KCHJ,cAAc;KACd,aAAa;cAEZ,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;EAC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
package/lib/index.js CHANGED
@@ -8,7 +8,8 @@ function getExePath() {
8
8
  const packageName = `@datamitsu/datamitsu-${process.platform}-${process.arch}`;
9
9
  const exeName = `datamitsu${extension}`;
10
10
  try {
11
- const exePath = join(dirname(createRequire(import.meta.url).resolve(`${packageName}/package.json`)), exeName);
11
+ const packageJson = createRequire(import.meta.url).resolve(`${packageName}/package.json`);
12
+ const exePath = join(dirname(packageJson), exeName);
12
13
  if (existsSync(exePath)) return exePath;
13
14
  } catch {}
14
15
  throw new Error(`datamitsu binary not found for platform ${process.platform}-${process.arch}.\nPlease make sure the package "${packageName}" is installed.\nIf you're seeing this error, try reinstalling: npm install @datamitsu/datamitsu`);
@@ -141,7 +142,6 @@ function findJSONEnd(output, start) {
141
142
  case "}":
142
143
  depth--;
143
144
  if (depth === 0) return index;
144
- break;
145
145
  }
146
146
  }
147
147
  return -1;
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;EAGF,MAAM,UAAU,KAAK,QAFL,cAAc,OAAO,KAAK,GAChB,CAAC,CAAC,QAAQ,GAAG,YAAY,cACZ,CAAC,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,aAAa,WAAW;CAC9B,MAAM,gBAAgB;EAAC;EAAoB;EAAa,GAAG;CAAU;CAErE,IAAI;CACJ,IAAI;EACF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AAO;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.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,MAAM,YAAsB,UAAwB,CAAC,GAAsB;CAC/F,MAAM,EAAE,KAAK,QAAQ,WAAW;CAEhC,MAAM,aAAa,WAAW;CAC9B,MAAM,gBAAgB;EAAC;EAAoB;EAAa,GAAG;CAAU;CAErE,IAAI;CACJ,IAAI;EACF,SAAS,MAAM,EAAE,YAAY,eAAe;GAC1C,aAAa;IAAE;IAAK;GAAM;GAC1B,cAAc;EAChB,CAAC;CACH,SAA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,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datamitsu/datamitsu",
3
- "version": "0.2.2",
3
+ "version": "0.3.1",
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.2.2",
56
- "@datamitsu/datamitsu-darwin-x64": "0.2.2",
57
- "@datamitsu/datamitsu-freebsd-arm64": "0.2.2",
58
- "@datamitsu/datamitsu-freebsd-x64": "0.2.2",
59
- "@datamitsu/datamitsu-linux-arm64": "0.2.2",
60
- "@datamitsu/datamitsu-linux-x64": "0.2.2",
61
- "@datamitsu/datamitsu-win32-arm64": "0.2.2",
62
- "@datamitsu/datamitsu-win32-x64": "0.2.2"
55
+ "@datamitsu/datamitsu-darwin-arm64": "0.3.1",
56
+ "@datamitsu/datamitsu-darwin-x64": "0.3.1",
57
+ "@datamitsu/datamitsu-freebsd-arm64": "0.3.1",
58
+ "@datamitsu/datamitsu-freebsd-x64": "0.3.1",
59
+ "@datamitsu/datamitsu-linux-arm64": "0.3.1",
60
+ "@datamitsu/datamitsu-linux-x64": "0.3.1",
61
+ "@datamitsu/datamitsu-win32-arm64": "0.3.1",
62
+ "@datamitsu/datamitsu-win32-x64": "0.3.1"
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.2.2",
3
+ "version": "0.3.1",
4
4
  "ref": "ghcr.io/datamitsu/datamitsu-parsers",
5
- "tag": "0.2.2",
6
- "digest": "sha256:7220ac22e81f7d9e7492fa7aaf2cbb3ba2bbd029ed58b34a8e114cb827c514cb",
7
- "sha256": "144125c72cf0ad2e621cbc714aea242f2633506852db54044da34671687f0946"
5
+ "tag": "0.3.1",
6
+ "digest": "sha256:144680b2443151421b6f10d73daed524fc178ef5be9800ec8cdde159e8b71830",
7
+ "sha256": "fe25e350799945b6c8930632d14c98bd82838d03522a11d069cdd66bb608ae65"
8
8
  }