@layerzerolabs/vm-tooling 0.0.63 → 0.0.64

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.
Files changed (96) hide show
  1. package/dist/3H446V2K.js +6 -0
  2. package/dist/3H446V2K.js.map +1 -0
  3. package/dist/{KFOKN2M2.cjs → 4QL6ZBHT.cjs} +4 -4
  4. package/dist/{KFOKN2M2.cjs.map → 4QL6ZBHT.cjs.map} +1 -1
  5. package/dist/{DV6Y5YK3.cjs → 5KWSCPAS.cjs} +12 -12
  6. package/dist/5KWSCPAS.cjs.map +1 -0
  7. package/dist/{HSC5AWAD.cjs → BNMJ5QME.cjs} +3 -3
  8. package/dist/{HSC5AWAD.cjs.map → BNMJ5QME.cjs.map} +1 -1
  9. package/dist/{5JYEGDVK.js → CD3U3DU7.js} +3 -3
  10. package/dist/{5JYEGDVK.js.map → CD3U3DU7.js.map} +1 -1
  11. package/dist/{UHPHZ6AE.js → DWQZSSBG.js} +3 -3
  12. package/dist/{UHPHZ6AE.js.map → DWQZSSBG.js.map} +1 -1
  13. package/dist/{TBDZQONT.js → GBR35MZ7.js} +3 -3
  14. package/dist/{TBDZQONT.js.map → GBR35MZ7.js.map} +1 -1
  15. package/dist/{45K4IRAA.js → KHTL7IGX.js} +4 -4
  16. package/dist/{45K4IRAA.js.map → KHTL7IGX.js.map} +1 -1
  17. package/dist/{CJNBA2MN.js → KNTO2HQA.js} +58 -59
  18. package/dist/KNTO2HQA.js.map +1 -0
  19. package/dist/{SPOUVTPR.cjs → KTAMTSBK.cjs} +3 -3
  20. package/dist/{SPOUVTPR.cjs.map → KTAMTSBK.cjs.map} +1 -1
  21. package/dist/{KONCDJAL.cjs → ODBAKZ5L.cjs} +11 -11
  22. package/dist/{KONCDJAL.cjs.map → ODBAKZ5L.cjs.map} +1 -1
  23. package/dist/OMGIMF55.js +49 -0
  24. package/dist/OMGIMF55.js.map +1 -0
  25. package/dist/{5APCIOW3.js → QGMMPVDI.js} +4 -4
  26. package/dist/QGMMPVDI.js.map +1 -0
  27. package/dist/{FI3AZBYE.cjs → SWSAP2TA.cjs} +4 -4
  28. package/dist/{FI3AZBYE.cjs.map → SWSAP2TA.cjs.map} +1 -1
  29. package/dist/{5QGJ7CFM.js → W5XVOHRB.js} +4 -4
  30. package/dist/{5QGJ7CFM.js.map → W5XVOHRB.js.map} +1 -1
  31. package/dist/{WHAPJZ3U.cjs → W6FCPNQL.cjs} +58 -58
  32. package/dist/W6FCPNQL.cjs.map +1 -0
  33. package/dist/{U4OLGGKH.js → Y3REZYJA.js} +3 -3
  34. package/dist/{U4OLGGKH.js.map → Y3REZYJA.js.map} +1 -1
  35. package/dist/Y7OWS2C2.cjs +8 -0
  36. package/dist/Y7OWS2C2.cjs.map +1 -0
  37. package/dist/YNCUAY7W.cjs +51 -0
  38. package/dist/YNCUAY7W.cjs.map +1 -0
  39. package/dist/{L6RZSSWB.cjs → YPULSRCT.cjs} +13 -13
  40. package/dist/{L6RZSSWB.cjs.map → YPULSRCT.cjs.map} +1 -1
  41. package/dist/commands/sui/build.cjs +20 -0
  42. package/dist/commands/sui/build.cjs.map +1 -0
  43. package/dist/commands/sui/build.d.ts +3 -0
  44. package/dist/commands/sui/build.d.ts.map +1 -0
  45. package/dist/commands/sui/build.js +11 -0
  46. package/dist/commands/sui/build.js.map +1 -0
  47. package/dist/commands/sui/index.cjs +21 -0
  48. package/dist/commands/sui/index.cjs.map +1 -0
  49. package/dist/commands/sui/index.d.ts +2 -0
  50. package/dist/commands/sui/index.d.ts.map +1 -0
  51. package/dist/commands/sui/index.js +12 -0
  52. package/dist/commands/sui/index.js.map +1 -0
  53. package/dist/config/index.cjs +6 -6
  54. package/dist/config/index.js +1 -1
  55. package/dist/config/tools.cjs +6 -2
  56. package/dist/config/tools.d.ts +2 -1
  57. package/dist/config/tools.d.ts.map +1 -1
  58. package/dist/config/tools.js +1 -1
  59. package/dist/core/index.cjs +8 -8
  60. package/dist/core/index.js +4 -4
  61. package/dist/core/tool-executor.cjs +5 -5
  62. package/dist/core/tool-executor.d.ts +7 -6
  63. package/dist/core/tool-executor.d.ts.map +1 -1
  64. package/dist/core/tool-executor.js +4 -4
  65. package/dist/core/version-resolver.cjs +5 -5
  66. package/dist/core/version-resolver.js +2 -2
  67. package/dist/display/formatters.cjs +3 -3
  68. package/dist/display/formatters.js +2 -2
  69. package/dist/display/index.cjs +6 -6
  70. package/dist/display/index.js +3 -3
  71. package/dist/display/version-display.cjs +5 -5
  72. package/dist/display/version-display.js +3 -3
  73. package/dist/index.cjs +24 -14
  74. package/dist/index.cjs.map +1 -1
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.js +17 -7
  77. package/dist/index.js.map +1 -1
  78. package/dist/scripts/generate-github-matrix.cjs +7 -7
  79. package/dist/scripts/generate-github-matrix.js +4 -4
  80. package/dist/types/tool.cjs.map +1 -1
  81. package/dist/types/tool.d.ts +1 -1
  82. package/dist/types/tool.d.ts.map +1 -1
  83. package/dist/types/tool.js.map +1 -1
  84. package/dist/utils/docker.cjs +3 -3
  85. package/dist/utils/docker.js +1 -1
  86. package/dist/utils/finder.cjs +10 -10
  87. package/dist/utils/finder.js +1 -1
  88. package/dist/utils/version.cjs +5 -5
  89. package/dist/utils/version.js +1 -1
  90. package/dist/utils.cjs +4 -4
  91. package/dist/utils.js +1 -1
  92. package/package.json +5 -5
  93. package/dist/5APCIOW3.js.map +0 -1
  94. package/dist/CJNBA2MN.js.map +0 -1
  95. package/dist/DV6Y5YK3.cjs.map +0 -1
  96. package/dist/WHAPJZ3U.cjs.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,18 +1,20 @@
1
1
  'use strict';
2
2
 
3
3
  require('./FKPK53TD.cjs');
4
+ require('./Y7OWS2C2.cjs');
5
+ var YNCUAY7W_cjs = require('./YNCUAY7W.cjs');
4
6
  var DPCW4JIV_cjs = require('./DPCW4JIV.cjs');
5
7
  require('./CYUSPBTH.cjs');
6
- var KONCDJAL_cjs = require('./KONCDJAL.cjs');
7
- require('./FI3AZBYE.cjs');
8
+ var ODBAKZ5L_cjs = require('./ODBAKZ5L.cjs');
9
+ require('./SWSAP2TA.cjs');
8
10
  require('./GSHFVQRI.cjs');
9
- var DV6Y5YK3_cjs = require('./DV6Y5YK3.cjs');
11
+ var _5KWSCPAS_cjs = require('./5KWSCPAS.cjs');
10
12
  require('./YNMZEV5X.cjs');
11
- require('./TQMUPD75.cjs');
12
- require('./L6RZSSWB.cjs');
13
- var WHAPJZ3U_cjs = require('./WHAPJZ3U.cjs');
13
+ require('./YPULSRCT.cjs');
14
+ var W6FCPNQL_cjs = require('./W6FCPNQL.cjs');
14
15
  require('./JLKKDVCL.cjs');
15
16
  require('./QYB5VPZE.cjs');
17
+ require('./TQMUPD75.cjs');
16
18
  var U7VZULNU_cjs = require('./U7VZULNU.cjs');
17
19
  var commander = require('commander');
18
20
  var fs = require('fs');
@@ -31,7 +33,7 @@ async function run() {
31
33
  const program = new commander.Command();
32
34
  program.name("lz-tool").description("\u{1F680} LayerZero VM tooling with intelligent version management\n\nUsage pattern:\n lz-tool [global-options] <tool> [tool-args...]\n\nExamples:\n lz-tool -e bash sui --help\n lz-tool --sui-version 1.38.0 sui client\n\nNote: All lz-tool options must appear BEFORE the tool name.").version("1.0.0").enablePositionalOptions();
33
35
  if (process__default.default.argv.includes("--list-versions")) {
34
- KONCDJAL_cjs.displayVersionCombinations();
36
+ ODBAKZ5L_cjs.displayVersionCombinations();
35
37
  return;
36
38
  }
37
39
  program.option("-c, --cwd <path>", "Current working directory", (input) => {
@@ -78,21 +80,21 @@ async function run() {
78
80
  });
79
81
  return previous;
80
82
  }, []).option("-p, --publish <host_port:container_port>", "Publish a container's port(s) to the host");
81
- for (const tool of WHAPJZ3U_cjs.tools) {
83
+ for (const tool of W6FCPNQL_cjs.tools) {
82
84
  const optionFlag = `--${tool.name}-version <version>`;
83
- const defaultVersion = WHAPJZ3U_cjs.getToolDefaultVersion(tool.name);
84
- const supportedVersions = WHAPJZ3U_cjs.getToolSupportedVersions(tool.name);
85
+ const defaultVersion = W6FCPNQL_cjs.getToolDefaultVersion(tool.name);
86
+ const supportedVersions = W6FCPNQL_cjs.getToolSupportedVersions(tool.name);
85
87
  const description = `Specify ${tool.name} version (default: ${defaultVersion}, supported: ${supportedVersions.join(", ")})`;
86
88
  program.option(optionFlag, description);
87
89
  }
88
90
  program.option("--list-versions", "Display all supported version combinations and exit");
89
- program.command("version-info <tool>").description("Display detailed version information for a specific tool").action((toolName) => KONCDJAL_cjs.displayToolVersionInfo(toolName));
90
- for (const tool of WHAPJZ3U_cjs.tools) {
91
+ program.command("version-info <tool>").description("Display detailed version information for a specific tool").action((toolName) => ODBAKZ5L_cjs.displayToolVersionInfo(toolName));
92
+ for (const tool of W6FCPNQL_cjs.tools) {
91
93
  program.command(tool.name, {
92
94
  isDefault: false
93
95
  }).description(`Run ${tool.name} with version checking`).passThroughOptions(true).allowUnknownOption().helpOption(false).argument("[args...]", "Arguments to pass to the tool").action(async (args) => {
94
96
  const globalOptions = program.opts();
95
- await DV6Y5YK3_cjs.executeToolCommand(tool.name, args, {
97
+ await _5KWSCPAS_cjs.executeToolCommand(tool.name, args, {
96
98
  cwd: globalOptions.cwd ?? process__default.default.cwd(),
97
99
  volumes: globalOptions.volume,
98
100
  ...globalOptions
@@ -100,7 +102,15 @@ async function run() {
100
102
  });
101
103
  }
102
104
  const extra = program.command("extra").description("Extra commands for VM tooling");
103
- extra.command("starknet").command("build-typescript-sdk").description(`Generate TypeScript SDK for Starknet`).argument("<package-name>", "Scarb package name").argument("<target-directory>", "Scarb target directory").argument("<src-directory>", "TypeScript source directory").action(DPCW4JIV_cjs.buildTypescriptSdk);
105
+ extra.command("starknet").command("build-typescript-sdk").description("Generate TypeScript SDK for Starknet").argument("<package-name>", "Scarb package name").argument("<target-directory>", "Scarb target directory").argument("<src-directory>", "TypeScript source directory").action(DPCW4JIV_cjs.buildTypescriptSdk);
106
+ extra.command("sui").command("build").description("Build Sui contracts with shared dependency and configuration Docker volumes").argument("[args...]", "Arguments to pass to `sui move build` command").passThroughOptions(true).allowUnknownOption().action(async (args) => {
107
+ const options = program.opts();
108
+ await YNCUAY7W_cjs.build(args, {
109
+ ...options,
110
+ cwd: options.cwd ?? process__default.default.cwd(),
111
+ volumes: options.volume
112
+ });
113
+ });
104
114
  await program.parseAsync();
105
115
  }
106
116
  U7VZULNU_cjs.__name(run, "run");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["init_cjs_shims","run","program","Command","name","description","version","enablePositionalOptions","process","argv","includes","displayVersionCombinations","option","input","Error","path","isAbsolute","fs","existsSync","statSync","isDirectory","previous","valueParts","split","length","value","join","push","type","hostPath","containerPath","undefined","tool","tools","optionFlag","defaultVersion","getToolDefaultVersion","supportedVersions","getToolSupportedVersions","command","action","toolName","displayToolVersionInfo","isDefault","passThroughOptions","allowUnknownOption","helpOption","argument","args","globalOptions","opts","executeToolCommand","cwd","volumes","volume","extra","buildTypescriptSdk","parseAsync","main","__name","error","console","exit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,2BAAA,EAAA;AAoBA,eAAeC,GAAAA,GAAAA;AACX,EAAA,MAAMC,OAAAA,GAAU,IAAIC,iBAAAA,EAAAA;AAEpBD,EAAAA,OAAAA,CACKE,IAAAA,CAAK,SAAA,CAAA,CACLC,WAAAA,CACG,6RASI,CAAA,CAEPC,OAAAA,CAAQ,OAAA,CAAA,CACRC,uBAAAA,EAAuB;AAG5B,EAAA,IAAIC,wBAAAA,CAAQC,IAAAA,CAAKC,QAAAA,CAAS,iBAAA,CAAA,EAAoB;AAC1CC,IAAAA,uCAAAA,EAAAA;AACA,IAAA;AACJ,EAAA;AAGAT,EAAAA,OAAAA,CACKU,MAAAA,CAAO,kBAAA,EAAoB,2BAAA,EAA6B,CAACC,KAAAA,KAAAA;AACtD,IAAA,IAAI,OAAOA,UAAU,QAAA,EAAU;AAC3B,MAAA,MAAM,IAAIC,MAAM,2BAAA,CAA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B,OAAAA,CAAQ,UAAA,CAAA,CACRA,OAAAA,CAAQ,sBAAA,CAAA,CACRlC,WAAAA,CAAY,CAAA,oCAAA,CAAsC,CAAA,CAClD0C,QAAAA,CAAS,gBAAA,EAAkB,oBAAA,CAAA,CAC3BA,QAAAA,CAAS,sBAAsB,wBAAA,CAAA,CAC/BA,SAAS,iBAAA,EAAmB,6BAAA,CAAA,CAC5BP,MAAAA,CAAgBgB,+BAAkB,CAAA;AAEvC,EAAA,MAAMtD,QAAQuD,UAAAA,EAAU;AAC5B;AAvJexD,mBAAAA,CAAAA,GAAAA,EAAAA,KAAAA,CAAAA;AAyJR,IAAMyD,uBAAOC,mBAAA,CAAA,YAAA;AAChB,EAAA,IAAI;AACA,IAAA,MAAM1D,GAAAA,EAAAA;AACV,EAAA,CAAA,CAAA,OAAS2D,KAAAA,EAAO;AACZC,IAAAA,OAAAA,CAAQD,KAAAA,CAAM,mCAA8BA,KAAAA,CAAAA;AAC5CpD,IAAAA,wBAAAA,CAAQsD,KAAK,CAAA,CAAA;AACjB,EAAA;AACJ,CAAA,EAPoB,MAAA","file":"index.cjs","sourcesContent":["import { Command } from 'commander';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport process from 'node:process';\n\nimport * as starknet from './commands/starknet';\nimport { tools } from './config';\nimport { executeToolCommand } from './core';\nimport { displayToolVersionInfo, displayVersionCombinations } from './display';\nimport type { EnvironmentVariable, VolumeMapping } from './types';\nimport { getToolDefaultVersion, getToolSupportedVersions } from './utils/finder';\n\ninterface GlobalOptions {\n cwd?: string;\n volume: VolumeMapping[];\n env: EnvironmentVariable[];\n script?: string;\n customEntrypoint?: string;\n}\n\nasync function run(): Promise<void> {\n const program = new Command();\n\n program\n .name('lz-tool')\n .description(\n '🚀 LayerZero VM tooling with intelligent version management\\n' +\n '\\n' +\n 'Usage pattern:\\n' +\n ' lz-tool [global-options] <tool> [tool-args...]\\n' +\n '\\n' +\n 'Examples:\\n' +\n ' lz-tool -e bash sui --help\\n' +\n ' lz-tool --sui-version 1.38.0 sui client\\n' +\n '\\n' +\n 'Note: All lz-tool options must appear BEFORE the tool name.',\n )\n .version('1.0.0')\n .enablePositionalOptions(); // Required for passThroughOptions to work\n\n // Check for --list-versions before parsing to avoid help display\n if (process.argv.includes('--list-versions')) {\n displayVersionCombinations();\n return;\n }\n\n // Add global options\n program\n .option('-c, --cwd <path>', 'Current working directory', (input: string) => {\n if (typeof input !== 'string') {\n throw new Error('cwd flag must be a string');\n }\n\n if (!path.isAbsolute(input)) {\n throw new Error('cwd must be an absolute path if provided');\n }\n\n if (!fs.existsSync(input)) {\n throw new Error('cwd does not exist');\n }\n\n if (!fs.statSync(input).isDirectory()) {\n throw new Error('cwd must be a directory');\n }\n\n return input;\n })\n .option(\n '-e, --custom-entrypoint <entrypoint>',\n 'Override the default Docker entrypoint for the tool',\n )\n .option(\n '--script <script>',\n 'Execute a custom script using bash -c in the Docker container (e.g., --script \"npm install && npm test\")',\n )\n .option(\n '--env <name=value>',\n 'Set environment variables for Docker container (e.g., --env NODE_ENV=production)',\n (input: string, previous: EnvironmentVariable[]) => {\n const [name, ...valueParts] = input.split('=');\n if (name === '' || valueParts.length === 0) {\n throw new Error(\n `Invalid environment variable format: ${input}. Use --env NAME=VALUE`,\n );\n }\n const value = valueParts.join('='); // Handle values that contain '='\n previous.push({ name, value } satisfies EnvironmentVariable);\n return previous;\n },\n [],\n )\n .option(\n '-v, --volume <type:hostPath:containerPath[:name]>',\n 'Volume mappings in the format type:hostPath:containerPath[:name] (e.g., host:/host/path:/container/path or isolate::/container/path:volumeName)',\n (input: string, previous: VolumeMapping[]) => {\n const [type, hostPath, containerPath, name] = input.split(':');\n if (type !== 'host' && type !== 'isolate') {\n throw new Error(`Invalid volume type: ${type}`);\n }\n\n if (type === 'host' && (hostPath === undefined || hostPath === '')) {\n throw new Error(`Host path is required for volume type 'host'`);\n }\n\n if (containerPath === undefined || containerPath === '') {\n throw new Error(`Container path is required`);\n }\n previous.push({ type, hostPath, containerPath, name } satisfies VolumeMapping);\n return previous;\n },\n [],\n )\n .option(\n '-p, --publish <host_port:container_port>',\n \"Publish a container's port(s) to the host\",\n );\n\n // Add version options for each tool dynamically\n for (const tool of tools) {\n const optionFlag = `--${tool.name}-version <version>`;\n const defaultVersion = getToolDefaultVersion(tool.name);\n const supportedVersions = getToolSupportedVersions(tool.name);\n const description = `Specify ${tool.name} version (default: ${defaultVersion}, supported: ${supportedVersions.join(', ')})`;\n\n program.option(optionFlag, description);\n }\n\n // Add utility options\n program.option('--list-versions', 'Display all supported version combinations and exit');\n\n // Add version info command\n program\n .command('version-info <tool>')\n .description('Display detailed version information for a specific tool')\n .action((toolName: string) => displayToolVersionInfo(toolName));\n\n // Dynamically add commands for each supported tool\n for (const tool of tools) {\n // Don't add any options to the subcommand level.\n // All lz-tool options must be specified before the subcommand.\n program\n .command(tool.name, { isDefault: false })\n .description(`Run ${tool.name} with version checking`)\n .passThroughOptions(true) // Pass through all options after the subcommand\n .allowUnknownOption()\n .helpOption(false) // Disable automatic help option to pass --help to the tool\n .argument('[args...]', 'Arguments to pass to the tool')\n .action(async (args: string[]) => {\n // Get global options (specified before the subcommand)\n const globalOptions = program.opts<GlobalOptions>();\n\n await executeToolCommand(tool.name, args, {\n cwd: globalOptions.cwd ?? process.cwd(),\n volumes: globalOptions.volume,\n ...globalOptions,\n });\n });\n }\n\n const extra = program.command('extra').description('Extra commands for VM tooling');\n\n extra\n .command('starknet')\n .command('build-typescript-sdk')\n .description(`Generate TypeScript SDK for Starknet`)\n .argument('<package-name>', 'Scarb package name')\n .argument('<target-directory>', 'Scarb target directory')\n .argument('<src-directory>', 'TypeScript source directory')\n .action(starknet.buildTypescriptSdk);\n\n await program.parseAsync();\n}\n\nexport const main = async (): Promise<void> => {\n try {\n await run();\n } catch (error) {\n console.error('❌ VM tool execution failed', error);\n process.exit(1);\n }\n};\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["init_cjs_shims","run","program","Command","name","description","version","enablePositionalOptions","process","argv","includes","displayVersionCombinations","option","input","Error","path","isAbsolute","fs","existsSync","statSync","isDirectory","previous","valueParts","split","length","value","join","push","type","hostPath","containerPath","undefined","tool","tools","optionFlag","defaultVersion","getToolDefaultVersion","supportedVersions","getToolSupportedVersions","command","action","toolName","displayToolVersionInfo","isDefault","passThroughOptions","allowUnknownOption","helpOption","argument","args","globalOptions","opts","executeToolCommand","cwd","volumes","volume","extra","buildTypescriptSdk","options","build","parseAsync","main","__name","error","console","exit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,2BAAA,EAAA;AAqBA,eAAeC,GAAAA,GAAAA;AACX,EAAA,MAAMC,OAAAA,GAAU,IAAIC,iBAAAA,EAAAA;AAEpBD,EAAAA,OAAAA,CACKE,IAAAA,CAAK,SAAA,CAAA,CACLC,WAAAA,CACG,6RASI,CAAA,CAEPC,OAAAA,CAAQ,OAAA,CAAA,CACRC,uBAAAA,EAAuB;AAG5B,EAAA,IAAIC,wBAAAA,CAAQC,IAAAA,CAAKC,QAAAA,CAAS,iBAAA,CAAA,EAAoB;AAC1CC,IAAAA,uCAAAA,EAAAA;AACA,IAAA;AACJ,EAAA;AAGAT,EAAAA,OAAAA,CACKU,MAAAA,CAAO,kBAAA,EAAoB,2BAAA,EAA6B,CAACC,KAAAA,KAAAA;AACtD,IAAA,IAAI,OAAOA,UAAU,QAAA,EAAU;AAC3B,MAAA,MAAM,IAAIC,MAAM,2BAAA,CAAA;AACpB,IAAA;AAEA,IAAA,IAAI,CAACC,qBAAAA,CAAKC,UAAAA,CAAWH,KAAAA,CAAAA,EAAQ;AACzB,MAAA,MAAM,IAAIC,MAAM,0CAAA,CAAA;AACpB,IAAA;AAEA,IAAA,IAAI,CAACG,mBAAAA,CAAGC,UAAAA,CAAWL,KAAAA,CAAAA,EAAQ;AACvB,MAAA,MAAM,IAAIC,MAAM,oBAAA,CAAA;AACpB,IAAA;AAEA,IAAA,IAAI,CAACG,mBAAAA,CAAGE,QAAAA,CAASN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A,OAAAA,CAAQ,OAAA,CAAA,CACRlC,WAAAA,CAAY,6EAAA,CAAA,CACZ0C,QAAAA,CAAS,aAAa,+CAAA,CAAA,CACtBH,mBAAmB,IAAA,CAAA,CACnBC,oBAAkB,CAClBL,MAAAA,CAAO,OAAOQ,IAAAA,KAAAA;AACX,IAAA,MAAMS,OAAAA,GAAUvD,QAAQgD,IAAAA,EAAI;AAE5B,IAAA,MAAUQ,mBAAMV,IAAAA,EAAM;MAClB,GAAGS,OAAAA;MACHL,GAAAA,EAAKK,OAAAA,CAAQL,GAAAA,IAAO5C,wBAAAA,CAAQ4C,GAAAA,EAAG;AAC/BC,MAAAA,OAAAA,EAASI,OAAAA,CAAQH;KACrB,CAAA;EACJ,CAAA,CAAA;AAEJ,EAAA,MAAMpD,QAAQyD,UAAAA,EAAU;AAC5B;AAxKe1D,mBAAAA,CAAAA,GAAAA,EAAAA,KAAAA,CAAAA;AA0KR,IAAM2D,uBAAOC,mBAAA,CAAA,YAAA;AAChB,EAAA,IAAI;AACA,IAAA,MAAM5D,GAAAA,EAAAA;AACV,EAAA,CAAA,CAAA,OAAS6D,KAAAA,EAAO;AACZC,IAAAA,OAAAA,CAAQD,KAAAA,CAAM,mCAA8BA,KAAAA,CAAAA;AAC5CtD,IAAAA,wBAAAA,CAAQwD,KAAK,CAAA,CAAA;AACjB,EAAA;AACJ,CAAA,EAPoB,MAAA","file":"index.cjs","sourcesContent":["import { Command } from 'commander';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport process from 'node:process';\n\nimport * as starknet from './commands/starknet';\nimport * as sui from './commands/sui';\nimport { tools } from './config';\nimport { executeToolCommand } from './core';\nimport { displayToolVersionInfo, displayVersionCombinations } from './display';\nimport type { EnvironmentVariable, VolumeMapping } from './types';\nimport { getToolDefaultVersion, getToolSupportedVersions } from './utils/finder';\n\ninterface GlobalOptions {\n cwd?: string;\n volume: VolumeMapping[];\n env: EnvironmentVariable[];\n script?: string;\n customEntrypoint?: string;\n}\n\nasync function run(): Promise<void> {\n const program = new Command();\n\n program\n .name('lz-tool')\n .description(\n '🚀 LayerZero VM tooling with intelligent version management\\n' +\n '\\n' +\n 'Usage pattern:\\n' +\n ' lz-tool [global-options] <tool> [tool-args...]\\n' +\n '\\n' +\n 'Examples:\\n' +\n ' lz-tool -e bash sui --help\\n' +\n ' lz-tool --sui-version 1.38.0 sui client\\n' +\n '\\n' +\n 'Note: All lz-tool options must appear BEFORE the tool name.',\n )\n .version('1.0.0')\n .enablePositionalOptions(); // Required for passThroughOptions to work\n\n // Check for --list-versions before parsing to avoid help display\n if (process.argv.includes('--list-versions')) {\n displayVersionCombinations();\n return;\n }\n\n // Add global options\n program\n .option('-c, --cwd <path>', 'Current working directory', (input: string) => {\n if (typeof input !== 'string') {\n throw new Error('cwd flag must be a string');\n }\n\n if (!path.isAbsolute(input)) {\n throw new Error('cwd must be an absolute path if provided');\n }\n\n if (!fs.existsSync(input)) {\n throw new Error('cwd does not exist');\n }\n\n if (!fs.statSync(input).isDirectory()) {\n throw new Error('cwd must be a directory');\n }\n\n return input;\n })\n .option(\n '-e, --custom-entrypoint <entrypoint>',\n 'Override the default Docker entrypoint for the tool',\n )\n .option(\n '--script <script>',\n 'Execute a custom script using bash -c in the Docker container (e.g., --script \"npm install && npm test\")',\n )\n .option(\n '--env <name=value>',\n 'Set environment variables for Docker container (e.g., --env NODE_ENV=production)',\n (input: string, previous: EnvironmentVariable[]) => {\n const [name, ...valueParts] = input.split('=');\n if (name === '' || valueParts.length === 0) {\n throw new Error(\n `Invalid environment variable format: ${input}. Use --env NAME=VALUE`,\n );\n }\n const value = valueParts.join('='); // Handle values that contain '='\n previous.push({ name, value } satisfies EnvironmentVariable);\n return previous;\n },\n [],\n )\n .option(\n '-v, --volume <type:hostPath:containerPath[:name]>',\n 'Volume mappings in the format type:hostPath:containerPath[:name] (e.g., host:/host/path:/container/path or isolate::/container/path:volumeName)',\n (input: string, previous: VolumeMapping[]) => {\n const [type, hostPath, containerPath, name] = input.split(':');\n if (type !== 'host' && type !== 'isolate') {\n throw new Error(`Invalid volume type: ${type}`);\n }\n\n if (type === 'host' && (hostPath === undefined || hostPath === '')) {\n throw new Error(`Host path is required for volume type 'host'`);\n }\n\n if (containerPath === undefined || containerPath === '') {\n throw new Error(`Container path is required`);\n }\n previous.push({ type, hostPath, containerPath, name } satisfies VolumeMapping);\n return previous;\n },\n [],\n )\n .option(\n '-p, --publish <host_port:container_port>',\n \"Publish a container's port(s) to the host\",\n );\n\n // Add version options for each tool dynamically\n for (const tool of tools) {\n const optionFlag = `--${tool.name}-version <version>`;\n const defaultVersion = getToolDefaultVersion(tool.name);\n const supportedVersions = getToolSupportedVersions(tool.name);\n const description = `Specify ${tool.name} version (default: ${defaultVersion}, supported: ${supportedVersions.join(', ')})`;\n\n program.option(optionFlag, description);\n }\n\n // Add utility options\n program.option('--list-versions', 'Display all supported version combinations and exit');\n\n // Add version info command\n program\n .command('version-info <tool>')\n .description('Display detailed version information for a specific tool')\n .action((toolName: string) => displayToolVersionInfo(toolName));\n\n // Dynamically add commands for each supported tool\n for (const tool of tools) {\n // Don't add any options to the subcommand level.\n // All lz-tool options must be specified before the subcommand.\n program\n .command(tool.name, { isDefault: false })\n .description(`Run ${tool.name} with version checking`)\n .passThroughOptions(true) // Pass through all options after the subcommand\n .allowUnknownOption()\n .helpOption(false) // Disable automatic help option to pass --help to the tool\n .argument('[args...]', 'Arguments to pass to the tool')\n .action(async (args: string[]) => {\n // Get global options (specified before the subcommand)\n const globalOptions = program.opts<GlobalOptions>();\n\n await executeToolCommand(tool.name, args, {\n cwd: globalOptions.cwd ?? process.cwd(),\n volumes: globalOptions.volume,\n ...globalOptions,\n });\n });\n }\n\n const extra = program.command('extra').description('Extra commands for VM tooling');\n\n extra\n .command('starknet')\n .command('build-typescript-sdk')\n .description('Generate TypeScript SDK for Starknet')\n .argument('<package-name>', 'Scarb package name')\n .argument('<target-directory>', 'Scarb target directory')\n .argument('<src-directory>', 'TypeScript source directory')\n .action(starknet.buildTypescriptSdk);\n\n extra\n .command('sui')\n .command('build')\n .description('Build Sui contracts with shared dependency and configuration Docker volumes')\n .argument('[args...]', 'Arguments to pass to `sui move build` command')\n .passThroughOptions(true)\n .allowUnknownOption()\n .action(async (args: string[]) => {\n const options = program.opts<GlobalOptions>();\n\n await sui.build(args, {\n ...options,\n cwd: options.cwd ?? process.cwd(),\n volumes: options.volume,\n });\n });\n\n await program.parseAsync();\n}\n\nexport const main = async (): Promise<void> => {\n try {\n await run();\n } catch (error) {\n console.error('❌ VM tool execution failed', error);\n process.exit(1);\n }\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA6KA,eAAO,MAAM,IAAI,QAAa,OAAO,CAAC,IAAI,CAOzC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA+LA,eAAO,MAAM,IAAI,QAAa,OAAO,CAAC,IAAI,CAOzC,CAAC"}
package/dist/index.js CHANGED
@@ -1,16 +1,18 @@
1
1
  import './M4PGJV5D.js';
2
+ import './3H446V2K.js';
3
+ import { build } from './OMGIMF55.js';
2
4
  import { buildTypescriptSdk } from './MMIV5S36.js';
3
5
  import './7BFNUKIW.js';
4
- import { displayVersionCombinations, displayToolVersionInfo } from './45K4IRAA.js';
5
- import './UHPHZ6AE.js';
6
+ import { displayVersionCombinations, displayToolVersionInfo } from './KHTL7IGX.js';
7
+ import './DWQZSSBG.js';
6
8
  import './OAO7CCJW.js';
7
- import { executeToolCommand } from './5APCIOW3.js';
9
+ import { executeToolCommand } from './QGMMPVDI.js';
8
10
  import './IWNVWC3I.js';
9
- import './3PEVFTZ5.js';
10
- import './5JYEGDVK.js';
11
- import { tools, getToolDefaultVersion, getToolSupportedVersions } from './CJNBA2MN.js';
11
+ import './CD3U3DU7.js';
12
+ import { tools, getToolDefaultVersion, getToolSupportedVersions } from './KNTO2HQA.js';
12
13
  import './NX66I36H.js';
13
14
  import './PWDCAN6N.js';
15
+ import './3PEVFTZ5.js';
14
16
  import { init_esm_shims, __name } from './4RNWLMHM.js';
15
17
  import { Command } from 'commander';
16
18
  import fs from 'node:fs';
@@ -92,7 +94,15 @@ async function run() {
92
94
  });
93
95
  }
94
96
  const extra = program.command("extra").description("Extra commands for VM tooling");
95
- extra.command("starknet").command("build-typescript-sdk").description(`Generate TypeScript SDK for Starknet`).argument("<package-name>", "Scarb package name").argument("<target-directory>", "Scarb target directory").argument("<src-directory>", "TypeScript source directory").action(buildTypescriptSdk);
97
+ extra.command("starknet").command("build-typescript-sdk").description("Generate TypeScript SDK for Starknet").argument("<package-name>", "Scarb package name").argument("<target-directory>", "Scarb target directory").argument("<src-directory>", "TypeScript source directory").action(buildTypescriptSdk);
98
+ extra.command("sui").command("build").description("Build Sui contracts with shared dependency and configuration Docker volumes").argument("[args...]", "Arguments to pass to `sui move build` command").passThroughOptions(true).allowUnknownOption().action(async (args) => {
99
+ const options = program.opts();
100
+ await build(args, {
101
+ ...options,
102
+ cwd: options.cwd ?? process.cwd(),
103
+ volumes: options.volume
104
+ });
105
+ });
96
106
  await program.parseAsync();
97
107
  }
98
108
  __name(run, "run");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["run","program","Command","name","description","version","enablePositionalOptions","process","argv","includes","displayVersionCombinations","option","input","Error","path","isAbsolute","fs","existsSync","statSync","isDirectory","previous","valueParts","split","length","value","join","push","type","hostPath","containerPath","undefined","tool","tools","optionFlag","defaultVersion","getToolDefaultVersion","supportedVersions","getToolSupportedVersions","command","action","toolName","displayToolVersionInfo","isDefault","passThroughOptions","allowUnknownOption","helpOption","argument","args","globalOptions","opts","executeToolCommand","cwd","volumes","volume","extra","buildTypescriptSdk","parseAsync","main","error","console","exit"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,cAAA,EAAA;AAoBA,eAAeA,GAAAA,GAAAA;AACX,EAAA,MAAMC,OAA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AAO,OAAOQ,IAAAA,KAAAA;AAEX,MAAA,MAAMC,aAAAA,GAAgB/C,QAAQgD,IAAAA,EAAI;AAElC,MAAA,MAAMC,kBAAAA,CAAmBnB,IAAAA,CAAK5B,IAAAA,EAAM4C,IAAAA,EAAM;QACtCI,GAAAA,EAAKH,aAAAA,CAAcG,GAAAA,IAAO5C,OAAAA,CAAQ4C,GAAAA,EAAG;AACrCC,QAAAA,OAAAA,EAASJ,aAAAA,CAAcK,MAAAA;QACvB,GAAGL;OACP,CAAA;IACJ,CAAA,CAAA;AACR,EAAA;AAEA,EAAA,MAAMM,QAAQrD,OAAAA,CAAQqC,OAAAA,CAAQ,OAAA,CAAA,CAASlC,YAAY,+BAAA,CAAA;AAEnDkD,EAAAA,KAAAA,CACKhB,OAAAA,CAAQ,UAAA,CAAA,CACRA,OAAAA,CAAQ,sBAAA,CAAA,CACRlC,WAAAA,CAAY,CAAA,oCAAA,CAAsC,CAAA,CAClD0C,QAAAA,CAAS,gBAAA,EAAkB,oBAAA,CAAA,CAC3BA,QAAAA,CAAS,sBAAsB,wBAAA,CAAA,CAC/BA,SAAS,iBAAA,EAAmB,6BAAA,CAAA,CAC5BP,MAAAA,CAAgBgB,kBAAkB,CAAA;AAEvC,EAAA,MAAMtD,QAAQuD,UAAAA,EAAU;AAC5B;AAvJexD,MAAAA,CAAAA,GAAAA,EAAAA,KAAAA,CAAAA;AAyJR,IAAMyD,uBAAO,MAAA,CAAA,YAAA;AAChB,EAAA,IAAI;AACA,IAAA,MAAMzD,GAAAA,EAAAA;AACV,EAAA,CAAA,CAAA,OAAS0D,KAAAA,EAAO;AACZC,IAAAA,OAAAA,CAAQD,KAAAA,CAAM,mCAA8BA,KAAAA,CAAAA;AAC5CnD,IAAAA,OAAAA,CAAQqD,KAAK,CAAA,CAAA;AACjB,EAAA;AACJ,CAAA,EAPoB,MAAA","file":"index.js","sourcesContent":["import { Command } from 'commander';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport process from 'node:process';\n\nimport * as starknet from './commands/starknet';\nimport { tools } from './config';\nimport { executeToolCommand } from './core';\nimport { displayToolVersionInfo, displayVersionCombinations } from './display';\nimport type { EnvironmentVariable, VolumeMapping } from './types';\nimport { getToolDefaultVersion, getToolSupportedVersions } from './utils/finder';\n\ninterface GlobalOptions {\n cwd?: string;\n volume: VolumeMapping[];\n env: EnvironmentVariable[];\n script?: string;\n customEntrypoint?: string;\n}\n\nasync function run(): Promise<void> {\n const program = new Command();\n\n program\n .name('lz-tool')\n .description(\n '🚀 LayerZero VM tooling with intelligent version management\\n' +\n '\\n' +\n 'Usage pattern:\\n' +\n ' lz-tool [global-options] <tool> [tool-args...]\\n' +\n '\\n' +\n 'Examples:\\n' +\n ' lz-tool -e bash sui --help\\n' +\n ' lz-tool --sui-version 1.38.0 sui client\\n' +\n '\\n' +\n 'Note: All lz-tool options must appear BEFORE the tool name.',\n )\n .version('1.0.0')\n .enablePositionalOptions(); // Required for passThroughOptions to work\n\n // Check for --list-versions before parsing to avoid help display\n if (process.argv.includes('--list-versions')) {\n displayVersionCombinations();\n return;\n }\n\n // Add global options\n program\n .option('-c, --cwd <path>', 'Current working directory', (input: string) => {\n if (typeof input !== 'string') {\n throw new Error('cwd flag must be a string');\n }\n\n if (!path.isAbsolute(input)) {\n throw new Error('cwd must be an absolute path if provided');\n }\n\n if (!fs.existsSync(input)) {\n throw new Error('cwd does not exist');\n }\n\n if (!fs.statSync(input).isDirectory()) {\n throw new Error('cwd must be a directory');\n }\n\n return input;\n })\n .option(\n '-e, --custom-entrypoint <entrypoint>',\n 'Override the default Docker entrypoint for the tool',\n )\n .option(\n '--script <script>',\n 'Execute a custom script using bash -c in the Docker container (e.g., --script \"npm install && npm test\")',\n )\n .option(\n '--env <name=value>',\n 'Set environment variables for Docker container (e.g., --env NODE_ENV=production)',\n (input: string, previous: EnvironmentVariable[]) => {\n const [name, ...valueParts] = input.split('=');\n if (name === '' || valueParts.length === 0) {\n throw new Error(\n `Invalid environment variable format: ${input}. Use --env NAME=VALUE`,\n );\n }\n const value = valueParts.join('='); // Handle values that contain '='\n previous.push({ name, value } satisfies EnvironmentVariable);\n return previous;\n },\n [],\n )\n .option(\n '-v, --volume <type:hostPath:containerPath[:name]>',\n 'Volume mappings in the format type:hostPath:containerPath[:name] (e.g., host:/host/path:/container/path or isolate::/container/path:volumeName)',\n (input: string, previous: VolumeMapping[]) => {\n const [type, hostPath, containerPath, name] = input.split(':');\n if (type !== 'host' && type !== 'isolate') {\n throw new Error(`Invalid volume type: ${type}`);\n }\n\n if (type === 'host' && (hostPath === undefined || hostPath === '')) {\n throw new Error(`Host path is required for volume type 'host'`);\n }\n\n if (containerPath === undefined || containerPath === '') {\n throw new Error(`Container path is required`);\n }\n previous.push({ type, hostPath, containerPath, name } satisfies VolumeMapping);\n return previous;\n },\n [],\n )\n .option(\n '-p, --publish <host_port:container_port>',\n \"Publish a container's port(s) to the host\",\n );\n\n // Add version options for each tool dynamically\n for (const tool of tools) {\n const optionFlag = `--${tool.name}-version <version>`;\n const defaultVersion = getToolDefaultVersion(tool.name);\n const supportedVersions = getToolSupportedVersions(tool.name);\n const description = `Specify ${tool.name} version (default: ${defaultVersion}, supported: ${supportedVersions.join(', ')})`;\n\n program.option(optionFlag, description);\n }\n\n // Add utility options\n program.option('--list-versions', 'Display all supported version combinations and exit');\n\n // Add version info command\n program\n .command('version-info <tool>')\n .description('Display detailed version information for a specific tool')\n .action((toolName: string) => displayToolVersionInfo(toolName));\n\n // Dynamically add commands for each supported tool\n for (const tool of tools) {\n // Don't add any options to the subcommand level.\n // All lz-tool options must be specified before the subcommand.\n program\n .command(tool.name, { isDefault: false })\n .description(`Run ${tool.name} with version checking`)\n .passThroughOptions(true) // Pass through all options after the subcommand\n .allowUnknownOption()\n .helpOption(false) // Disable automatic help option to pass --help to the tool\n .argument('[args...]', 'Arguments to pass to the tool')\n .action(async (args: string[]) => {\n // Get global options (specified before the subcommand)\n const globalOptions = program.opts<GlobalOptions>();\n\n await executeToolCommand(tool.name, args, {\n cwd: globalOptions.cwd ?? process.cwd(),\n volumes: globalOptions.volume,\n ...globalOptions,\n });\n });\n }\n\n const extra = program.command('extra').description('Extra commands for VM tooling');\n\n extra\n .command('starknet')\n .command('build-typescript-sdk')\n .description(`Generate TypeScript SDK for Starknet`)\n .argument('<package-name>', 'Scarb package name')\n .argument('<target-directory>', 'Scarb target directory')\n .argument('<src-directory>', 'TypeScript source directory')\n .action(starknet.buildTypescriptSdk);\n\n await program.parseAsync();\n}\n\nexport const main = async (): Promise<void> => {\n try {\n await run();\n } catch (error) {\n console.error('❌ VM tool execution failed', error);\n process.exit(1);\n }\n};\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["run","program","Command","name","description","version","enablePositionalOptions","process","argv","includes","displayVersionCombinations","option","input","Error","path","isAbsolute","fs","existsSync","statSync","isDirectory","previous","valueParts","split","length","value","join","push","type","hostPath","containerPath","undefined","tool","tools","optionFlag","defaultVersion","getToolDefaultVersion","supportedVersions","getToolSupportedVersions","command","action","toolName","displayToolVersionInfo","isDefault","passThroughOptions","allowUnknownOption","helpOption","argument","args","globalOptions","opts","executeToolCommand","cwd","volumes","volume","extra","buildTypescriptSdk","options","build","parseAsync","main","error","console","exit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,cAAA,EAAA;AAqBA,eAAeA,GAAAA,GAAAA;AACX,EAAA,MAAMC,OAAAA,GAAU,IAAIC,OAAAA,EAAAA;AAEpBD,EAAAA,OAAAA,CACKE,IAAAA,CAAK,SAAA,CAAA,CACLC,WAAAA,CACG,6RASI,CAAA,CAEPC,OAAAA,CAAQ,OAAA,CAAA,CACRC,uBAAAA,EAAuB;AAG5B,EAAA,IAAIC,OAAAA,CAAQC,IAAAA,CAAKC,QAAAA,CAAS,iBAAA,CAAA,EAAoB;AAC1CC,IAAAA,0BAAAA,EAAAA;AACA,IAAA;AACJ,EAAA;AAGAT,EAAAA,OAAAA,CACKU,MAAAA,CAAO,kBAAA,EAAoB,2BAAA,EAA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D,KAAK,CAAA,CAAA;AACjB,EAAA;AACJ,CAAA,EAPoB,MAAA","file":"index.js","sourcesContent":["import { Command } from 'commander';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport process from 'node:process';\n\nimport * as starknet from './commands/starknet';\nimport * as sui from './commands/sui';\nimport { tools } from './config';\nimport { executeToolCommand } from './core';\nimport { displayToolVersionInfo, displayVersionCombinations } from './display';\nimport type { EnvironmentVariable, VolumeMapping } from './types';\nimport { getToolDefaultVersion, getToolSupportedVersions } from './utils/finder';\n\ninterface GlobalOptions {\n cwd?: string;\n volume: VolumeMapping[];\n env: EnvironmentVariable[];\n script?: string;\n customEntrypoint?: string;\n}\n\nasync function run(): Promise<void> {\n const program = new Command();\n\n program\n .name('lz-tool')\n .description(\n '🚀 LayerZero VM tooling with intelligent version management\\n' +\n '\\n' +\n 'Usage pattern:\\n' +\n ' lz-tool [global-options] <tool> [tool-args...]\\n' +\n '\\n' +\n 'Examples:\\n' +\n ' lz-tool -e bash sui --help\\n' +\n ' lz-tool --sui-version 1.38.0 sui client\\n' +\n '\\n' +\n 'Note: All lz-tool options must appear BEFORE the tool name.',\n )\n .version('1.0.0')\n .enablePositionalOptions(); // Required for passThroughOptions to work\n\n // Check for --list-versions before parsing to avoid help display\n if (process.argv.includes('--list-versions')) {\n displayVersionCombinations();\n return;\n }\n\n // Add global options\n program\n .option('-c, --cwd <path>', 'Current working directory', (input: string) => {\n if (typeof input !== 'string') {\n throw new Error('cwd flag must be a string');\n }\n\n if (!path.isAbsolute(input)) {\n throw new Error('cwd must be an absolute path if provided');\n }\n\n if (!fs.existsSync(input)) {\n throw new Error('cwd does not exist');\n }\n\n if (!fs.statSync(input).isDirectory()) {\n throw new Error('cwd must be a directory');\n }\n\n return input;\n })\n .option(\n '-e, --custom-entrypoint <entrypoint>',\n 'Override the default Docker entrypoint for the tool',\n )\n .option(\n '--script <script>',\n 'Execute a custom script using bash -c in the Docker container (e.g., --script \"npm install && npm test\")',\n )\n .option(\n '--env <name=value>',\n 'Set environment variables for Docker container (e.g., --env NODE_ENV=production)',\n (input: string, previous: EnvironmentVariable[]) => {\n const [name, ...valueParts] = input.split('=');\n if (name === '' || valueParts.length === 0) {\n throw new Error(\n `Invalid environment variable format: ${input}. Use --env NAME=VALUE`,\n );\n }\n const value = valueParts.join('='); // Handle values that contain '='\n previous.push({ name, value } satisfies EnvironmentVariable);\n return previous;\n },\n [],\n )\n .option(\n '-v, --volume <type:hostPath:containerPath[:name]>',\n 'Volume mappings in the format type:hostPath:containerPath[:name] (e.g., host:/host/path:/container/path or isolate::/container/path:volumeName)',\n (input: string, previous: VolumeMapping[]) => {\n const [type, hostPath, containerPath, name] = input.split(':');\n if (type !== 'host' && type !== 'isolate') {\n throw new Error(`Invalid volume type: ${type}`);\n }\n\n if (type === 'host' && (hostPath === undefined || hostPath === '')) {\n throw new Error(`Host path is required for volume type 'host'`);\n }\n\n if (containerPath === undefined || containerPath === '') {\n throw new Error(`Container path is required`);\n }\n previous.push({ type, hostPath, containerPath, name } satisfies VolumeMapping);\n return previous;\n },\n [],\n )\n .option(\n '-p, --publish <host_port:container_port>',\n \"Publish a container's port(s) to the host\",\n );\n\n // Add version options for each tool dynamically\n for (const tool of tools) {\n const optionFlag = `--${tool.name}-version <version>`;\n const defaultVersion = getToolDefaultVersion(tool.name);\n const supportedVersions = getToolSupportedVersions(tool.name);\n const description = `Specify ${tool.name} version (default: ${defaultVersion}, supported: ${supportedVersions.join(', ')})`;\n\n program.option(optionFlag, description);\n }\n\n // Add utility options\n program.option('--list-versions', 'Display all supported version combinations and exit');\n\n // Add version info command\n program\n .command('version-info <tool>')\n .description('Display detailed version information for a specific tool')\n .action((toolName: string) => displayToolVersionInfo(toolName));\n\n // Dynamically add commands for each supported tool\n for (const tool of tools) {\n // Don't add any options to the subcommand level.\n // All lz-tool options must be specified before the subcommand.\n program\n .command(tool.name, { isDefault: false })\n .description(`Run ${tool.name} with version checking`)\n .passThroughOptions(true) // Pass through all options after the subcommand\n .allowUnknownOption()\n .helpOption(false) // Disable automatic help option to pass --help to the tool\n .argument('[args...]', 'Arguments to pass to the tool')\n .action(async (args: string[]) => {\n // Get global options (specified before the subcommand)\n const globalOptions = program.opts<GlobalOptions>();\n\n await executeToolCommand(tool.name, args, {\n cwd: globalOptions.cwd ?? process.cwd(),\n volumes: globalOptions.volume,\n ...globalOptions,\n });\n });\n }\n\n const extra = program.command('extra').description('Extra commands for VM tooling');\n\n extra\n .command('starknet')\n .command('build-typescript-sdk')\n .description('Generate TypeScript SDK for Starknet')\n .argument('<package-name>', 'Scarb package name')\n .argument('<target-directory>', 'Scarb target directory')\n .argument('<src-directory>', 'TypeScript source directory')\n .action(starknet.buildTypescriptSdk);\n\n extra\n .command('sui')\n .command('build')\n .description('Build Sui contracts with shared dependency and configuration Docker volumes')\n .argument('[args...]', 'Arguments to pass to `sui move build` command')\n .passThroughOptions(true)\n .allowUnknownOption()\n .action(async (args: string[]) => {\n const options = program.opts<GlobalOptions>();\n\n await sui.build(args, {\n ...options,\n cwd: options.cwd ?? process.cwd(),\n volumes: options.volume,\n });\n });\n\n await program.parseAsync();\n}\n\nexport const main = async (): Promise<void> => {\n try {\n await run();\n } catch (error) {\n console.error('❌ VM tool execution failed', error);\n process.exit(1);\n }\n};\n"]}
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var HN3U775J_cjs = require('../HN3U775J.cjs');
4
3
  var _37UR3RSN_cjs = require('../37UR3RSN.cjs');
5
4
  var UN57VWAW_cjs = require('../UN57VWAW.cjs');
5
+ var HN3U775J_cjs = require('../HN3U775J.cjs');
6
6
  var F7OAIAEX_cjs = require('../F7OAIAEX.cjs');
7
7
  var P5BPMTGP_cjs = require('../P5BPMTGP.cjs');
8
8
  var OT5L7ME6_cjs = require('../OT5L7ME6.cjs');
@@ -10,7 +10,7 @@ var OWTMHDOF_cjs = require('../OWTMHDOF.cjs');
10
10
  require('../7WVEMAKW.cjs');
11
11
  require('../WDSPHVPJ.cjs');
12
12
  var JGLHYXTW_cjs = require('../JGLHYXTW.cjs');
13
- var WHAPJZ3U_cjs = require('../WHAPJZ3U.cjs');
13
+ var W6FCPNQL_cjs = require('../W6FCPNQL.cjs');
14
14
  var JLKKDVCL_cjs = require('../JLKKDVCL.cjs');
15
15
  var U7VZULNU_cjs = require('../U7VZULNU.cjs');
16
16
  var commander = require('commander');
@@ -163,11 +163,11 @@ var defaultProvider = /* @__PURE__ */ U7VZULNU_cjs.__name((init = {}) => JGLHYXT
163
163
  logger: init.logger
164
164
  });
165
165
  }
166
- const { fromSSO } = await import('../KFOKN2M2.cjs');
166
+ const { fromSSO } = await import('../4QL6ZBHT.cjs');
167
167
  return fromSSO(init)();
168
168
  }, async () => {
169
169
  init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
170
- const { fromIni } = await import('../SPOUVTPR.cjs');
170
+ const { fromIni } = await import('../KTAMTSBK.cjs');
171
171
  return fromIni(init)();
172
172
  }, async () => {
173
173
  init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
@@ -1927,7 +1927,7 @@ var ecrClient = new ECRClient();
1927
1927
  var command = new commander.Command().name("generate-github-matrix").requiredOption("--registry <registry>").parse();
1928
1928
  var { registry } = command.opts();
1929
1929
  var compileVersionCombinations = /* @__PURE__ */ U7VZULNU_cjs.__name(async (chainType, combinations) => {
1930
- const repository = path.join(WHAPJZ3U_cjs.ECR_IMAGE_DIRECTORY, WHAPJZ3U_cjs.getImageNameForType(chainType));
1930
+ const repository = path.join(W6FCPNQL_cjs.ECR_IMAGE_DIRECTORY, W6FCPNQL_cjs.getImageNameForType(chainType));
1931
1931
  let existingTags = /* @__PURE__ */ new Set();
1932
1932
  try {
1933
1933
  const imageIds = [];
@@ -1956,9 +1956,9 @@ var compileVersionCombinations = /* @__PURE__ */ U7VZULNU_cjs.__name(async (chai
1956
1956
  return combinations.map((combination) => ({
1957
1957
  name: chainType,
1958
1958
  build_args: Object.entries(combination.versions).sort().map(([key, value]) => `${key.toUpperCase()}_VERSION=${value}`),
1959
- directory: path.join("tools/vm-tooling/docker", WHAPJZ3U_cjs.getImageBasenameForType(chainType)),
1959
+ directory: path.join("tools/vm-tooling/docker", W6FCPNQL_cjs.getImageBasenameForType(chainType)),
1960
1960
  repository,
1961
- tags: tagSeparators.map((separator) => `${registry}/${repository}:${WHAPJZ3U_cjs.getImageTag(combination, separator)}`)
1961
+ tags: tagSeparators.map((separator) => `${registry}/${repository}:${W6FCPNQL_cjs.getImageTag(combination, separator)}`)
1962
1962
  })).filter(({ tags }) => !tags.some((tag) => existingTags.has(tag.split(":").at(-1))));
1963
1963
  }, "compileVersionCombinations");
1964
1964
  var main = /* @__PURE__ */ U7VZULNU_cjs.__name(async () => {
@@ -1,6 +1,6 @@
1
- import { ENV_KEY, ENV_SECRET, fromEnv } from '../5CI7X2D4.js';
2
1
  import { parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode } from '../CMSYZVLH.js';
3
2
  import { EndpointCache, awsEndpointFunctions, customEndpointFunctions, resolveUserAgentConfig, resolveRetryConfig, resolveRegionConfig, resolveHostHeaderConfig, resolveEndpointConfig, getUserAgentPlugin, getRetryPlugin, getContentLengthPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, getSerdePlugin, getEndpointPlugin, resolveDefaultsModeConfig, emitWarningIfUnsupportedVersion as emitWarningIfUnsupportedVersion$1, Hash, createDefaultUserAgentProvider, calculateBodyLength, NODE_APP_ID_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, DEFAULT_RETRY_MODE, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, resolveAwsSdkSigV4Config, normalizeProvider, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, getSmithyContext, AwsSdkSigV4Signer, resolveEndpoint } from '../FAOU2ZJO.js';
3
+ import { ENV_KEY, ENV_SECRET, fromEnv } from '../5CI7X2D4.js';
4
4
  import { loadConfig, parseUrl } from '../VLSIEZLM.js';
5
5
  import { ENV_PROFILE } from '../ELFNCT57.js';
6
6
  import { Client, ServiceException, withBaseException, Command, emitWarningIfUnsupportedVersion, streamCollector, NodeHttpHandler, getDefaultExtensionConfiguration, getHttpHandlerExtensionConfiguration, resolveDefaultRuntimeConfig, resolveHttpHandlerRuntimeConfig, _json, NoOpLogger, toBase64, fromBase64, loadConfigsForDefaultMode, HttpRequest, decorateServiceException } from '../4Q36MQI5.js';
@@ -8,7 +8,7 @@ import { toUtf8, fromUtf8 } from '../LMCIXUBF.js';
8
8
  import '../NDUVZQ7S.js';
9
9
  import '../OH4A2VLX.js';
10
10
  import { memoize, chain, CredentialsProviderError } from '../TTKDG2NN.js';
11
- import { ECR_IMAGE_DIRECTORY, getImageNameForType, getImageTag, getImageBasenameForType } from '../CJNBA2MN.js';
11
+ import { ECR_IMAGE_DIRECTORY, getImageNameForType, getImageTag, getImageBasenameForType } from '../KNTO2HQA.js';
12
12
  import { versionMatrices } from '../NX66I36H.js';
13
13
  import { init_esm_shims, __name } from '../4RNWLMHM.js';
14
14
  import { Command as Command$1 } from 'commander';
@@ -161,11 +161,11 @@ var defaultProvider = /* @__PURE__ */ __name((init = {}) => memoize(chain(async
161
161
  logger: init.logger
162
162
  });
163
163
  }
164
- const { fromSSO } = await import('../5QGJ7CFM.js');
164
+ const { fromSSO } = await import('../W5XVOHRB.js');
165
165
  return fromSSO(init)();
166
166
  }, async () => {
167
167
  init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
168
- const { fromIni } = await import('../U4OLGGKH.js');
168
+ const { fromIni } = await import('../Y3REZYJA.js');
169
169
  return fromIni(init)();
170
170
  }, async () => {
171
171
  init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/tool.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AA4BAA,2BAAA,EAAA","file":"tool.cjs","sourcesContent":["import type { ChainType } from '@layerzerolabs/layerzero-definitions';\n\nexport interface GetExpectedVersionParameter {\n cwd: string;\n}\n\n/**\n * Represents a VM tool with its configuration (version info managed by version-matrices)\n */\nexport interface Tool {\n name: string;\n chainType: ChainType;\n privileged?: boolean;\n\n // Default isolate volumes for caching (user volumes can override these)\n defaultVolumes?: VolumeMapping[];\n\n // Optional version parsing and validation functions\n getSecondaryVersionCheckValue?: (args: GetExpectedVersionParameter) => Version;\n}\n\n/**\n * Version interface\n */\nexport interface Version {\n version: string;\n}\n\n// Import VolumeMapping type for the defaultVolumes field\nimport type { VolumeMapping } from './docker';\n"]}
1
+ {"version":3,"sources":["../../src/types/tool.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AA4BAA,2BAAA,EAAA","file":"tool.cjs","sourcesContent":["import type { ChainType } from '@layerzerolabs/layerzero-definitions';\n\nexport interface GetExpectedVersionParameter {\n cwd: string;\n}\n\n/**\n * Represents a VM tool with its configuration (version info managed by version-matrices)\n */\nexport interface Tool {\n name: string;\n chainType: ChainType;\n privileged?: boolean;\n\n // Default isolate volumes for caching (user volumes can override these)\n defaultVolumes?: readonly VolumeMapping[];\n\n // Optional version parsing and validation functions\n getSecondaryVersionCheckValue?: (args: GetExpectedVersionParameter) => Version;\n}\n\n/**\n * Version interface\n */\nexport interface Version {\n version: string;\n}\n\n// Import VolumeMapping type for the defaultVolumes field\nimport type { VolumeMapping } from './docker';\n"]}
@@ -9,7 +9,7 @@ export interface Tool {
9
9
  name: string;
10
10
  chainType: ChainType;
11
11
  privileged?: boolean;
12
- defaultVolumes?: VolumeMapping[];
12
+ defaultVolumes?: readonly VolumeMapping[];
13
13
  getSecondaryVersionCheckValue?: (args: GetExpectedVersionParameter) => Version;
14
14
  }
15
15
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/types/tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEtE,MAAM,WAAW,2BAA2B;IACxC,GAAG,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IAGrB,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IAGjC,6BAA6B,CAAC,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,OAAO,CAAC;CAClF;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACpB,OAAO,EAAE,MAAM,CAAC;CACnB;AAGD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/types/tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEtE,MAAM,WAAW,2BAA2B;IACxC,GAAG,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IAGrB,cAAc,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IAG1C,6BAA6B,CAAC,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,OAAO,CAAC;CAClF;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACpB,OAAO,EAAE,MAAM,CAAC;CACnB;AAGD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/tool.ts"],"names":[],"mappings":";;;AA4BA,cAAA,EAAA","file":"tool.js","sourcesContent":["import type { ChainType } from '@layerzerolabs/layerzero-definitions';\n\nexport interface GetExpectedVersionParameter {\n cwd: string;\n}\n\n/**\n * Represents a VM tool with its configuration (version info managed by version-matrices)\n */\nexport interface Tool {\n name: string;\n chainType: ChainType;\n privileged?: boolean;\n\n // Default isolate volumes for caching (user volumes can override these)\n defaultVolumes?: VolumeMapping[];\n\n // Optional version parsing and validation functions\n getSecondaryVersionCheckValue?: (args: GetExpectedVersionParameter) => Version;\n}\n\n/**\n * Version interface\n */\nexport interface Version {\n version: string;\n}\n\n// Import VolumeMapping type for the defaultVolumes field\nimport type { VolumeMapping } from './docker';\n"]}
1
+ {"version":3,"sources":["../../src/types/tool.ts"],"names":[],"mappings":";;;AA4BA,cAAA,EAAA","file":"tool.js","sourcesContent":["import type { ChainType } from '@layerzerolabs/layerzero-definitions';\n\nexport interface GetExpectedVersionParameter {\n cwd: string;\n}\n\n/**\n * Represents a VM tool with its configuration (version info managed by version-matrices)\n */\nexport interface Tool {\n name: string;\n chainType: ChainType;\n privileged?: boolean;\n\n // Default isolate volumes for caching (user volumes can override these)\n defaultVolumes?: readonly VolumeMapping[];\n\n // Optional version parsing and validation functions\n getSecondaryVersionCheckValue?: (args: GetExpectedVersionParameter) => Version;\n}\n\n/**\n * Version interface\n */\nexport interface Version {\n version: string;\n}\n\n// Import VolumeMapping type for the defaultVolumes field\nimport type { VolumeMapping } from './docker';\n"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var WHAPJZ3U_cjs = require('../WHAPJZ3U.cjs');
3
+ var W6FCPNQL_cjs = require('../W6FCPNQL.cjs');
4
4
  require('../JLKKDVCL.cjs');
5
5
  require('../U7VZULNU.cjs');
6
6
 
@@ -8,11 +8,11 @@ require('../U7VZULNU.cjs');
8
8
 
9
9
  Object.defineProperty(exports, "getImageTag", {
10
10
  enumerable: true,
11
- get: function () { return WHAPJZ3U_cjs.getImageTag; }
11
+ get: function () { return W6FCPNQL_cjs.getImageTag; }
12
12
  });
13
13
  Object.defineProperty(exports, "getImageURI", {
14
14
  enumerable: true,
15
- get: function () { return WHAPJZ3U_cjs.getImageURI; }
15
+ get: function () { return W6FCPNQL_cjs.getImageURI; }
16
16
  });
17
17
  //# sourceMappingURL=docker.cjs.map
18
18
  //# sourceMappingURL=docker.cjs.map
@@ -1,4 +1,4 @@
1
- export { getImageTag, getImageURI } from '../CJNBA2MN.js';
1
+ export { getImageTag, getImageURI } from '../KNTO2HQA.js';
2
2
  import '../NX66I36H.js';
3
3
  import '../4RNWLMHM.js';
4
4
  //# sourceMappingURL=docker.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var WHAPJZ3U_cjs = require('../WHAPJZ3U.cjs');
3
+ var W6FCPNQL_cjs = require('../W6FCPNQL.cjs');
4
4
  require('../JLKKDVCL.cjs');
5
5
  require('../U7VZULNU.cjs');
6
6
 
@@ -8,39 +8,39 @@ require('../U7VZULNU.cjs');
8
8
 
9
9
  Object.defineProperty(exports, "findMatrixForTool", {
10
10
  enumerable: true,
11
- get: function () { return WHAPJZ3U_cjs.findMatrixForTool; }
11
+ get: function () { return W6FCPNQL_cjs.findMatrixForTool; }
12
12
  });
13
13
  Object.defineProperty(exports, "findToolByName", {
14
14
  enumerable: true,
15
- get: function () { return WHAPJZ3U_cjs.findToolByName; }
15
+ get: function () { return W6FCPNQL_cjs.findToolByName; }
16
16
  });
17
17
  Object.defineProperty(exports, "findToolsByType", {
18
18
  enumerable: true,
19
- get: function () { return WHAPJZ3U_cjs.findToolsByType; }
19
+ get: function () { return W6FCPNQL_cjs.findToolsByType; }
20
20
  });
21
21
  Object.defineProperty(exports, "getChainTypeForTool", {
22
22
  enumerable: true,
23
- get: function () { return WHAPJZ3U_cjs.getChainTypeForTool; }
23
+ get: function () { return W6FCPNQL_cjs.getChainTypeForTool; }
24
24
  });
25
25
  Object.defineProperty(exports, "getImageBasenameForType", {
26
26
  enumerable: true,
27
- get: function () { return WHAPJZ3U_cjs.getImageBasenameForType; }
27
+ get: function () { return W6FCPNQL_cjs.getImageBasenameForType; }
28
28
  });
29
29
  Object.defineProperty(exports, "getImageNameForTool", {
30
30
  enumerable: true,
31
- get: function () { return WHAPJZ3U_cjs.getImageNameForTool; }
31
+ get: function () { return W6FCPNQL_cjs.getImageNameForTool; }
32
32
  });
33
33
  Object.defineProperty(exports, "getImageNameForType", {
34
34
  enumerable: true,
35
- get: function () { return WHAPJZ3U_cjs.getImageNameForType; }
35
+ get: function () { return W6FCPNQL_cjs.getImageNameForType; }
36
36
  });
37
37
  Object.defineProperty(exports, "getToolDefaultVersion", {
38
38
  enumerable: true,
39
- get: function () { return WHAPJZ3U_cjs.getToolDefaultVersion; }
39
+ get: function () { return W6FCPNQL_cjs.getToolDefaultVersion; }
40
40
  });
41
41
  Object.defineProperty(exports, "getToolSupportedVersions", {
42
42
  enumerable: true,
43
- get: function () { return WHAPJZ3U_cjs.getToolSupportedVersions; }
43
+ get: function () { return W6FCPNQL_cjs.getToolSupportedVersions; }
44
44
  });
45
45
  //# sourceMappingURL=finder.cjs.map
46
46
  //# sourceMappingURL=finder.cjs.map
@@ -1,4 +1,4 @@
1
- export { findMatrixForTool, findToolByName, findToolsByType, getChainTypeForTool, getImageBasenameForType, getImageNameForTool, getImageNameForType, getToolDefaultVersion, getToolSupportedVersions } from '../CJNBA2MN.js';
1
+ export { findMatrixForTool, findToolByName, findToolsByType, getChainTypeForTool, getImageBasenameForType, getImageNameForTool, getImageNameForType, getToolDefaultVersion, getToolSupportedVersions } from '../KNTO2HQA.js';
2
2
  import '../NX66I36H.js';
3
3
  import '../4RNWLMHM.js';
4
4
  //# sourceMappingURL=finder.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var WHAPJZ3U_cjs = require('../WHAPJZ3U.cjs');
3
+ var W6FCPNQL_cjs = require('../W6FCPNQL.cjs');
4
4
  require('../JLKKDVCL.cjs');
5
5
  require('../U7VZULNU.cjs');
6
6
 
@@ -8,19 +8,19 @@ require('../U7VZULNU.cjs');
8
8
 
9
9
  Object.defineProperty(exports, "findSemVersionFromString", {
10
10
  enumerable: true,
11
- get: function () { return WHAPJZ3U_cjs.findSemVersionFromString; }
11
+ get: function () { return W6FCPNQL_cjs.findSemVersionFromString; }
12
12
  });
13
13
  Object.defineProperty(exports, "parseAnchorTomlVersion", {
14
14
  enumerable: true,
15
- get: function () { return WHAPJZ3U_cjs.parseAnchorTomlVersion; }
15
+ get: function () { return W6FCPNQL_cjs.parseAnchorTomlVersion; }
16
16
  });
17
17
  Object.defineProperty(exports, "validateToolVersion", {
18
18
  enumerable: true,
19
- get: function () { return WHAPJZ3U_cjs.validateToolVersion; }
19
+ get: function () { return W6FCPNQL_cjs.validateToolVersion; }
20
20
  });
21
21
  Object.defineProperty(exports, "versionsSatisfied", {
22
22
  enumerable: true,
23
- get: function () { return WHAPJZ3U_cjs.versionsSatisfied; }
23
+ get: function () { return W6FCPNQL_cjs.versionsSatisfied; }
24
24
  });
25
25
  //# sourceMappingURL=version.cjs.map
26
26
  //# sourceMappingURL=version.cjs.map
@@ -1,4 +1,4 @@
1
- export { findSemVersionFromString, parseAnchorTomlVersion, validateToolVersion, versionsSatisfied } from '../CJNBA2MN.js';
1
+ export { findSemVersionFromString, parseAnchorTomlVersion, validateToolVersion, versionsSatisfied } from '../KNTO2HQA.js';
2
2
  import '../NX66I36H.js';
3
3
  import '../4RNWLMHM.js';
4
4
  //# sourceMappingURL=version.js.map
package/dist/utils.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var WHAPJZ3U_cjs = require('./WHAPJZ3U.cjs');
3
+ var W6FCPNQL_cjs = require('./W6FCPNQL.cjs');
4
4
  require('./JLKKDVCL.cjs');
5
5
  require('./U7VZULNU.cjs');
6
6
 
@@ -8,15 +8,15 @@ require('./U7VZULNU.cjs');
8
8
 
9
9
  Object.defineProperty(exports, "findParentDirectoryWithFile", {
10
10
  enumerable: true,
11
- get: function () { return WHAPJZ3U_cjs.findParentDirectoryWithFile; }
11
+ get: function () { return W6FCPNQL_cjs.findParentDirectoryWithFile; }
12
12
  });
13
13
  Object.defineProperty(exports, "getCombinationId", {
14
14
  enumerable: true,
15
- get: function () { return WHAPJZ3U_cjs.getCombinationId; }
15
+ get: function () { return W6FCPNQL_cjs.getCombinationId; }
16
16
  });
17
17
  Object.defineProperty(exports, "parseVersionFileContents", {
18
18
  enumerable: true,
19
- get: function () { return WHAPJZ3U_cjs.parseVersionFileContents; }
19
+ get: function () { return W6FCPNQL_cjs.parseVersionFileContents; }
20
20
  });
21
21
  //# sourceMappingURL=utils.cjs.map
22
22
  //# sourceMappingURL=utils.cjs.map
package/dist/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- export { findParentDirectoryWithFile, getCombinationId, parseVersionFileContents } from './CJNBA2MN.js';
1
+ export { findParentDirectoryWithFile, getCombinationId, parseVersionFileContents } from './KNTO2HQA.js';
2
2
  import './NX66I36H.js';
3
3
  import './4RNWLMHM.js';
4
4
  //# sourceMappingURL=utils.js.map
package/package.json CHANGED
@@ -26,8 +26,8 @@
26
26
  "semver": "^7.5.4",
27
27
  "zod": "3.25.56",
28
28
  "zx": "^8.1.3",
29
- "@layerzerolabs/common-node-utils": "0.0.63",
30
- "@layerzerolabs/layerzero-definitions": "0.0.63"
29
+ "@layerzerolabs/common-node-utils": "0.0.64",
30
+ "@layerzerolabs/layerzero-definitions": "0.0.64"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@aws-sdk/client-ecr": "3.879.0",
@@ -40,14 +40,14 @@
40
40
  "tsx": "^4.19.3",
41
41
  "typescript": "^5.8.2",
42
42
  "vitest": "^3.2.3",
43
- "@layerzerolabs/typescript-configuration": "0.0.63",
44
- "@layerzerolabs/tsup-configuration": "0.0.63"
43
+ "@layerzerolabs/tsup-configuration": "0.0.64",
44
+ "@layerzerolabs/typescript-configuration": "0.0.64"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "restricted",
48
48
  "registry": "https://registry.npmjs.org/"
49
49
  },
50
- "version": "0.0.63",
50
+ "version": "0.0.64",
51
51
  "scripts": {
52
52
  "prebuild": "chmod +x bin/lz-tool.js",
53
53
  "build": "tsup",