@sentio/cli 2.18.3 → 2.18.4-rc.2

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 (84) hide show
  1. package/lib/abi.d.ts +9 -0
  2. package/lib/abi.d.ts.map +1 -0
  3. package/lib/abi.js +136 -0
  4. package/lib/abi.js.map +1 -0
  5. package/lib/abi.test.d.ts +2 -0
  6. package/lib/abi.test.d.ts.map +1 -0
  7. package/lib/abi.test.js.map +1 -0
  8. package/lib/commands/build.d.ts +28 -0
  9. package/lib/commands/build.d.ts.map +1 -0
  10. package/lib/commands/build.js +213 -0
  11. package/lib/commands/build.js.map +1 -0
  12. package/lib/commands/login-server.d.ts +8 -0
  13. package/lib/commands/login-server.d.ts.map +1 -0
  14. package/lib/commands/login-server.js +110 -0
  15. package/lib/commands/login-server.js.map +1 -0
  16. package/lib/commands/run-add.d.ts +2 -0
  17. package/lib/commands/run-add.d.ts.map +1 -0
  18. package/lib/commands/run-add.js +100 -0
  19. package/lib/commands/run-add.js.map +1 -0
  20. package/lib/commands/run-compile.d.ts +2 -0
  21. package/lib/commands/run-compile.d.ts.map +1 -0
  22. package/lib/commands/run-compile.js +199 -0
  23. package/lib/commands/run-compile.js.map +1 -0
  24. package/lib/commands/run-create.d.ts +2 -0
  25. package/lib/commands/run-create.d.ts.map +1 -0
  26. package/lib/commands/run-create.js +142 -0
  27. package/lib/commands/run-create.js.map +1 -0
  28. package/lib/commands/run-graph.d.ts +3 -0
  29. package/lib/commands/run-graph.d.ts.map +1 -0
  30. package/lib/commands/run-graph.js +136 -0
  31. package/lib/commands/run-graph.js.map +1 -0
  32. package/lib/commands/run-login.d.ts +2 -0
  33. package/lib/commands/run-login.d.ts.map +1 -0
  34. package/lib/commands/run-login.js +107 -0
  35. package/lib/commands/run-login.js.map +1 -0
  36. package/lib/commands/run-test.d.ts +2 -0
  37. package/lib/commands/run-test.d.ts.map +1 -0
  38. package/lib/commands/run-test.js +11 -0
  39. package/lib/commands/run-test.js.map +1 -0
  40. package/lib/commands/run-upload.d.ts +14 -0
  41. package/lib/commands/run-upload.d.ts.map +1 -0
  42. package/lib/commands/run-upload.js +332 -0
  43. package/lib/commands/run-upload.js.map +1 -0
  44. package/lib/commands/run-version.d.ts +2 -0
  45. package/lib/commands/run-version.d.ts.map +1 -0
  46. package/lib/commands/run-version.js +38 -0
  47. package/lib/commands/run-version.js.map +1 -0
  48. package/lib/config.d.ts +23 -0
  49. package/lib/config.d.ts.map +1 -0
  50. package/lib/config.js +70 -0
  51. package/lib/config.js.map +1 -0
  52. package/lib/execution.d.ts +5 -0
  53. package/lib/execution.d.ts.map +1 -0
  54. package/lib/execution.js +31 -0
  55. package/lib/execution.js.map +1 -0
  56. package/lib/index.d.ts +3 -0
  57. package/lib/index.d.ts.map +1 -0
  58. package/lib/index.js +130 -1183
  59. package/lib/index.js.map +1 -7
  60. package/lib/key.d.ts +3 -0
  61. package/lib/key.d.ts.map +1 -0
  62. package/lib/key.js +36 -0
  63. package/lib/key.js.map +1 -0
  64. package/lib/utils.d.ts +4 -0
  65. package/lib/utils.d.ts.map +1 -0
  66. package/lib/utils.js +32 -0
  67. package/lib/utils.js.map +1 -0
  68. package/package.json +23 -5
  69. package/src/commands/run-test.ts +2 -4
  70. package/templates/aptos/src/processor.test.ts +4 -2
  71. package/templates/aptos/tsconfig.json +1 -1
  72. package/templates/eth/src/processor.test.ts +6 -4
  73. package/templates/eth/tsconfig.json +1 -1
  74. package/templates/fuel/src/processor.test.ts +4 -2
  75. package/templates/fuel/tsconfig.json +1 -1
  76. package/templates/raw/src/processor.test.ts +4 -2
  77. package/templates/raw/tsconfig.json +1 -1
  78. package/templates/solana/src/processor.test.ts +4 -2
  79. package/templates/solana/tsconfig.json +1 -1
  80. package/src/cjs-shim.ts +0 -8
  81. package/templates/aptos/jest.config.ts +0 -8
  82. package/templates/eth/jest.config.ts +0 -8
  83. package/templates/raw/jest.config.ts +0 -8
  84. package/templates/solana/jest.config.ts +0 -8
package/lib/key.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export declare function WriteKey(host: string, api_key: string): void;
2
+ export declare function ReadKey(host: string): string | undefined;
3
+ //# sourceMappingURL=key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../src/key.ts"],"names":[],"mappings":"AAcA,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAcrD;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAYxD"}
package/lib/key.js ADDED
@@ -0,0 +1,36 @@
1
+ import path from 'path';
2
+ import fs from 'fs';
3
+ import os from 'os';
4
+ const homeDir = os.homedir();
5
+ const sentioDir = path.join(homeDir, '.sentio');
6
+ const configFile = path.join(sentioDir, 'config.json');
7
+ export function WriteKey(host, api_key) {
8
+ const sentioDir = path.join(homeDir, '.sentio');
9
+ if (!fs.existsSync(sentioDir)) {
10
+ fs.mkdirSync(sentioDir, { recursive: true });
11
+ }
12
+ let config = {};
13
+ if (fs.existsSync(configFile)) {
14
+ const content = fs.readFileSync(configFile, 'utf8');
15
+ config = JSON.parse(content);
16
+ }
17
+ const hostConfig = config[host] || { api_keys: {} };
18
+ hostConfig.api_keys = api_key;
19
+ config[host] = hostConfig;
20
+ fs.writeFileSync(configFile, JSON.stringify(config, null, 2));
21
+ }
22
+ export function ReadKey(host) {
23
+ if (!fs.existsSync(sentioDir)) {
24
+ return undefined;
25
+ }
26
+ const configFile = path.join(sentioDir, 'config.json');
27
+ if (fs.existsSync(configFile)) {
28
+ const content = fs.readFileSync(configFile, 'utf8');
29
+ const config = JSON.parse(content);
30
+ return config[host]?.api_keys;
31
+ }
32
+ else {
33
+ return undefined;
34
+ }
35
+ }
36
+ //# sourceMappingURL=key.js.map
package/lib/key.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key.js","sourceRoot":"","sources":["../src/key.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAAE,MAAM,IAAI,CAAA;AAEnB,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,EAAE,CAAA;AAC5B,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;AAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAA;AAQtD,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,OAAe;IACpD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;IAC/C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAC9C,CAAC;IACD,IAAI,MAAM,GAAoB,EAAE,CAAA;IAChC,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;QACnD,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAC9B,CAAC;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAA;IACnD,UAAU,CAAC,QAAQ,GAAG,OAAO,CAAA;IAC7B,MAAM,CAAC,IAAI,CAAC,GAAG,UAAU,CAAA;IACzB,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;AAC/D,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAA;IACtD,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;QACnD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAClC,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAA;IAC/B,CAAC;SAAM,CAAC;QACN,OAAO,SAAS,CAAA;IAClB,CAAC;AACH,CAAC"}
package/lib/utils.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export declare function getPackageRoot(pkgId: string): string;
2
+ export declare function getCliVersion(): any;
3
+ export declare function getSdkVersion(): any;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAQA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQpD;AAED,wBAAgB,aAAa,QAM5B;AAED,wBAAgB,aAAa,QAS5B"}
package/lib/utils.js ADDED
@@ -0,0 +1,32 @@
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+ import { createRequire } from 'module';
4
+ import url from 'url';
5
+ const require = createRequire(import.meta.url);
6
+ const PACKAGE_JSON = 'package.json';
7
+ export function getPackageRoot(pkgId) {
8
+ const m = require.resolve(pkgId);
9
+ let dir = path.dirname(m);
10
+ while (!fs.existsSync(path.join(dir, PACKAGE_JSON))) {
11
+ dir = path.dirname(dir);
12
+ }
13
+ return dir;
14
+ }
15
+ export function getCliVersion() {
16
+ const packageJsonPath = url.fileURLToPath(new URL('../' + PACKAGE_JSON, import.meta.url));
17
+ const packageJsonContent = fs.readFileSync(packageJsonPath, 'utf-8');
18
+ const packageJson = JSON.parse(packageJsonContent);
19
+ return packageJson.version;
20
+ }
21
+ export function getSdkVersion() {
22
+ try {
23
+ const packageJsonPath = getPackageRoot('@sentio/sdk');
24
+ const packageJsonContent = fs.readFileSync(path.join(packageJsonPath, PACKAGE_JSON), 'utf-8');
25
+ const packageJson = JSON.parse(packageJsonContent);
26
+ return packageJson.version;
27
+ }
28
+ catch (e) {
29
+ return undefined;
30
+ }
31
+ }
32
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,GAAG,MAAM,KAAK,CAAA;AAErB,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC9C,MAAM,YAAY,GAAG,cAAc,CAAA;AAEnC,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAEhC,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACzB,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC;QACpD,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IACzB,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,MAAM,eAAe,GAAG,GAAG,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;IACzF,MAAM,kBAAkB,GAAG,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAAA;IACpE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;IAElD,OAAO,WAAW,CAAC,OAAO,CAAA;AAC5B,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,IAAI,CAAC;QACH,MAAM,eAAe,GAAG,cAAc,CAAC,aAAa,CAAC,CAAA;QACrD,MAAM,kBAAkB,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,CAAA;QAC7F,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;QAClD,OAAO,WAAW,CAAC,OAAO,CAAA;IAC5B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,SAAS,CAAA;IAClB,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/cli",
3
- "version": "2.18.3",
3
+ "version": "2.18.4-rc.2",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -14,7 +14,26 @@
14
14
  "!{lib,src}/**/*.test.{js,ts}"
15
15
  ],
16
16
  "types": "module",
17
- "dependencies": {},
17
+ "dependencies": {
18
+ "@aptos-labs/ts-sdk": "~1.14.0",
19
+ "@mysten/sui.js": "~0.54.1",
20
+ "@sentio/chain": "^1.1.4",
21
+ "@types/node": "^20.11.7",
22
+ "chalk": "^5.3.0",
23
+ "command-line-args": "^5.2.1",
24
+ "command-line-usage": "^7.0.1",
25
+ "express": "^4.18.2",
26
+ "form-data": "^4.0.0",
27
+ "fs-extra": "^11.2.0",
28
+ "jszip": "^3.10.1",
29
+ "latest-version": "^9.0.0",
30
+ "node-fetch": "^3.3.2",
31
+ "open": "^10.0.3",
32
+ "solc": "^0.8.25",
33
+ "tsup": "npm:@sentio/tsup@^6.7.2",
34
+ "tsx": "^4.15.2",
35
+ "yaml": "^2.3.4"
36
+ },
18
37
  "peerDependencies": {},
19
38
  "devDependencies": {
20
39
  "@types/command-line-args": "^5.2.3",
@@ -26,11 +45,10 @@
26
45
  "node": ">=16"
27
46
  },
28
47
  "scripts": {
29
- "build": "pnpm bundle",
48
+ "build": "pnpm compile",
30
49
  "postbuild": "pnpm install",
31
- "bundle": "esbuild --platform=node --format=esm --bundle src/index.ts --outfile=lib/index.js --minify --sourcemap --inject:src/cjs-shim.ts --external:@sentio/sdk",
32
50
  "cli": "tsx src/index.ts",
33
51
  "compile": "tsc",
34
- "test": "NODE_OPTIONS=--experimental-vm-modules pnpm jest"
52
+ "test": "glob -c 'tsx --test' '**/*.test.ts'"
35
53
  }
36
54
  }
@@ -3,12 +3,10 @@ import path from 'path'
3
3
  import { getPackageRoot } from '../utils.js'
4
4
 
5
5
  export function runTest(argv: string[]) {
6
- const defaultJestConfig = path.resolve(getPackageRoot('@sentio/sdk'), 'lib', 'jest.config.js')
7
- // if config not existed copy that
8
- const jest = path.resolve(getPackageRoot('jest'), 'bin', 'jest')
6
+ const tsx = path.resolve(getPackageRoot('tsx'), 'dist', 'cli.mjs')
9
7
 
10
8
  // Run tsc to do check before test
11
9
  const tsc = path.resolve(getPackageRoot('typescript'), 'bin', 'tsc')
12
10
  execSync(`node ${tsc} --noEmit`, { stdio: 'inherit' })
13
- execSync(`NODE_OPTIONS=--experimental-vm-modules node ${jest} ${argv.join(' ')}`, { stdio: 'inherit' })
11
+ execSync(`node ${tsx} --test **/*.test.ts ${argv.join(' ')}`, { stdio: 'inherit' })
14
12
  }
@@ -1,14 +1,16 @@
1
+ import assert from 'assert'
2
+ import { before, describe, test } from 'node:test'
1
3
  import { TestProcessorServer } from '@sentio/sdk/testing'
2
4
 
3
5
  describe('Test Processor', () => {
4
6
  const service = new TestProcessorServer(() => import('./processor.js'))
5
7
 
6
- beforeAll(async () => {
8
+ before(async () => {
7
9
  await service.start()
8
10
  })
9
11
 
10
12
  test('has config', async () => {
11
13
  const config = await service.getConfig({})
12
- expect(config.contractConfigs.length > 0)
14
+ assert.ok(config.contractConfigs.length > 0)
13
15
  })
14
16
  })
@@ -17,5 +17,5 @@
17
17
  "outDir": "./dist",
18
18
  "skipLibCheck": true
19
19
  },
20
- "exclude": ["dist", "jest.config.ts"]
20
+ "exclude": ["dist"]
21
21
  }
@@ -1,16 +1,18 @@
1
+ import assert from 'assert'
2
+ import { before, describe, test } from 'node:test'
1
3
  import { TestProcessorServer, firstCounterValue } from '@sentio/sdk/testing'
2
4
  import { mockTransferLog } from '@sentio/sdk/eth/builtin/erc20'
3
5
 
4
6
  describe('Test Processor', () => {
5
7
  const service = new TestProcessorServer(() => import('./processor.js'))
6
8
 
7
- beforeAll(async () => {
9
+ before(async () => {
8
10
  await service.start()
9
11
  })
10
12
 
11
13
  test('has valid config', async () => {
12
14
  const config = await service.getConfig({})
13
- expect(config.contractConfigs.length > 0).toBeTruthy()
15
+ assert(config.contractConfigs.length > 0)
14
16
  })
15
17
 
16
18
  test('check transfer event handling', async () => {
@@ -18,11 +20,11 @@ describe('Test Processor', () => {
18
20
  mockTransferLog('0x1e4ede388cbc9f4b5c79681b7f94d36a11abebc9', {
19
21
  from: '0x0000000000000000000000000000000000000000',
20
22
  to: '0xb329e39ebefd16f40d38f07643652ce17ca5bac1',
21
- value: 10n ** 18n * 10n,
23
+ value: 10n ** 18n * 10n
22
24
  })
23
25
  )
24
26
 
25
27
  const tokenCounter = firstCounterValue(resp.result, 'token')
26
- expect(tokenCounter).toEqual(10n)
28
+ assert.equal(tokenCounter, 10n)
27
29
  })
28
30
  })
@@ -17,5 +17,5 @@
17
17
  "outDir": "./dist",
18
18
  "skipLibCheck": true
19
19
  },
20
- "exclude": ["dist", "jest.config.ts"]
20
+ "exclude": ["dist"]
21
21
  }
@@ -1,14 +1,16 @@
1
+ import assert from 'assert'
2
+ import { before, describe, test } from 'node:test'
1
3
  import { TestProcessorServer } from '@sentio/sdk/testing'
2
4
 
3
5
  describe('Test Processor', () => {
4
6
  const service = new TestProcessorServer(async () => await import('./processor.js'))
5
7
 
6
- beforeAll(async () => {
8
+ before(async () => {
7
9
  await service.start()
8
10
  })
9
11
 
10
12
  test('has config', async () => {
11
13
  const config = await service.getConfig({})
12
- expect(config.contractConfigs.length > 0)
14
+ assert(config.contractConfigs.length > 0)
13
15
  })
14
16
  })
@@ -3,6 +3,6 @@
3
3
  "rootDir": "./src",
4
4
  "outDir": "./dist"
5
5
  },
6
- "exclude": ["dist", "jest.config.ts"],
6
+ "exclude": ["dist"],
7
7
  "extends": "../../tsconfig.json"
8
8
  }
@@ -1,14 +1,16 @@
1
+ import assert from 'assert'
2
+ import { before, describe, test } from 'node:test'
1
3
  import { TestProcessorServer } from '@sentio/sdk/testing'
2
4
 
3
5
  describe('Test Processor', () => {
4
6
  const service = new TestProcessorServer(() => import('./processor.js'))
5
7
 
6
- beforeAll(async () => {
8
+ before(async () => {
7
9
  await service.start()
8
10
  })
9
11
 
10
12
  test('has valid config', async () => {
11
13
  // const config = await service.getConfig({})
12
- // expect(config.contractConfigs.length > 0).toBeTruthy()
14
+ // assert(config.contractConfigs.length > 0)
13
15
  })
14
16
  })
@@ -17,5 +17,5 @@
17
17
  "outDir": "./dist",
18
18
  "skipLibCheck": true
19
19
  },
20
- "exclude": ["dist", "jest.config.ts"]
20
+ "exclude": ["dist"]
21
21
  }
@@ -1,14 +1,16 @@
1
+ import assert from 'assert'
2
+ import { before, describe, test } from 'node:test'
1
3
  import { TestProcessorServer } from '@sentio/sdk/testing'
2
4
 
3
5
  describe('Test Processor', () => {
4
6
  const service = new TestProcessorServer(() => import('./processor.js'))
5
7
 
6
- beforeAll(async () => {
8
+ before(async () => {
7
9
  await service.start()
8
10
  })
9
11
 
10
12
  test('has valid config', async () => {
11
13
  const config = await service.getConfig({})
12
- expect(config.contractConfigs.length > 0).toBeTruthy()
14
+ assert.ok(config.contractConfigs.length > 0)
13
15
  })
14
16
  })
@@ -17,5 +17,5 @@
17
17
  "outDir": "./dist",
18
18
  "skipLibCheck": true
19
19
  },
20
- "exclude": ["dist", "jest.config.ts"]
20
+ "exclude": ["dist"]
21
21
  }
package/src/cjs-shim.ts DELETED
@@ -1,8 +0,0 @@
1
- // https://github.com/evanw/esbuild/issues/1921#issuecomment-1898197331
2
- import { createRequire } from 'node:module'
3
- import path from 'node:path'
4
- import url from 'node:url'
5
-
6
- globalThis.require = createRequire(import.meta.url)
7
- globalThis.__filename = url.fileURLToPath(import.meta.url)
8
- globalThis.__dirname = path.dirname(__filename)
@@ -1,8 +0,0 @@
1
- /** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
2
- export default {
3
- preset: 'ts-jest/presets/default-esm',
4
- modulePathIgnorePatterns: ['<rootDir>/dist/'],
5
- moduleNameMapper: {
6
- '^(\\.{1,2}/.*)\\.js$': '$1',
7
- },
8
- }
@@ -1,8 +0,0 @@
1
- /** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
2
- export default {
3
- preset: 'ts-jest/presets/default-esm',
4
- modulePathIgnorePatterns: ['<rootDir>/dist/'],
5
- moduleNameMapper: {
6
- '^(\\.{1,2}/.*)\\.js$': '$1',
7
- },
8
- }
@@ -1,8 +0,0 @@
1
- /** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
2
- export default {
3
- preset: 'ts-jest/presets/default-esm',
4
- modulePathIgnorePatterns: ['<rootDir>/dist/'],
5
- moduleNameMapper: {
6
- '^(\\.{1,2}/.*)\\.js$': '$1',
7
- },
8
- }
@@ -1,8 +0,0 @@
1
- /** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
2
- export default {
3
- preset: 'ts-jest/presets/default-esm',
4
- modulePathIgnorePatterns: ['<rootDir>/dist/'],
5
- moduleNameMapper: {
6
- '^(\\.{1,2}/.*)\\.js$': '$1',
7
- },
8
- }