@layerzerolabs/vm-tooling-stellar 0.2.36 → 0.2.38

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.
@@ -0,0 +1,64 @@
1
+ 'use strict';
2
+
3
+ var JBSG7YXG_cjs = require('./JBSG7YXG.cjs');
4
+ var fs = require('fs');
5
+ var path = require('path');
6
+ var toml = require('toml');
7
+ var vmTooling = require('@layerzerolabs/vm-tooling');
8
+
9
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+
11
+ var fs__default = /*#__PURE__*/_interopDefault(fs);
12
+ var path__default = /*#__PURE__*/_interopDefault(path);
13
+
14
+ // src/commands/sync-toolchain.ts
15
+ JBSG7YXG_cjs.init_cjs_shims();
16
+ async function syncToolchain(context, options) {
17
+ const filePath = path__default.default.join(options.cwd, "rust-toolchain.toml");
18
+ if (!fs__default.default.existsSync(filePath)) {
19
+ console.info("No rust-toolchain.toml found, skipping toolchain sync");
20
+ return;
21
+ }
22
+ const parsed = toml.parse(fs__default.default.readFileSync(filePath, "utf-8"));
23
+ const channel = parsed.toolchain?.channel;
24
+ if (typeof channel !== "string") {
25
+ throw new Error(`Missing 'toolchain.channel' in ${filePath}`);
26
+ }
27
+ const targets = parsed.toolchain?.targets ?? [];
28
+ const components = parsed.toolchain?.components ?? [];
29
+ const installArgs = [
30
+ `rustup toolchain install ${channel}`
31
+ ];
32
+ for (const target of targets) {
33
+ installArgs.push(`--target ${target}`);
34
+ }
35
+ for (const component of components) {
36
+ installArgs.push(`--component ${component}`);
37
+ }
38
+ const installCmd = installArgs.join(" ");
39
+ const script = [
40
+ "mkdir -p $CARGO_HOME/bin",
41
+ "ln -sf /usr/local/cargo/bin/rustup $CARGO_HOME/bin/rustup",
42
+ installCmd
43
+ ].join(" && ");
44
+ console.info(`\u{1F527} Syncing Rust toolchain: ${installCmd}`);
45
+ await vmTooling.executeToolCommand(context, "stellar", [], {
46
+ ...options,
47
+ script,
48
+ volumes: [
49
+ ...options.volumes,
50
+ {
51
+ type: "isolate",
52
+ containerPath: "/cache/rustup",
53
+ name: "stellar-rustup",
54
+ shared: true,
55
+ locked: true
56
+ }
57
+ ]
58
+ });
59
+ }
60
+ JBSG7YXG_cjs.__name(syncToolchain, "syncToolchain");
61
+
62
+ exports.syncToolchain = syncToolchain;
63
+ //# sourceMappingURL=7MLNLFZC.cjs.map
64
+ //# sourceMappingURL=7MLNLFZC.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/sync-toolchain.ts"],"names":["init_cjs_shims","syncToolchain","context","options","filePath","path","join","cwd","fs","existsSync","console","info","parsed","parse","readFileSync","channel","toolchain","Error","targets","components","installArgs","target","push","component","installCmd","script","executeToolCommand","volumes","type","containerPath","name","shared","locked"],"mappings":";;;;;;;;;;;;;;AAAAA,2BAAA,EAAA;AAeA,eAAsBC,aAAAA,CAClBC,SACAC,OAAAA,EAAoC;AAEpC,EAAA,MAAMC,QAAAA,GAAWC,qBAAAA,CAAKC,IAAAA,CAAKH,OAAAA,CAAQI,KAAK,qBAAA,CAAA;AACxC,EAAA,IAAI,CAACC,mBAAAA,CAAGC,UAAAA,CAAWL,QAAAA,CAAAA,EAAW;AAC1BM,IAAAA,OAAAA,CAAQC,KAAK,uDAAA,CAAA;AACb,IAAA;AACJ,EAAA;AACA,EAAA,MAAMC,SAA4BC,UAAAA,CAAML,mBAAAA,CAAGM,YAAAA,CAAaV,QAAAA,EAAU,OAAA,CAAA,CAAA;AAElE,EAAA,MAAMW,OAAAA,GAAUH,OAAOI,SAAAA,EAAWD,OAAAA;AAClC,EAAA,IAAI,OAAOA,YAAY,QAAA,EAAU;AAC7B,IAAA,MAAM,IAAIE,KAAAA,CAAM,CAAA,+BAAA,EAAkCb,QAAAA,CAAAA,CAAU,CAAA;AAChE,EAAA;AAEA,EAAA,MAAMc,OAAAA,GAAoBN,MAAAA,CAAOI,SAAAA,EAAWE,OAAAA,IAAW,EAAA;AACvD,EAAA,MAAMC,UAAAA,GAAuBP,MAAAA,CAAOI,SAAAA,EAAWG,UAAAA,IAAc,EAAA;AAE7D,EAAA,MAAMC,WAAAA,GAAc;AAAC,IAAA,CAAA,yBAAA,EAA4BL,OAAAA,CAAAA;;AACjD,EAAA,KAAA,MAAWM,UAAUH,OAAAA,EAAS;AAC1BE,IAAAA,WAAAA,CAAYE,IAAAA,CAAK,CAAA,SAAA,EAAYD,MAAAA,CAAAA,CAAQ,CAAA;AACzC,EAAA;AACA,EAAA,KAAA,MAAWE,aAAaJ,UAAAA,EAAY;AAChCC,IAAAA,WAAAA,CAAYE,IAAAA,CAAK,CAAA,YAAA,EAAeC,SAAAA,CAAAA,CAAW,CAAA;AAC/C,EAAA;AAEA,EAAA,MAAMC,UAAAA,GAAaJ,WAAAA,CAAYd,IAAAA,CAAK,GAAA,CAAA;AAIpC,EAAA,MAAMmB,MAAAA,GAAS;AACX,IAAA,0BAAA;AACA,IAAA,2DAAA;AACAD,IAAAA;AACFlB,GAAAA,CAAAA,IAAAA,CAAK,MAAA,CAAA;AACPI,EAAAA,OAAAA,CAAQC,IAAAA,CAAK,CAAA,kCAAA,EAA8Ba,UAAAA,CAAAA,CAAY,CAAA;AAEvD,EAAA,MAAME,4BAAAA,CAAmBxB,OAAAA,EAAS,SAAA,EAAW,EAAA,EAAI;IAC7C,GAAGC,OAAAA;AACHsB,IAAAA,MAAAA;IACAE,OAAAA,EAAS;SACFxB,OAAAA,CAAQwB,OAAAA;AACX,MAAA;QACIC,IAAAA,EAAM,SAAA;QACNC,aAAAA,EAAe,eAAA;QACfC,IAAAA,EAAM,gBAAA;QACNC,MAAAA,EAAQ,IAAA;QACRC,MAAAA,EAAQ;AACZ;;GAER,CAAA;AACJ;AApDsB/B,mBAAAA,CAAAA,aAAAA,EAAAA,eAAAA,CAAAA","file":"7MLNLFZC.cjs","sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { parse } from 'toml';\n\nimport type { ChainContext, ToolCommandExecutionOptions } from '@layerzerolabs/vm-tooling';\nimport { executeToolCommand } from '@layerzerolabs/vm-tooling';\n\ninterface RustToolchainToml {\n toolchain?: {\n channel?: string;\n targets?: string[];\n components?: string[];\n };\n}\n\nexport async function syncToolchain(\n context: ChainContext<string>,\n options: ToolCommandExecutionOptions,\n): Promise<void> {\n const filePath = path.join(options.cwd, 'rust-toolchain.toml');\n if (!fs.existsSync(filePath)) {\n console.info('No rust-toolchain.toml found, skipping toolchain sync');\n return;\n }\n const parsed: RustToolchainToml = parse(fs.readFileSync(filePath, 'utf-8'));\n\n const channel = parsed.toolchain?.channel;\n if (typeof channel !== 'string') {\n throw new Error(`Missing 'toolchain.channel' in ${filePath}`);\n }\n\n const targets: string[] = parsed.toolchain?.targets ?? [];\n const components: string[] = parsed.toolchain?.components ?? [];\n\n const installArgs = [`rustup toolchain install ${channel}`];\n for (const target of targets) {\n installArgs.push(`--target ${target}`);\n }\n for (const component of components) {\n installArgs.push(`--component ${component}`);\n }\n\n const installCmd = installArgs.join(' ');\n // rustup expects to find itself at $CARGO_HOME/bin/rustup to manage proxy\n // binaries there. At runtime CARGO_HOME points to /cache/cargo (volume),\n // so we symlink the image-installed rustup binary into the volume.\n const script = [\n 'mkdir -p $CARGO_HOME/bin',\n 'ln -sf /usr/local/cargo/bin/rustup $CARGO_HOME/bin/rustup',\n installCmd,\n ].join(' && ');\n console.info(`🔧 Syncing Rust toolchain: ${installCmd}`);\n\n await executeToolCommand(context, 'stellar', [], {\n ...options,\n script,\n volumes: [\n ...options.volumes,\n {\n type: 'isolate',\n containerPath: '/cache/rustup',\n name: 'stellar-rustup',\n shared: true,\n locked: true,\n },\n ],\n });\n}\n"]}
@@ -7,28 +7,30 @@ var tools = [
7
7
  {
8
8
  name: "stellar",
9
9
  defaultVolumes: [
10
- // Use neutral paths (not /root/...) for user-agnostic caching
10
+ // NOTE: for configuration commands, you should never put it in your package.json#build or #test, since the config is locked for parallel builds
11
+ // while common commands like contract build and binding generation are allowed since they are not writing to the config files
11
12
  {
12
13
  type: "isolate",
13
14
  containerPath: "/cache/stellar",
14
15
  name: "stellar-config",
15
- shared: true,
16
- locked: true
16
+ shared: true
17
17
  },
18
+ // safe to be unlocked as it is POSIX lock guarded
18
19
  {
19
20
  type: "isolate",
20
21
  containerPath: "/cache/cargo",
21
22
  name: "stellar-cargo",
22
- shared: true,
23
- locked: true
23
+ shared: true
24
24
  },
25
+ // shared across packages — toolchain is pre-synced via `sync-toolchain` (locked)
26
+ // so concurrent reads from build/test/lint are safe
25
27
  {
26
28
  type: "isolate",
27
29
  containerPath: "/cache/rustup",
28
30
  name: "stellar-rustup",
29
- shared: true,
30
- locked: true
31
+ shared: true
31
32
  },
33
+ // safe as the wort case of corruption is cache miss, since it is key-based cache, concurrent writes will produce identical content
32
34
  {
33
35
  type: "host",
34
36
  containerPath: "/cache/sccache",
@@ -111,5 +113,5 @@ var versionCombinations = [
111
113
  ];
112
114
 
113
115
  export { images, tools, versionCombinations };
114
- //# sourceMappingURL=FV4ECYCI.js.map
115
- //# sourceMappingURL=FV4ECYCI.js.map
116
+ //# sourceMappingURL=BHDA5WPF.js.map
117
+ //# sourceMappingURL=BHDA5WPF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/config.ts"],"names":["tools","name","defaultVolumes","type","containerPath","shared","hostPath","defaultEnv","value","images","versions","stellar","patch","unreleased","mirrorRegistries","DockerRegistryMirror","PUBLIC_GAR","versionCombinations","description","stable"],"mappings":";;;;AAAA,cAAA,EAAA;AAOO,IAAMA,KAAAA,GAAoC;AAC7C,EAAA;IACIC,IAAAA,EAAM,SAAA;IACNC,cAAAA,EAAgB;;;AAGZ,MAAA;QACIC,IAAAA,EAAM,SAAA;QACNC,aAAAA,EAAe,gBAAA;QACfH,IAAAA,EAAM,gBAAA;QACNI,MAAAA,EAAQ;AACZ,OAAA;;AAEA,MAAA;QACIF,IAAAA,EAAM,SAAA;QACNC,aAAAA,EAAe,cAAA;QACfH,IAAAA,EAAM,eAAA;QACNI,MAAAA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,QAAAA,EAAU;MACNC,OAAAA,EAAS;AACb,KAAA;IACAE,UAAAA,EAAY,IAAA;IACZC,gBAAAA,EAAkB;MAACC,oBAAAA,CAAqBC;;AAC5C;AACJ;AAIO,IAAMC,mBAAAA,GACT;AACI,EAAA;IACIR,MAAAA,EAAQ;MACJE,OAAAA,EAAS;AACb,KAAA;IACAO,WAAAA,EAAa,uBAAA;IACbC,MAAAA,EAAQ;AACZ","file":"BHDA5WPF.js","sourcesContent":["import {\n DockerRegistryMirror,\n type Image,\n type Tool,\n type VersionCombination,\n} from '@layerzerolabs/vm-tooling';\n\nexport const tools: readonly [Tool, ...Tool[]] = [\n {\n name: 'stellar',\n defaultVolumes: [\n // NOTE: for configuration commands, you should never put it in your package.json#build or #test, since the config is locked for parallel builds\n // while common commands like contract build and binding generation are allowed since they are not writing to the config files\n {\n type: 'isolate',\n containerPath: '/cache/stellar',\n name: 'stellar-config',\n shared: true,\n },\n // safe to be unlocked as it is POSIX lock guarded\n {\n type: 'isolate',\n containerPath: '/cache/cargo',\n name: 'stellar-cargo',\n shared: true,\n },\n // shared across packages — toolchain is pre-synced via `sync-toolchain` (locked)\n // so concurrent reads from build/test/lint are safe\n {\n type: 'isolate',\n containerPath: '/cache/rustup',\n name: 'stellar-rustup',\n shared: true,\n },\n // safe as the wort case of corruption is cache miss, since it is key-based cache, concurrent writes will produce identical content\n {\n type: 'host',\n containerPath: '/cache/sccache',\n hostPath: '~/.sccache',\n },\n ],\n defaultEnv: [\n // sccache configuration\n { name: 'RUSTC_WRAPPER', value: '/usr/local/bin/sccache' },\n // mold linker for faster linking\n { name: 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER', value: 'clang' },\n { name: 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER', value: 'clang' },\n {\n name: 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS',\n value: '-C link-arg=-fuse-ld=mold',\n },\n {\n name: 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS',\n value: '-C link-arg=-fuse-ld=mold',\n },\n ],\n },\n];\n\nexport const images = {\n ['stellar:stellar-23.1.4']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n },\n ['stellar:stellar-23.1.4-patch-1']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n patch: 1,\n },\n ['stellar:stellar-23.1.4-patch-3']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n patch: 3,\n },\n ['stellar:stellar-23.1.4-patch-6']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n patch: 6,\n },\n ['stellar:stellar-25.0.0']: {\n name: 'stellar',\n versions: {\n stellar: '25.0.0',\n },\n unreleased: true,\n mirrorRegistries: [DockerRegistryMirror.PUBLIC_GAR],\n },\n} satisfies Record<string, Image>;\n\nexport type ImageId = keyof typeof images;\n\nexport const versionCombinations: [VersionCombination<ImageId>, ...VersionCombination<ImageId>[]] =\n [\n {\n images: {\n stellar: 'stellar:stellar-25.0.0',\n },\n description: 'Latest stable release',\n stable: true,\n },\n ];\n"]}
@@ -0,0 +1,57 @@
1
+ import { init_esm_shims, __name } from './PHXMTVK6.js';
2
+ import fs from 'fs';
3
+ import path from 'path';
4
+ import { parse } from 'toml';
5
+ import { executeToolCommand } from '@layerzerolabs/vm-tooling';
6
+
7
+ // src/commands/sync-toolchain.ts
8
+ init_esm_shims();
9
+ async function syncToolchain(context, options) {
10
+ const filePath = path.join(options.cwd, "rust-toolchain.toml");
11
+ if (!fs.existsSync(filePath)) {
12
+ console.info("No rust-toolchain.toml found, skipping toolchain sync");
13
+ return;
14
+ }
15
+ const parsed = parse(fs.readFileSync(filePath, "utf-8"));
16
+ const channel = parsed.toolchain?.channel;
17
+ if (typeof channel !== "string") {
18
+ throw new Error(`Missing 'toolchain.channel' in ${filePath}`);
19
+ }
20
+ const targets = parsed.toolchain?.targets ?? [];
21
+ const components = parsed.toolchain?.components ?? [];
22
+ const installArgs = [
23
+ `rustup toolchain install ${channel}`
24
+ ];
25
+ for (const target of targets) {
26
+ installArgs.push(`--target ${target}`);
27
+ }
28
+ for (const component of components) {
29
+ installArgs.push(`--component ${component}`);
30
+ }
31
+ const installCmd = installArgs.join(" ");
32
+ const script = [
33
+ "mkdir -p $CARGO_HOME/bin",
34
+ "ln -sf /usr/local/cargo/bin/rustup $CARGO_HOME/bin/rustup",
35
+ installCmd
36
+ ].join(" && ");
37
+ console.info(`\u{1F527} Syncing Rust toolchain: ${installCmd}`);
38
+ await executeToolCommand(context, "stellar", [], {
39
+ ...options,
40
+ script,
41
+ volumes: [
42
+ ...options.volumes,
43
+ {
44
+ type: "isolate",
45
+ containerPath: "/cache/rustup",
46
+ name: "stellar-rustup",
47
+ shared: true,
48
+ locked: true
49
+ }
50
+ ]
51
+ });
52
+ }
53
+ __name(syncToolchain, "syncToolchain");
54
+
55
+ export { syncToolchain };
56
+ //# sourceMappingURL=PIFLCQLQ.js.map
57
+ //# sourceMappingURL=PIFLCQLQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/sync-toolchain.ts"],"names":["syncToolchain","context","options","filePath","path","join","cwd","fs","existsSync","console","info","parsed","parse","readFileSync","channel","toolchain","Error","targets","components","installArgs","target","push","component","installCmd","script","executeToolCommand","volumes","type","containerPath","name","shared","locked"],"mappings":";;;;;;;AAAA,cAAA,EAAA;AAeA,eAAsBA,aAAAA,CAClBC,SACAC,OAAAA,EAAoC;AAEpC,EAAA,MAAMC,QAAAA,GAAWC,IAAAA,CAAKC,IAAAA,CAAKH,OAAAA,CAAQI,KAAK,qBAAA,CAAA;AACxC,EAAA,IAAI,CAACC,EAAAA,CAAGC,UAAAA,CAAWL,QAAAA,CAAAA,EAAW;AAC1BM,IAAAA,OAAAA,CAAQC,KAAK,uDAAA,CAAA;AACb,IAAA;AACJ,EAAA;AACA,EAAA,MAAMC,SAA4BC,KAAAA,CAAML,EAAAA,CAAGM,YAAAA,CA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,CAAQwB,OAAAA;AACX,MAAA;QACIC,IAAAA,EAAM,SAAA;QACNC,aAAAA,EAAe,eAAA;QACfC,IAAAA,EAAM,gBAAA;QACNC,MAAAA,EAAQ,IAAA;QACRC,MAAAA,EAAQ;AACZ;;GAER,CAAA;AACJ;AApDsB/B,MAAAA,CAAAA,aAAAA,EAAAA,eAAAA,CAAAA","file":"PIFLCQLQ.js","sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { parse } from 'toml';\n\nimport type { ChainContext, ToolCommandExecutionOptions } from '@layerzerolabs/vm-tooling';\nimport { executeToolCommand } from '@layerzerolabs/vm-tooling';\n\ninterface RustToolchainToml {\n toolchain?: {\n channel?: string;\n targets?: string[];\n components?: string[];\n };\n}\n\nexport async function syncToolchain(\n context: ChainContext<string>,\n options: ToolCommandExecutionOptions,\n): Promise<void> {\n const filePath = path.join(options.cwd, 'rust-toolchain.toml');\n if (!fs.existsSync(filePath)) {\n console.info('No rust-toolchain.toml found, skipping toolchain sync');\n return;\n }\n const parsed: RustToolchainToml = parse(fs.readFileSync(filePath, 'utf-8'));\n\n const channel = parsed.toolchain?.channel;\n if (typeof channel !== 'string') {\n throw new Error(`Missing 'toolchain.channel' in ${filePath}`);\n }\n\n const targets: string[] = parsed.toolchain?.targets ?? [];\n const components: string[] = parsed.toolchain?.components ?? [];\n\n const installArgs = [`rustup toolchain install ${channel}`];\n for (const target of targets) {\n installArgs.push(`--target ${target}`);\n }\n for (const component of components) {\n installArgs.push(`--component ${component}`);\n }\n\n const installCmd = installArgs.join(' ');\n // rustup expects to find itself at $CARGO_HOME/bin/rustup to manage proxy\n // binaries there. At runtime CARGO_HOME points to /cache/cargo (volume),\n // so we symlink the image-installed rustup binary into the volume.\n const script = [\n 'mkdir -p $CARGO_HOME/bin',\n 'ln -sf /usr/local/cargo/bin/rustup $CARGO_HOME/bin/rustup',\n installCmd,\n ].join(' && ');\n console.info(`🔧 Syncing Rust toolchain: ${installCmd}`);\n\n await executeToolCommand(context, 'stellar', [], {\n ...options,\n script,\n volumes: [\n ...options.volumes,\n {\n type: 'isolate',\n containerPath: '/cache/rustup',\n name: 'stellar-rustup',\n shared: true,\n locked: true,\n },\n ],\n });\n}\n"]}
@@ -9,28 +9,30 @@ var tools = [
9
9
  {
10
10
  name: "stellar",
11
11
  defaultVolumes: [
12
- // Use neutral paths (not /root/...) for user-agnostic caching
12
+ // NOTE: for configuration commands, you should never put it in your package.json#build or #test, since the config is locked for parallel builds
13
+ // while common commands like contract build and binding generation are allowed since they are not writing to the config files
13
14
  {
14
15
  type: "isolate",
15
16
  containerPath: "/cache/stellar",
16
17
  name: "stellar-config",
17
- shared: true,
18
- locked: true
18
+ shared: true
19
19
  },
20
+ // safe to be unlocked as it is POSIX lock guarded
20
21
  {
21
22
  type: "isolate",
22
23
  containerPath: "/cache/cargo",
23
24
  name: "stellar-cargo",
24
- shared: true,
25
- locked: true
25
+ shared: true
26
26
  },
27
+ // shared across packages — toolchain is pre-synced via `sync-toolchain` (locked)
28
+ // so concurrent reads from build/test/lint are safe
27
29
  {
28
30
  type: "isolate",
29
31
  containerPath: "/cache/rustup",
30
32
  name: "stellar-rustup",
31
- shared: true,
32
- locked: true
33
+ shared: true
33
34
  },
35
+ // safe as the wort case of corruption is cache miss, since it is key-based cache, concurrent writes will produce identical content
34
36
  {
35
37
  type: "host",
36
38
  containerPath: "/cache/sccache",
@@ -115,5 +117,5 @@ var versionCombinations = [
115
117
  exports.images = images;
116
118
  exports.tools = tools;
117
119
  exports.versionCombinations = versionCombinations;
118
- //# sourceMappingURL=XSBMIZZK.cjs.map
119
- //# sourceMappingURL=XSBMIZZK.cjs.map
120
+ //# sourceMappingURL=UOJ7GLTA.cjs.map
121
+ //# sourceMappingURL=UOJ7GLTA.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/config.ts"],"names":["init_cjs_shims","tools","name","defaultVolumes","type","containerPath","shared","hostPath","defaultEnv","value","images","versions","stellar","patch","unreleased","mirrorRegistries","D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AAA,EAAS;AACb,KAAA;IACAC,KAAAA,EAAO;AACX,GAAA;AACA,EAAA,CAAC,gCAAA,GAAmC;IAChCX,IAAAA,EAAM,SAAA;IACNS,QAAAA,EAAU;MACNC,OAAAA,EAAS;AACb,KAAA;IACAC,KAAAA,EAAO;AACX,GAAA;AACA,EAAA,CAAC,gCAAA,GAAmC;IAChCX,IAAAA,EAAM,SAAA;IACNS,QAAAA,EAAU;MACNC,OAAAA,EAAS;AACb,KAAA;IACAC,KAAAA,EAAO;AACX,GAAA;AACA,EAAA,CAAC,wBAAA,GAA2B;IACxBX,IAAAA,EAAM,SAAA;IACNS,QAAAA,EAAU;MACNC,OAAAA,EAAS;AACb,KAAA;IACAE,UAAAA,EAAY,IAAA;IACZC,gBAAAA,EAAkB;MAACC,8BAAAA,CAAqBC;;AAC5C;AACJ;AAIO,IAAMC,mBAAAA,GACT;AACI,EAAA;IACIR,MAAAA,EAAQ;MACJE,OAAAA,EAAS;AACb,KAAA;IACAO,WAAAA,EAAa,uBAAA;IACbC,MAAAA,EAAQ;AACZ","file":"UOJ7GLTA.cjs","sourcesContent":["import {\n DockerRegistryMirror,\n type Image,\n type Tool,\n type VersionCombination,\n} from '@layerzerolabs/vm-tooling';\n\nexport const tools: readonly [Tool, ...Tool[]] = [\n {\n name: 'stellar',\n defaultVolumes: [\n // NOTE: for configuration commands, you should never put it in your package.json#build or #test, since the config is locked for parallel builds\n // while common commands like contract build and binding generation are allowed since they are not writing to the config files\n {\n type: 'isolate',\n containerPath: '/cache/stellar',\n name: 'stellar-config',\n shared: true,\n },\n // safe to be unlocked as it is POSIX lock guarded\n {\n type: 'isolate',\n containerPath: '/cache/cargo',\n name: 'stellar-cargo',\n shared: true,\n },\n // shared across packages — toolchain is pre-synced via `sync-toolchain` (locked)\n // so concurrent reads from build/test/lint are safe\n {\n type: 'isolate',\n containerPath: '/cache/rustup',\n name: 'stellar-rustup',\n shared: true,\n },\n // safe as the wort case of corruption is cache miss, since it is key-based cache, concurrent writes will produce identical content\n {\n type: 'host',\n containerPath: '/cache/sccache',\n hostPath: '~/.sccache',\n },\n ],\n defaultEnv: [\n // sccache configuration\n { name: 'RUSTC_WRAPPER', value: '/usr/local/bin/sccache' },\n // mold linker for faster linking\n { name: 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER', value: 'clang' },\n { name: 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER', value: 'clang' },\n {\n name: 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS',\n value: '-C link-arg=-fuse-ld=mold',\n },\n {\n name: 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS',\n value: '-C link-arg=-fuse-ld=mold',\n },\n ],\n },\n];\n\nexport const images = {\n ['stellar:stellar-23.1.4']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n },\n ['stellar:stellar-23.1.4-patch-1']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n patch: 1,\n },\n ['stellar:stellar-23.1.4-patch-3']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n patch: 3,\n },\n ['stellar:stellar-23.1.4-patch-6']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n patch: 6,\n },\n ['stellar:stellar-25.0.0']: {\n name: 'stellar',\n versions: {\n stellar: '25.0.0',\n },\n unreleased: true,\n mirrorRegistries: [DockerRegistryMirror.PUBLIC_GAR],\n },\n} satisfies Record<string, Image>;\n\nexport type ImageId = keyof typeof images;\n\nexport const versionCombinations: [VersionCombination<ImageId>, ...VersionCombination<ImageId>[]] =\n [\n {\n images: {\n stellar: 'stellar:stellar-25.0.0',\n },\n description: 'Latest stable release',\n stable: true,\n },\n ];\n"]}
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var _7MLNLFZC_cjs = require('../7MLNLFZC.cjs');
4
+ require('../JBSG7YXG.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "syncToolchain", {
9
+ enumerable: true,
10
+ get: function () { return _7MLNLFZC_cjs.syncToolchain; }
11
+ });
12
+ //# sourceMappingURL=sync-toolchain.cjs.map
13
+ //# sourceMappingURL=sync-toolchain.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"sync-toolchain.cjs"}
@@ -0,0 +1,3 @@
1
+ import type { ChainContext, ToolCommandExecutionOptions } from '@layerzerolabs/vm-tooling';
2
+ export declare function syncToolchain(context: ChainContext<string>, options: ToolCommandExecutionOptions): Promise<void>;
3
+ //# sourceMappingURL=sync-toolchain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-toolchain.d.ts","sourceRoot":"","sources":["../../src/commands/sync-toolchain.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAW3F,wBAAsB,aAAa,CAC/B,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAC7B,OAAO,EAAE,2BAA2B,GACrC,OAAO,CAAC,IAAI,CAAC,CAiDf"}
@@ -0,0 +1,4 @@
1
+ export { syncToolchain } from '../PIFLCQLQ.js';
2
+ import '../PHXMTVK6.js';
3
+ //# sourceMappingURL=sync-toolchain.js.map
4
+ //# sourceMappingURL=sync-toolchain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"sync-toolchain.js"}
package/dist/config.cjs CHANGED
@@ -1,21 +1,21 @@
1
1
  'use strict';
2
2
 
3
- var XSBMIZZK_cjs = require('./XSBMIZZK.cjs');
3
+ var UOJ7GLTA_cjs = require('./UOJ7GLTA.cjs');
4
4
  require('./JBSG7YXG.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "images", {
9
9
  enumerable: true,
10
- get: function () { return XSBMIZZK_cjs.images; }
10
+ get: function () { return UOJ7GLTA_cjs.images; }
11
11
  });
12
12
  Object.defineProperty(exports, "tools", {
13
13
  enumerable: true,
14
- get: function () { return XSBMIZZK_cjs.tools; }
14
+ get: function () { return UOJ7GLTA_cjs.tools; }
15
15
  });
16
16
  Object.defineProperty(exports, "versionCombinations", {
17
17
  enumerable: true,
18
- get: function () { return XSBMIZZK_cjs.versionCombinations; }
18
+ get: function () { return UOJ7GLTA_cjs.versionCombinations; }
19
19
  });
20
20
  //# sourceMappingURL=config.cjs.map
21
21
  //# sourceMappingURL=config.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,oBAAoB,EAEpB,KAAK,IAAI,EACT,KAAK,kBAAkB,EAC1B,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,KAAK,EAAE,SAAS,CAAC,IAAI,EAAE,GAAG,IAAI,EAAE,CAgD5C,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCc,CAAC;AAElC,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,MAAM,CAAC;AAE1C,eAAO,MAAM,mBAAmB,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,GAAG,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAS3F,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,oBAAoB,EAEpB,KAAK,IAAI,EACT,KAAK,kBAAkB,EAC1B,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,KAAK,EAAE,SAAS,CAAC,IAAI,EAAE,GAAG,IAAI,EAAE,CAkD5C,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCc,CAAC;AAElC,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,MAAM,CAAC;AAE1C,eAAO,MAAM,mBAAmB,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,GAAG,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAS3F,CAAC"}
package/dist/config.js CHANGED
@@ -1,4 +1,4 @@
1
- export { images, tools, versionCombinations } from './FV4ECYCI.js';
1
+ export { images, tools, versionCombinations } from './BHDA5WPF.js';
2
2
  import './PHXMTVK6.js';
3
3
  //# sourceMappingURL=config.js.map
4
4
  //# sourceMappingURL=config.js.map
package/dist/index.cjs CHANGED
@@ -1,15 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var XSBMIZZK_cjs = require('./XSBMIZZK.cjs');
3
+ var _7MLNLFZC_cjs = require('./7MLNLFZC.cjs');
4
+ var UOJ7GLTA_cjs = require('./UOJ7GLTA.cjs');
4
5
  var JBSG7YXG_cjs = require('./JBSG7YXG.cjs');
5
6
  var vmTooling = require('@layerzerolabs/vm-tooling');
6
7
 
7
8
  // src/index.ts
8
9
  JBSG7YXG_cjs.init_cjs_shims();
9
- var main = /* @__PURE__ */ JBSG7YXG_cjs.__name(() => vmTooling.runCli({
10
- tools: XSBMIZZK_cjs.tools,
11
- images: XSBMIZZK_cjs.images,
12
- versionCombinations: XSBMIZZK_cjs.versionCombinations
10
+ var context = {
11
+ tools: UOJ7GLTA_cjs.tools,
12
+ images: UOJ7GLTA_cjs.images,
13
+ versionCombinations: UOJ7GLTA_cjs.versionCombinations
14
+ };
15
+ var main = /* @__PURE__ */ JBSG7YXG_cjs.__name(() => vmTooling.runCli(context, (program, parseGlobalOptions) => {
16
+ program.command("sync-toolchain").description("Pre-download the Rust toolchain specified in rust-toolchain.toml under a lock").action(() => _7MLNLFZC_cjs.syncToolchain(context, parseGlobalOptions(program)));
13
17
  }), "main");
14
18
 
15
19
  exports.main = main;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["init_cjs_shims","main","runCli","tools","images","versionCombinations"],"mappings":";;;;;;;AAAAA,2BAAA,EAAA;AAIO,IAAMC,IAAAA,6CAA4BC,gBAAAA,CAAO;AAAEC,SAAAA,kBAAAA;AAAOC,UAAAA,mBAAAA;AAAQC,uBAAAA;AAAoB,CAAA,CAAA,EAAjE,MAAA","file":"index.cjs","sourcesContent":["import { runCli } from '@layerzerolabs/vm-tooling';\n\nimport { images, tools, versionCombinations } from './config';\n\nexport const main = (): Promise<void> => runCli({ tools, images, versionCombinations });\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["init_cjs_shims","context","tools","images","versionCombinations","main","__name","runCli","program","parseGlobalOptions","command","description","action","syncToolchain"],"mappings":";;;;;;;;AAAAA,2BAAA,EAAA;AAKA,IAAMC,OAAAA,GAAU;AAAEC,SAAAA,kBAAAA;AAAOC,UAAAA,mBAAAA;AAAQC,uBAAAA;AAAoB,CAAA;AAE9C,IAAMC,uBAAOC,mBAAA,CAAA,MAChBC,gBAAAA,CAAON,OAAAA,EAAS,CAACO,SAASC,kBAAAA,KAAAA;AACtBD,EAAAA,OAAAA,CACKE,OAAAA,CAAQ,gBAAA,CAAA,CACRC,WAAAA,CACG,+EAAA,CAAA,CAEHC,MAAAA,CAAO,MAAMC,2BAAAA,CAAcZ,OAAAA,EAASQ,kBAAAA,CAAmBD,OAAAA,CAAAA,CAAAA,CAAAA;AAChE,CAAA,CAAA,EARgB,MAAA","file":"index.cjs","sourcesContent":["import { runCli } from '@layerzerolabs/vm-tooling';\n\nimport { syncToolchain } from './commands/sync-toolchain';\nimport { images, tools, versionCombinations } from './config';\n\nconst context = { tools, images, versionCombinations };\n\nexport const main = (): Promise<void> =>\n runCli(context, (program, parseGlobalOptions) => {\n program\n .command('sync-toolchain')\n .description(\n 'Pre-download the Rust toolchain specified in rust-toolchain.toml under a lock',\n )\n .action(() => syncToolchain(context, parseGlobalOptions(program)));\n });\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAAO,OAAO,CAAC,IAAI,CAAmD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,IAAI,QAAO,OAAO,CAAC,IAAI,CAQ9B,CAAC"}
package/dist/index.js CHANGED
@@ -1,13 +1,17 @@
1
- import { versionCombinations, images, tools } from './FV4ECYCI.js';
1
+ import { syncToolchain } from './PIFLCQLQ.js';
2
+ import { versionCombinations, images, tools } from './BHDA5WPF.js';
2
3
  import { init_esm_shims, __name } from './PHXMTVK6.js';
3
4
  import { runCli } from '@layerzerolabs/vm-tooling';
4
5
 
5
6
  // src/index.ts
6
7
  init_esm_shims();
7
- var main = /* @__PURE__ */ __name(() => runCli({
8
+ var context = {
8
9
  tools,
9
10
  images,
10
11
  versionCombinations
12
+ };
13
+ var main = /* @__PURE__ */ __name(() => runCli(context, (program, parseGlobalOptions) => {
14
+ program.command("sync-toolchain").description("Pre-download the Rust toolchain specified in rust-toolchain.toml under a lock").action(() => syncToolchain(context, parseGlobalOptions(program)));
11
15
  }), "main");
12
16
 
13
17
  export { main };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["main","runCli","tools","images","versionCombinations"],"mappings":";;;;;AAAA,cAAA,EAAA;AAIO,IAAMA,IAAAA,gCAA4BC,MAAAA,CAAO;AAAEC,EAAAA,KAAAA;AAAOC,EAAAA,MAAAA;AAAQC,EAAAA;AAAoB,CAAA,CAAA,EAAjE,MAAA","file":"index.js","sourcesContent":["import { runCli } from '@layerzerolabs/vm-tooling';\n\nimport { images, tools, versionCombinations } from './config';\n\nexport const main = (): Promise<void> => runCli({ tools, images, versionCombinations });\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["context","tools","images","versionCombinations","main","runCli","program","parseGlobalOptions","command","description","action","syncToolchain"],"mappings":";;;;;;AAAA,cAAA,EAAA;AAKA,IAAMA,OAAAA,GAAU;AAAEC,EAAAA,KAAAA;AAAOC,EAAAA,MAAAA;AAAQC,EAAAA;AAAoB,CAAA;AAE9C,IAAMC,uBAAO,MAAA,CAAA,MAChBC,MAAAA,CAAOL,OAAAA,EAAS,CAACM,SAASC,kBAAAA,KAAAA;AACtBD,EAAAA,OAAAA,CACKE,OAAAA,CAAQ,gBAAA,CAAA,CACRC,WAAAA,CACG,+EAAA,CAAA,CAEHC,MAAAA,CAAO,MAAMC,aAAAA,CAAcX,OAAAA,EAASO,kBAAAA,CAAmBD,OAAAA,CAAAA,CAAAA,CAAAA;AAChE,CAAA,CAAA,EARgB,MAAA","file":"index.js","sourcesContent":["import { runCli } from '@layerzerolabs/vm-tooling';\n\nimport { syncToolchain } from './commands/sync-toolchain';\nimport { images, tools, versionCombinations } from './config';\n\nconst context = { tools, images, versionCombinations };\n\nexport const main = (): Promise<void> =>\n runCli(context, (program, parseGlobalOptions) => {\n program\n .command('sync-toolchain')\n .description(\n 'Pre-download the Rust toolchain specified in rust-toolchain.toml under a lock',\n )\n .action(() => syncToolchain(context, parseGlobalOptions(program)));\n });\n"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var XSBMIZZK_cjs = require('./XSBMIZZK.cjs');
3
+ var UOJ7GLTA_cjs = require('./UOJ7GLTA.cjs');
4
4
  var JBSG7YXG_cjs = require('./JBSG7YXG.cjs');
5
5
  var tty = require('tty');
6
6
  var vmTooling = require('@layerzerolabs/vm-tooling');
@@ -18193,7 +18193,7 @@ var assertType = /* @__PURE__ */ JBSG7YXG_cjs.__name(function assertType2() {
18193
18193
 
18194
18194
  // ../../node_modules/.pnpm/vitest@3.2.4_@types+debug@4.1.12_@types+node@22.19.1_jiti@2.6.1_lightningcss@1.30.1_terser@5.44.1_tsx@4.20.6_yaml@2.8.1/node_modules/vitest/dist/index.js
18195
18195
  var import_expect_type2 = JBSG7YXG_cjs.__toESM(require_dist(), 1);
18196
- vmTooling.testTools(dist_exports2, XSBMIZZK_cjs.images, XSBMIZZK_cjs.versionCombinations, {
18196
+ vmTooling.testTools(dist_exports2, UOJ7GLTA_cjs.images, UOJ7GLTA_cjs.versionCombinations, {
18197
18197
  stellar: [
18198
18198
  "stellar",
18199
18199
  "--version"
@@ -1,4 +1,4 @@
1
- import { images, versionCombinations } from './FV4ECYCI.js';
1
+ import { images, versionCombinations } from './BHDA5WPF.js';
2
2
  import { __commonJS, init_esm_shims, __name, __export, __toESM } from './PHXMTVK6.js';
3
3
  import { isatty } from 'tty';
4
4
  import { testTools } from '@layerzerolabs/vm-tooling';
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var XSBMIZZK_cjs = require('../XSBMIZZK.cjs');
3
+ var UOJ7GLTA_cjs = require('../UOJ7GLTA.cjs');
4
4
  var JBSG7YXG_cjs = require('../JBSG7YXG.cjs');
5
5
  var vmTooling = require('@layerzerolabs/vm-tooling');
6
6
 
7
7
  // src/scripts/generate-github-matrix.ts
8
8
  JBSG7YXG_cjs.init_cjs_shims();
9
- vmTooling.runGithubMatrixGenerator(XSBMIZZK_cjs.images, "tools/vm-tooling-stellar", XSBMIZZK_cjs.versionCombinations).catch((error) => {
9
+ vmTooling.runGithubMatrixGenerator(UOJ7GLTA_cjs.images, "tools/vm-tooling-stellar", UOJ7GLTA_cjs.versionCombinations).catch((error) => {
10
10
  console.error(error);
11
11
  process.exit(1);
12
12
  });
@@ -1,4 +1,4 @@
1
- import { images, versionCombinations } from '../FV4ECYCI.js';
1
+ import { images, versionCombinations } from '../BHDA5WPF.js';
2
2
  import { init_esm_shims } from '../PHXMTVK6.js';
3
3
  import { runGithubMatrixGenerator } from '@layerzerolabs/vm-tooling';
4
4
 
package/package.json CHANGED
@@ -20,15 +20,16 @@
20
20
  "bin/**/*"
21
21
  ],
22
22
  "dependencies": {
23
- "@layerzerolabs/vm-tooling": "0.2.36"
23
+ "toml": "^3.0.0",
24
+ "@layerzerolabs/vm-tooling": "0.2.38"
24
25
  },
25
26
  "devDependencies": {
26
27
  "tsup": "^8.4.0",
27
28
  "tsx": "^4.19.3",
28
29
  "typescript": "^5.8.2",
29
30
  "vitest": "^3.2.3",
30
- "@layerzerolabs/tsup-configuration": "0.2.36",
31
- "@layerzerolabs/typescript-configuration": "0.2.36"
31
+ "@layerzerolabs/typescript-configuration": "0.2.38",
32
+ "@layerzerolabs/tsup-configuration": "0.2.38"
32
33
  },
33
34
  "publishConfig": {
34
35
  "access": "restricted",
@@ -39,7 +40,7 @@
39
40
  "audit-external"
40
41
  ]
41
42
  },
42
- "version": "0.2.36",
43
+ "version": "0.2.38",
43
44
  "scripts": {
44
45
  "build": "tsup",
45
46
  "generate-github-matrix": "tsx src/scripts/generate-github-matrix.ts",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/config.ts"],"names":["tools","name","defaultVolumes","type","containerPath","shared","locked","hostPath","defaultEnv","value","images","versions","stellar","patch","unreleased","mirrorRegistries","DockerRegistryMirror","PUBLIC_GAR","versionCombinations","description","stable"],"mappings":";;;;AAAA,cAAA,EAAA;AAOO,IAAMA,KAAAA,GAAoC;AAC7C,EAAA;IACIC,IAAAA,EAAM,SAAA;IACNC,cAAAA,EAAgB;;AAEZ,MAAA;QACIC,IAAAA,EAAM,SAAA;QACNC,aAAAA,EAAe,gBAAA;QACfH,IAAAA,EAAM,gBAAA;QACNI,MAAAA,EAAQ,IAAA;QACRC,MAAAA,EAAQ;AACZ,OAAA;AACA,MAAA;QACIH,IAAAA,EAAM,SAAA;QACNC,aAAAA,EAAe,cAAA;QACfH,IAAAA,EAAM,eAAA;QACNI,MAAAA,EAAQ,IAAA;QACRC,MAAAA,EAAQ;AACZ,OAAA;AACA,MAAA;QACIH,IAAAA,EAAM,SAAA;QACNC,aAAAA,EAAe,eAAA;QACfH,IAAAA,EAAM,gBAAA;QACNI,MAAAA,EAAQ,IAAA;QACRC,MAAAA,EAAQ;AACZ,OAAA;AACA,MAAA;QACIH,IAAAA,EAAM,MAAA;QACNC,aAAAA,EAAe,gBAAA;QACfG,QAAAA,EAAU;AACd;;IAEJC,UAAAA,EAAY;;AAER,MAAA;QAAEP,IAAAA,E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4ECYCI.js","sourcesContent":["import {\n DockerRegistryMirror,\n type Image,\n type Tool,\n type VersionCombination,\n} from '@layerzerolabs/vm-tooling';\n\nexport const tools: readonly [Tool, ...Tool[]] = [\n {\n name: 'stellar',\n defaultVolumes: [\n // Use neutral paths (not /root/...) for user-agnostic caching\n {\n type: 'isolate',\n containerPath: '/cache/stellar',\n name: 'stellar-config',\n shared: true,\n locked: true,\n },\n {\n type: 'isolate',\n containerPath: '/cache/cargo',\n name: 'stellar-cargo',\n shared: true,\n locked: true,\n },\n {\n type: 'isolate',\n containerPath: '/cache/rustup',\n name: 'stellar-rustup',\n shared: true,\n locked: true,\n },\n {\n type: 'host',\n containerPath: '/cache/sccache',\n hostPath: '~/.sccache',\n },\n ],\n defaultEnv: [\n // sccache configuration\n { name: 'RUSTC_WRAPPER', value: '/usr/local/bin/sccache' },\n // mold linker for faster linking\n { name: 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER', value: 'clang' },\n { name: 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER', value: 'clang' },\n {\n name: 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS',\n value: '-C link-arg=-fuse-ld=mold',\n },\n {\n name: 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS',\n value: '-C link-arg=-fuse-ld=mold',\n },\n ],\n },\n];\n\nexport const images = {\n ['stellar:stellar-23.1.4']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n },\n ['stellar:stellar-23.1.4-patch-1']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n patch: 1,\n },\n ['stellar:stellar-23.1.4-patch-3']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n patch: 3,\n },\n ['stellar:stellar-23.1.4-patch-6']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n patch: 6,\n },\n ['stellar:stellar-25.0.0']: {\n name: 'stellar',\n versions: {\n stellar: '25.0.0',\n },\n unreleased: true,\n mirrorRegistries: [DockerRegistryMirror.PUBLIC_GAR],\n },\n} satisfies Record<string, Image>;\n\nexport type ImageId = keyof typeof images;\n\nexport const versionCombinations: [VersionCombination<ImageId>, ...VersionCombination<ImageId>[]] =\n [\n {\n images: {\n stellar: 'stellar:stellar-25.0.0',\n },\n description: 'Latest stable release',\n stable: true,\n },\n ];\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/config.ts"],"names":["init_cjs_shims","tools","name","defaultVolumes","type","containerPath","shared","locked","hostPath","defaultEnv","value","images","versions","stellar","patch","unreleased","mirrorRegistries","DockerRegistryMirror","PUBLIC_GAR","versionCombinations","description","stable"],"mappings":";;;;;;AAAAA,2BAAA,EAAA;AAOO,IAAMC,KAAAA,GAAoC;AAC7C,EAAA;IACIC,IAAAA,EAAM,SAAA;IACNC,cAAAA,EAAgB;;AAEZ,MAAA;QACIC,IAAAA,EAAM,SAAA;QACNC,aAAAA,EAAe,gBAAA;QACfH,IAAAA,EAAM,gBAAA;QACNI,MAAAA,EAAQ,IAAA;QACRC,MAAAA,EAAQ;AACZ,OAAA;AACA,MAAA;QACIH,IAAAA,EAAM,SAAA;QACNC,aAAAA,EAAe,cAAA;QACfH,IAAAA,EAAM,eAAA;QACNI,MAAAA,EAAQ,IAAA;QACRC,MAAAA,EAAQ;AACZ,OAAA;AACA,MAAA;QACIH,IAAAA,EAAM,SAAA;QACNC,aAAAA,EAAe,eAAA;QACfH,IAAAA,EAAM,gBAAA;QACNI,MAAAA,EAAQ,IAAA;QACRC,MAAAA,EAAQ;AACZ,OAAA;AACA,MAAA;QACIH,IAAAA,EAAM,MAAA;QACNC,aAAAA,EAAe,gBAAA;QACfG,QAAAA,EAAU;AACd;;IAEJC,UAAAA,EAAY;;AAER,MAAA;QAAEP,IAAAA,EAAM,eAAA;QAAiBQ,KAAAA,EAAO;AAAyB,OAAA;;AAEzD,MAAA;QAAER,IAAAA,EAAM,8CAAA;QAAgDQ,KAAAA,EAAO;AAAQ,OAAA;AACvE,MAAA;QAAER,IAAAA,EAAM,+CAAA;QAAiDQ,KAAAA,EAAO;AAAQ,OAAA;AACxE,MAAA;QACIR,IAAAA,EAAM,iDAAA;QACNQ,KAAAA,EAAO;AACX,OAAA;AACA,MAAA;QACIR,IAAAA,EAAM,kDAAA;QACNQ,KAAAA,EAAO;AACX;;AAER;;AAGG,IAAMC,MAAAA,GAAS;AAClB,EAAA,CAAC,wBAAA,GAA2B;IACxBT,IAAAA,EAAM,SAAA;IACNU,QAAAA,EAAU;MACNC,OAAAA,EAAS;AACb;AACJ,GAAA;AACA,EAAA,CAAC,gCAAA,GAAmC;IAChCX,IAAAA,EAAM,SAAA;IACNU,QAAAA,EAAU;MACNC,OAAAA,EAAS;AACb,KAAA;IACAC,KAAAA,EAAO;AACX,GAAA;AACA,EAAA,CAAC,gCAAA,GAAmC;IAChCZ,IAAAA,EAAM,SAAA;IACNU,QAAAA,EAAU;MACNC,OAAAA,EAAS;AACb,KAAA;IACAC,KAAAA,EAAO;AACX,GAAA;AACA,EAAA,CAAC,gCAAA,GAAmC;IAChCZ,IAAAA,EAAM,SAAA;IACNU,QAAAA,EAAU;MACNC,OAAAA,EAAS;AACb,KAAA;IACAC,KAAAA,EAAO;AACX,GAAA;AACA,EAAA,CAAC,wBAAA,GAA2B;IACxBZ,IAAAA,EAAM,SAAA;IACNU,QAAAA,EAAU;MACNC,OAAAA,EAAS;AACb,KAAA;IACAE,UAAAA,EAAY,IAAA;IACZC,gBAAAA,EAAkB;MAACC,8BAAAA,CAAqBC;;AAC5C;AACJ;AAIO,IAAMC,mBAAAA,GACT;AACI,EAAA;IACIR,MAAAA,EAAQ;MACJE,OAAAA,EAAS;AACb,KAAA;IACAO,WAAAA,EAAa,uBAAA;IACbC,MAAAA,EAAQ;AACZ","file":"XSBMIZZK.cjs","sourcesContent":["import {\n DockerRegistryMirror,\n type Image,\n type Tool,\n type VersionCombination,\n} from '@layerzerolabs/vm-tooling';\n\nexport const tools: readonly [Tool, ...Tool[]] = [\n {\n name: 'stellar',\n defaultVolumes: [\n // Use neutral paths (not /root/...) for user-agnostic caching\n {\n type: 'isolate',\n containerPath: '/cache/stellar',\n name: 'stellar-config',\n shared: true,\n locked: true,\n },\n {\n type: 'isolate',\n containerPath: '/cache/cargo',\n name: 'stellar-cargo',\n shared: true,\n locked: true,\n },\n {\n type: 'isolate',\n containerPath: '/cache/rustup',\n name: 'stellar-rustup',\n shared: true,\n locked: true,\n },\n {\n type: 'host',\n containerPath: '/cache/sccache',\n hostPath: '~/.sccache',\n },\n ],\n defaultEnv: [\n // sccache configuration\n { name: 'RUSTC_WRAPPER', value: '/usr/local/bin/sccache' },\n // mold linker for faster linking\n { name: 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER', value: 'clang' },\n { name: 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER', value: 'clang' },\n {\n name: 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS',\n value: '-C link-arg=-fuse-ld=mold',\n },\n {\n name: 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS',\n value: '-C link-arg=-fuse-ld=mold',\n },\n ],\n },\n];\n\nexport const images = {\n ['stellar:stellar-23.1.4']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n },\n ['stellar:stellar-23.1.4-patch-1']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n patch: 1,\n },\n ['stellar:stellar-23.1.4-patch-3']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n patch: 3,\n },\n ['stellar:stellar-23.1.4-patch-6']: {\n name: 'stellar',\n versions: {\n stellar: '23.1.4',\n },\n patch: 6,\n },\n ['stellar:stellar-25.0.0']: {\n name: 'stellar',\n versions: {\n stellar: '25.0.0',\n },\n unreleased: true,\n mirrorRegistries: [DockerRegistryMirror.PUBLIC_GAR],\n },\n} satisfies Record<string, Image>;\n\nexport type ImageId = keyof typeof images;\n\nexport const versionCombinations: [VersionCombination<ImageId>, ...VersionCombination<ImageId>[]] =\n [\n {\n images: {\n stellar: 'stellar:stellar-25.0.0',\n },\n description: 'Latest stable release',\n stable: true,\n },\n ];\n"]}