@rocketh/export 0.10.11 → 0.10.13

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,3 @@
1
+ #! /usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
1
+ #! /usr/bin/env node
2
+ import { readAndResolveConfig } from 'rocketh';
3
+ import { run } from './index.js';
4
+ import { Command } from 'commander';
5
+ import pkg from '../package.json' with { type: 'json' };
6
+ const commandName = pkg.name;
7
+ const program = new Command();
8
+ program
9
+ .name(commandName)
10
+ .description('export deployments to consume elswhere')
11
+ .version(pkg.version)
12
+ .option('-d, --deployments <value>', 'folder where deployments are saved')
13
+ .option('--ts <value>', 'list of filepath where the typescript export will be written, separated by commas')
14
+ .option('--js <value>', 'list of filepath where the javascript export will be written, separated by commas')
15
+ .option('--json <value>', 'list of filepath where the json export will be written, separated by commas')
16
+ .option('--tsm <value>', 'list of filepath where the typescript export with individual export will be written, separated by commas')
17
+ .option('--jsm <value>', 'list of filepath where the javascript export with individual exportwill be written, separated by commas')
18
+ .option('-b, --bytecode', 'if set, the bytecode will also be part of the output')
19
+ .requiredOption('-n, --network <value>', 'network context to use')
20
+ .parse(process.argv);
21
+ const options = program.opts();
22
+ const resolvedConfig = readAndResolveConfig({ ...options, ignoreMissingRPC: true });
23
+ run(resolvedConfig, {
24
+ tots: options.ts ? options.ts.split(',') : undefined,
25
+ tojson: options.json ? options.json.split(',') : undefined,
26
+ tojs: options.js ? options.js.split(',') : undefined,
27
+ totsm: options.tsm ? options.tsm.split(',') : undefined,
28
+ tojsm: options.jsm ? options.jsm.split(',') : undefined,
29
+ includeBytecode: options.bytecode,
30
+ });
31
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","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AAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;IAC1D,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;IACpD,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;IACvD,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;IACvD,eAAe,EAAE,OAAO,CAAC,QAAQ;CACjC,CAAC,CAAC"}
@@ -0,0 +1,90 @@
1
+ import { Abi, Address } from 'abitype';
2
+ import { ResolvedConfig } from 'rocketh';
3
+ export interface ContractExport {
4
+ address: `0x${string}`;
5
+ abi: Abi;
6
+ argsData?: string;
7
+ bytecode?: `0x${string}`;
8
+ }
9
+ type ChainBlockExplorer = {
10
+ name: string;
11
+ url: string;
12
+ apiUrl?: string | undefined;
13
+ };
14
+ type ChainContract = {
15
+ address: Address;
16
+ blockCreated?: number | undefined;
17
+ };
18
+ type ChainNativeCurrency = {
19
+ name: string;
20
+ /** 2-6 characters long */
21
+ symbol: string;
22
+ decimals: number;
23
+ };
24
+ type ChainRpcUrls = {
25
+ http: readonly string[];
26
+ webSocket?: readonly string[] | undefined;
27
+ };
28
+ /**
29
+ * @description Combines members of an intersection into a readable type.
30
+ *
31
+ * @see {@link https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg}
32
+ * @example
33
+ * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }>
34
+ * => { a: string, b: string, c: number, d: bigint }
35
+ */
36
+ type Prettify<T> = {
37
+ [K in keyof T]: T[K];
38
+ } & {};
39
+ export type ChainInfo = {
40
+ /** ID in number form */
41
+ id: number;
42
+ /** Human-readable name */
43
+ name: string;
44
+ /** Collection of block explorers */
45
+ blockExplorers?: {
46
+ [key: string]: ChainBlockExplorer;
47
+ default: ChainBlockExplorer;
48
+ } | undefined;
49
+ /** Collection of contracts */
50
+ contracts?: Prettify<{
51
+ [key: string]: ChainContract | {
52
+ [sourceId: number]: ChainContract | undefined;
53
+ } | undefined;
54
+ } & {
55
+ ensRegistry?: ChainContract | undefined;
56
+ ensUniversalResolver?: ChainContract | undefined;
57
+ multicall3?: ChainContract | undefined;
58
+ }> | undefined;
59
+ /** Currency used by chain */
60
+ nativeCurrency: ChainNativeCurrency;
61
+ /** Collection of RPC endpoints */
62
+ rpcUrls: {
63
+ [key: string]: ChainRpcUrls;
64
+ default: ChainRpcUrls;
65
+ };
66
+ /** Source Chain ID (ie. the L1 chain) */
67
+ sourceId?: number | undefined;
68
+ /** Flag for test networks */
69
+ testnet?: boolean | undefined;
70
+ chainType: 'zksync' | 'op-stack' | 'celo' | 'default';
71
+ };
72
+ export type ExportedDeployments = {
73
+ chainId: string;
74
+ genesisHash?: string;
75
+ chainInfo: ChainInfo;
76
+ name: string;
77
+ contracts: {
78
+ [name: string]: ContractExport;
79
+ };
80
+ };
81
+ export declare function run(config: ResolvedConfig, options: {
82
+ tojs?: string[];
83
+ tots?: string[];
84
+ tojson?: string[];
85
+ totsm?: string[];
86
+ tojsm?: string[];
87
+ includeBytecode?: boolean;
88
+ }): Promise<void>;
89
+ export {};
90
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,OAAO,EAAC,MAAM,SAAS,CAAC;AAIrC,OAAO,EAAa,cAAc,EAAwC,MAAM,SAAS,CAAC;AAE1F,MAAM,WAAW,cAAc;IAC9B,OAAO,EAAE,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node:path';
3
+ import { chainTypes, getChain, loadDeployments } from 'rocketh';
4
+ function objectMap(object, mapFn) {
5
+ return Object.keys(object).reduce((result, key) => {
6
+ result[key] = mapFn(object[key]);
7
+ return result;
8
+ }, {});
9
+ }
10
+ export async function run(config, options) {
11
+ if (!options.tots && !options.tojs && !options.tojson && !options.tojsm && !options.totsm) {
12
+ console.log(`no filepath to export to are specified`);
13
+ return;
14
+ }
15
+ const { deployments, chainId, genesisHash } = loadDeployments(config.deployments, config.network.name);
16
+ if (!deployments || Object.keys(deployments).length === 0) {
17
+ console.log(`no deployments to export`);
18
+ return;
19
+ }
20
+ if (!chainId) {
21
+ throw new Error(`no chainId found for ${config.network.name}`);
22
+ }
23
+ const chain = getChain(chainId);
24
+ const chainInfo = {
25
+ id: chain.id,
26
+ name: chain.name,
27
+ nativeCurrency: chain.nativeCurrency,
28
+ rpcUrls: chain.rpcUrls,
29
+ blockExplorers: chain.blockExplorers,
30
+ chainType: chainTypes[chainId] || 'default',
31
+ contracts: chain.contracts,
32
+ sourceId: chain.sourceId,
33
+ testnet: chain.testnet,
34
+ };
35
+ const exportData = {
36
+ chainId,
37
+ genesisHash,
38
+ chainInfo,
39
+ contracts: objectMap(deployments, (d) => ({
40
+ abi: d.abi,
41
+ address: d.address,
42
+ linkedData: d.linkedData,
43
+ bytecode: options.includeBytecode ? d.bytecode : undefined,
44
+ argsData: options.includeBytecode ? d.argsData : undefined,
45
+ startBlock: d.receipt?.blockNumber ? parseInt(d.receipt.blockNumber.slice(2), 16) : undefined,
46
+ })),
47
+ name: config.network.name,
48
+ };
49
+ const js = typeof options.tojs === 'string' ? [options.tojs] : options.tojs || [];
50
+ const ts = typeof options.tots === 'string' ? [options.tots] : options.tots || [];
51
+ const json = typeof options.tojson === 'string' ? [options.tojson] : options.tojson || [];
52
+ const tsmodule = typeof options.totsm === 'string' ? [options.totsm] : options.totsm || [];
53
+ const jsmodule = typeof options.tojsm === 'string' ? [options.tojsm] : options.tojsm || [];
54
+ if (ts.length > 0) {
55
+ const newContent = `export default ${JSON.stringify(exportData, null, 2)} as const;`;
56
+ for (const tsFile of ts) {
57
+ const folderPath = path.dirname(tsFile);
58
+ fs.mkdirSync(folderPath, { recursive: true });
59
+ fs.writeFileSync(tsFile, newContent);
60
+ }
61
+ }
62
+ if (js.length > 0) {
63
+ const newContent = `export default /** @type {const} **/ (${JSON.stringify(exportData, null, 2)});`;
64
+ const dtsContent = `export = ${JSON.stringify(exportData, null, 2)} as const;`;
65
+ for (const jsFile of js) {
66
+ const folderPath = path.dirname(jsFile);
67
+ fs.mkdirSync(folderPath, { recursive: true });
68
+ fs.writeFileSync(jsFile, newContent);
69
+ fs.writeFileSync(jsFile.replace('.js', '.d.ts'), dtsContent);
70
+ }
71
+ }
72
+ if (json.length > 0) {
73
+ const newContent = JSON.stringify(exportData, null, 2);
74
+ for (const jsonFile of json) {
75
+ const folderPath = path.dirname(jsonFile);
76
+ fs.mkdirSync(folderPath, { recursive: true });
77
+ fs.writeFileSync(jsonFile, newContent);
78
+ }
79
+ }
80
+ if (tsmodule.length > 0) {
81
+ let newContent = `export const chain = ${JSON.stringify({
82
+ chainId: exportData.chainId,
83
+ genesisHash: exportData.genesisHash,
84
+ chainInfo: exportData.chainInfo,
85
+ name: exportData.name,
86
+ }, null, 2)} as const;\n`;
87
+ for (const contractName of Object.keys(exportData.contracts)) {
88
+ newContent += `export const ${contractName} = ${JSON.stringify(exportData.contracts[contractName], null, 2)} as const;`;
89
+ }
90
+ for (const tsFile of tsmodule) {
91
+ const folderPath = path.dirname(tsFile);
92
+ fs.mkdirSync(folderPath, { recursive: true });
93
+ fs.writeFileSync(tsFile, newContent);
94
+ }
95
+ }
96
+ if (jsmodule.length > 0) {
97
+ // TODO test
98
+ let newContent = `export const chain = /** @type {const} **/ (${JSON.stringify({
99
+ chainId: exportData.chainId,
100
+ genesisHash: exportData.genesisHash,
101
+ chainInfo: exportData.chainInfo,
102
+ name: exportData.name,
103
+ }, null, 2)});\n`;
104
+ for (const contractName of Object.keys(exportData.contracts)) {
105
+ newContent += `export const ${contractName} = /** @type {const} **/ (${JSON.stringify(exportData.contracts[contractName], null, 2)});`;
106
+ }
107
+ for (const jsFile of jsmodule) {
108
+ const folderPath = path.dirname(jsFile);
109
+ fs.mkdirSync(folderPath, { recursive: true });
110
+ fs.writeFileSync(jsFile, newContent);
111
+ }
112
+ }
113
+ }
114
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAA6B,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAC,MAAM,SAAS,CAAC;AA8G1F,SAAS,SAAS,CACjB,MAAS,EACT,KAAkB;IAElB,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QAChD,MAAc,CAAC,GAAG,CAAC,GAAG,KAAK,CAAE,MAAc,CAAC,GAAG,CAAC,CAAC,CAAC;QACnD,OAAO,MAAM,CAAC;IACf,CAAC,EAAE,EAAuB,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,GAAG,CACxB,MAAsB,EACtB,OAOC;IAED,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAC3F,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QACtD,OAAO;IACR,CAAC;IAED,MAAM,EAAC,WAAW,EAAE,OAAO,EAAE,WAAW,EAAC,GAAG,eAAe,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;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C,CACD,MAAM,CAAC;QAER,KAAK,MAAM,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC9D,UAAU,IAAI,gBAAgB,YAAY,6BAA6B,IAAI,CAAC,SAAS,CACnF,UAAU,CAAC,SAAiB,CAAC,YAAY,CAAC,EAC3C,IAAI,EACJ,CAAC,CACD,IAAI,CAAC;QACP,CAAC;QAED,KAAK,MAAM,MAAM,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACxC,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;YAC5C,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACtC,CAAC;IACF,CAAC;AACF,CAAC"}
package/package.json CHANGED
@@ -1,47 +1,45 @@
1
1
  {
2
2
  "name": "@rocketh/export",
3
- "version": "0.10.11",
3
+ "version": "0.10.13",
4
4
  "description": "export deployments",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "type": "module",
9
- "main": "dist/index.cjs",
10
- "module": "dist/index.mjs",
11
- "types": "dist/index.d.ts",
9
+ "module": "dist/esm/index.js",
10
+ "types": "dist/esm/index.d.ts",
12
11
  ".": {
13
- "require": {
14
- "types": "./dist/index.d.ts",
15
- "default": "./dist/index.cjs"
16
- },
17
12
  "import": {
18
- "types": "./dist/index.d.ts",
19
- "default": "./dist/index.mjs"
13
+ "types": "./dist/esm/index.d.ts",
14
+ "default": "./dist/esm/index.js"
20
15
  }
21
16
  },
22
17
  "bin": {
23
- "rocketh-export": "dist/cli.cjs"
18
+ "rocketh-export": "dist/esm/cli.js"
24
19
  },
20
+ "files": [
21
+ "dist"
22
+ ],
25
23
  "devDependencies": {
26
24
  "@types/node": "^20.14.8",
27
25
  "abitype": "^1.0.4",
28
26
  "eip-1193": "^0.5.0",
29
- "pkgroll": "^2.1.1",
27
+ "as-soon": "^0.0.11",
30
28
  "rimraf": "^5.0.7",
31
29
  "typescript": "^5.5.2"
32
30
  },
33
31
  "peerDependencies": {
34
- "rocketh": "0.10.15"
32
+ "rocketh": "0.10.16"
35
33
  },
36
34
  "dependencies": {
37
35
  "@types/fs-extra": "^11.0.4",
38
36
  "chalk": "5.3.0",
39
37
  "commander": "^12.1.0",
40
38
  "fs-extra": "^11.2.0",
41
- "rocketh": "0.10.15"
39
+ "rocketh": "0.10.16"
42
40
  },
43
41
  "scripts": {
44
- "build": "rimraf dist && pkgroll --sourcemap",
45
- "dev": "pkgroll --watch"
42
+ "build": "tsc --project tsconfig.json",
43
+ "dev": "as-soon -w src pnpm build"
46
44
  }
47
45
  }
package/.prettierignore DELETED
@@ -1,3 +0,0 @@
1
- dist/
2
- node_modules/
3
- package.json
package/.prettierrc DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "useTabs": true,
3
- "singleQuote": true,
4
-
5
- "printWidth": 120,
6
- "bracketSpacing": false
7
- }
package/CHANGELOG.md DELETED
@@ -1,76 +0,0 @@
1
- # @rocketh/export
2
-
3
- ## 0.10.11
4
-
5
- ### Patch Changes
6
-
7
- - Updated dependencies
8
- - rocketh@0.10.15
9
-
10
- ## 0.10.10
11
-
12
- ### Patch Changes
13
-
14
- - allow to export each contract as individual exported field
15
-
16
- ## 0.10.9
17
-
18
- ### Patch Changes
19
-
20
- - export argsData when exporting bytecode
21
-
22
- ## 0.10.8
23
-
24
- ### Patch Changes
25
-
26
- - latest dependencies
27
- - Updated dependencies
28
- - rocketh@0.10.14
29
-
30
- ## 0.10.7
31
-
32
- ### Patch Changes
33
-
34
- - Updated dependencies
35
- - rocketh@0.10.13
36
-
37
- ## 0.10.6
38
-
39
- ### Patch Changes
40
-
41
- - Updated dependencies
42
- - rocketh@0.10.12
43
-
44
- ## 0.10.5
45
-
46
- ### Patch Changes
47
-
48
- - forgot to build
49
-
50
- ## 0.10.4
51
-
52
- ### Patch Changes
53
-
54
- - chalk do not support cjs
55
-
56
- ## 0.10.3
57
-
58
- ### Patch Changes
59
-
60
- - Updated dependencies
61
- - rocketh@0.10.11
62
-
63
- ## 0.10.2
64
-
65
- ### Patch Changes
66
-
67
- - Updated dependencies
68
- - rocketh@0.10.10
69
-
70
- ## 0.10.1
71
-
72
- ### Patch Changes
73
-
74
- - use pkgroll and @rocketh namespace
75
- - Updated dependencies
76
- - rocketh@0.10.9
package/dist/cli.cjs DELETED
@@ -1,90 +0,0 @@
1
- #!/usr/bin/env node
2
- 'use strict';
3
-
4
- var rocketh = require('rocketh');
5
- var index = require('./index.cjs');
6
- var commander = require('commander');
7
- require('node:fs');
8
- require('node:path');
9
-
10
- var name = "@rocketh/export";
11
- var version = "0.10.11";
12
- var description = "export deployments";
13
- var publishConfig = {
14
- access: "public"
15
- };
16
- var type = "module";
17
- var main = "dist/index.cjs";
18
- var module$1 = "dist/index.mjs";
19
- var types = "dist/index.d.ts";
20
- var bin = {
21
- "rocketh-export": "dist/cli.cjs"
22
- };
23
- var devDependencies = {
24
- "@types/node": "^20.14.8",
25
- abitype: "^1.0.4",
26
- "eip-1193": "^0.5.0",
27
- pkgroll: "^2.1.1",
28
- rimraf: "^5.0.7",
29
- typescript: "^5.5.2"
30
- };
31
- var peerDependencies = {
32
- rocketh: "workspace:*"
33
- };
34
- var dependencies = {
35
- "@types/fs-extra": "^11.0.4",
36
- chalk: "5.3.0",
37
- commander: "^12.1.0",
38
- "fs-extra": "^11.2.0",
39
- rocketh: "workspace:*"
40
- };
41
- var scripts = {
42
- build: "rimraf dist && pkgroll --sourcemap",
43
- dev: "pkgroll --watch"
44
- };
45
- var pkg = {
46
- name: name,
47
- version: version,
48
- description: description,
49
- publishConfig: publishConfig,
50
- type: type,
51
- main: main,
52
- module: module$1,
53
- types: types,
54
- ".": {
55
- require: {
56
- types: "./dist/index.d.ts",
57
- "default": "./dist/index.cjs"
58
- },
59
- "import": {
60
- types: "./dist/index.d.ts",
61
- "default": "./dist/index.mjs"
62
- }
63
- },
64
- bin: bin,
65
- devDependencies: devDependencies,
66
- peerDependencies: peerDependencies,
67
- dependencies: dependencies,
68
- scripts: scripts
69
- };
70
-
71
- const commandName = pkg.name;
72
- const program = new commander.Command();
73
- program.name(commandName).description("export deployments to consume elswhere").version(pkg.version).option("-d, --deployments <value>", "folder where deployments are saved").option("--ts <value>", "list of filepath where the typescript export will be written, separated by commas").option("--js <value>", "list of filepath where the javascript export will be written, separated by commas").option("--json <value>", "list of filepath where the json export will be written, separated by commas").option(
74
- "--tsm <value>",
75
- "list of filepath where the typescript export with individual export will be written, separated by commas"
76
- ).option(
77
- "--jsm <value>",
78
- "list of filepath where the javascript export with individual exportwill be written, separated by commas"
79
- ).option("-b, --bytecode", "if set, the bytecode will also be part of the output").requiredOption("-n, --network <value>", "network context to use").parse(process.argv);
80
- const options = program.opts();
81
- const resolvedConfig = rocketh.readAndResolveConfig({ ...options, ignoreMissingRPC: true });
82
- index.run(resolvedConfig, {
83
- tots: options.ts ? options.ts.split(",") : void 0,
84
- tojson: options.json ? options.json.split(",") : void 0,
85
- tojs: options.js ? options.js.split(",") : void 0,
86
- totsm: options.tsm ? options.tsm.split(",") : void 0,
87
- tojsm: options.jsm ? options.jsm.split(",") : void 0,
88
- includeBytecode: options.bytecode
89
- });
90
- //# sourceMappingURL=cli.cjs.map
package/dist/cli.cjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.cjs","sources":["../src/cli.ts"],"sourcesContent":["#! /usr/bin/env node\nimport {readAndResolveConfig} from 'rocketh';\nimport {run} from '.';\nimport {Command} from 'commander';\nimport pkg from '../package.json';\nimport {ConfigOptions} from 'rocketh';\n\nconst commandName = pkg.name;\n\nconst program = new Command();\nprogram\n\t.name(commandName)\n\t.description('export deployments to consume elswhere')\n\t.version(pkg.version)\n\t.option('-d, --deployments <value>', 'folder where deployments are saved')\n\t.option('--ts <value>', 'list of filepath where the typescript export will be written, separated by commas')\n\t.option('--js <value>', 'list of filepath where the javascript export will be written, separated by commas')\n\t.option('--json <value>', 'list of filepath where the json export will be written, separated by commas')\n\t.option(\n\t\t'--tsm <value>',\n\t\t'list of filepath where the typescript export with individual export will be written, separated by commas'\n\t)\n\t.option(\n\t\t'--jsm <value>',\n\t\t'list of filepath where the javascript export with individual exportwill be written, separated by commas'\n\t)\n\t.option('-b, --bytecode', 'if set, the bytecode will also be part of the output')\n\t.requiredOption('-n, --network <value>', 'network context to use')\n\t.parse(process.argv);\n\nconst options = program.opts();\nconst resolvedConfig = readAndResolveConfig({...(options as ConfigOptions), ignoreMissingRPC: true});\nrun(resolvedConfig, {\n\ttots: options.ts ? options.ts.split(',') : undefined,\n\ttojson: options.json ? options.json.split(',') : undefined,\n\ttojs: options.js ? options.js.split(',') : undefined,\n\ttotsm: options.tsm ? options.tsm.split(',') : undefined,\n\ttojsm: options.jsm ? options.jsm.split(',') : undefined,\n\tincludeBytecode: options.bytecode,\n});\n"],"names":["Command","readAndResolveConfig","run"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,CAAG,CAAA,CAAA,CAAC,IAAI,CAAC;AAC7B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA,EAAA,CAAA;AACA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,IAAI,CAAC,CAAA,CAAA,CAAA,CAAA,C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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA;AAClB,CAAA,CAAE,KAAK,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAC,CAAA,CAAA,CAAG,GAAG,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAG,CAAA,CAAA,CAAC,KAAK,CAAC,CAAA,CAAA,CAAG,CAAC,CAAA,CAAA,CAAG,KAAK,CAAC,CAAA;AACtD,CAAA,CAAE,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA;AACF,CAAA,CAAE,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACT,CAAC,CAAC"}
package/dist/cli.mjs DELETED
@@ -1,87 +0,0 @@
1
- import { readAndResolveConfig } from 'rocketh';
2
- import { run } from './index.mjs';
3
- import { Command } from 'commander';
4
- import 'node:fs';
5
- import 'node:path';
6
-
7
- var name = "@rocketh/export";
8
- var version = "0.10.11";
9
- var description = "export deployments";
10
- var publishConfig = {
11
- access: "public"
12
- };
13
- var type = "module";
14
- var main = "dist/index.cjs";
15
- var module = "dist/index.mjs";
16
- var types = "dist/index.d.ts";
17
- var bin = {
18
- "rocketh-export": "dist/cli.cjs"
19
- };
20
- var devDependencies = {
21
- "@types/node": "^20.14.8",
22
- abitype: "^1.0.4",
23
- "eip-1193": "^0.5.0",
24
- pkgroll: "^2.1.1",
25
- rimraf: "^5.0.7",
26
- typescript: "^5.5.2"
27
- };
28
- var peerDependencies = {
29
- rocketh: "workspace:*"
30
- };
31
- var dependencies = {
32
- "@types/fs-extra": "^11.0.4",
33
- chalk: "5.3.0",
34
- commander: "^12.1.0",
35
- "fs-extra": "^11.2.0",
36
- rocketh: "workspace:*"
37
- };
38
- var scripts = {
39
- build: "rimraf dist && pkgroll --sourcemap",
40
- dev: "pkgroll --watch"
41
- };
42
- var pkg = {
43
- name: name,
44
- version: version,
45
- description: description,
46
- publishConfig: publishConfig,
47
- type: type,
48
- main: main,
49
- module: module,
50
- types: types,
51
- ".": {
52
- require: {
53
- types: "./dist/index.d.ts",
54
- "default": "./dist/index.cjs"
55
- },
56
- "import": {
57
- types: "./dist/index.d.ts",
58
- "default": "./dist/index.mjs"
59
- }
60
- },
61
- bin: bin,
62
- devDependencies: devDependencies,
63
- peerDependencies: peerDependencies,
64
- dependencies: dependencies,
65
- scripts: scripts
66
- };
67
-
68
- const commandName = pkg.name;
69
- const program = new Command();
70
- program.name(commandName).description("export deployments to consume elswhere").version(pkg.version).option("-d, --deployments <value>", "folder where deployments are saved").option("--ts <value>", "list of filepath where the typescript export will be written, separated by commas").option("--js <value>", "list of filepath where the javascript export will be written, separated by commas").option("--json <value>", "list of filepath where the json export will be written, separated by commas").option(
71
- "--tsm <value>",
72
- "list of filepath where the typescript export with individual export will be written, separated by commas"
73
- ).option(
74
- "--jsm <value>",
75
- "list of filepath where the javascript export with individual exportwill be written, separated by commas"
76
- ).option("-b, --bytecode", "if set, the bytecode will also be part of the output").requiredOption("-n, --network <value>", "network context to use").parse(process.argv);
77
- const options = program.opts();
78
- const resolvedConfig = readAndResolveConfig({ ...options, ignoreMissingRPC: true });
79
- run(resolvedConfig, {
80
- tots: options.ts ? options.ts.split(",") : void 0,
81
- tojson: options.json ? options.json.split(",") : void 0,
82
- tojs: options.js ? options.js.split(",") : void 0,
83
- totsm: options.tsm ? options.tsm.split(",") : void 0,
84
- tojsm: options.jsm ? options.jsm.split(",") : void 0,
85
- includeBytecode: options.bytecode
86
- });
87
- //# sourceMappingURL=cli.mjs.map
package/dist/cli.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.mjs","sources":["../src/cli.ts"],"sourcesContent":["#! /usr/bin/env node\nimport {readAndResolveConfig} from 'rocketh';\nimport {run} from '.';\nimport {Command} from 'commander';\nimport pkg from '../package.json';\nimport {ConfigOptions} from 'rocketh';\n\nconst commandName = pkg.name;\n\nconst program = new Command();\nprogram\n\t.name(commandName)\n\t.description('export deployments to consume elswhere')\n\t.version(pkg.version)\n\t.option('-d, --deployments <value>', 'folder where deployments are saved')\n\t.option('--ts <value>', 'list of filepath where the typescript export will be written, separated by commas')\n\t.option('--js <value>', 'list of filepath where the javascript export will be written, separated by commas')\n\t.option('--json <value>', 'list of filepath where the json export will be written, separated by commas')\n\t.option(\n\t\t'--tsm <value>',\n\t\t'list of filepath where the typescript export with individual export will be written, separated by commas'\n\t)\n\t.option(\n\t\t'--jsm <value>',\n\t\t'list of filepath where the javascript export with individual exportwill be written, separated by commas'\n\t)\n\t.option('-b, --bytecode', 'if set, the bytecode will also be part of the output')\n\t.requiredOption('-n, --network <value>', 'network context to use')\n\t.parse(process.argv);\n\nconst options = program.opts();\nconst resolvedConfig = readAndResolveConfig({...(options as ConfigOptions), ignoreMissingRPC: true});\nrun(resolvedConfig, {\n\ttots: options.ts ? options.ts.split(',') : undefined,\n\ttojson: options.json ? options.json.split(',') : undefined,\n\ttojs: options.js ? options.js.split(',') : undefined,\n\ttotsm: options.tsm ? options.tsm.split(',') : undefined,\n\ttojsm: options.jsm ? options.jsm.split(',') : undefined,\n\tincludeBytecode: options.bytecode,\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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