@prosopo/scripts 3.1.20 → 3.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +84 -0
- package/dist/cjs/index.cjs +0 -3
- package/dist/cjs/util/index.cjs +0 -3
- package/dist/index.js +0 -3
- package/dist/util/index.js +0 -3
- package/package.json +22 -27
- package/dist/cjs/util/loadContractFiles.cjs +0 -44
- package/dist/util/loadContractFiles.js +0 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,89 @@
|
|
|
1
1
|
# @prosopo/scripts
|
|
2
2
|
|
|
3
|
+
## 3.1.25
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- 8ce9205: Change engine requirements
|
|
7
|
+
- b6e98b2: Run npm audit
|
|
8
|
+
- Updated dependencies [fdef625]
|
|
9
|
+
- Updated dependencies [15ae7cf]
|
|
10
|
+
- Updated dependencies [bb5f41c]
|
|
11
|
+
- Updated dependencies [55a64c6]
|
|
12
|
+
- Updated dependencies [aa8216a]
|
|
13
|
+
- Updated dependencies [8ce9205]
|
|
14
|
+
- Updated dependencies [df79c03]
|
|
15
|
+
- Updated dependencies [6ac5367]
|
|
16
|
+
- Updated dependencies [b6e98b2]
|
|
17
|
+
- Updated dependencies [55a64c6]
|
|
18
|
+
- @prosopo/provider@3.13.0
|
|
19
|
+
- @prosopo/types@3.6.0
|
|
20
|
+
- @prosopo/util@3.2.0
|
|
21
|
+
- @prosopo/cli@3.5.0
|
|
22
|
+
- @prosopo/util-crypto@13.5.24
|
|
23
|
+
- @prosopo/types-env@2.7.47
|
|
24
|
+
- @prosopo/datasets@3.0.43
|
|
25
|
+
- @prosopo/keyring@2.8.36
|
|
26
|
+
- @prosopo/common@3.1.22
|
|
27
|
+
- @prosopo/dotenv@3.0.27
|
|
28
|
+
- @prosopo/locale@3.1.22
|
|
29
|
+
- @prosopo/workspace@3.1.15
|
|
30
|
+
- @prosopo/env@3.2.22
|
|
31
|
+
- @prosopo/config@3.1.22
|
|
32
|
+
|
|
33
|
+
## 3.1.24
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Updated dependencies [8f1773a]
|
|
37
|
+
- @prosopo/types@3.5.11
|
|
38
|
+
- @prosopo/cli@3.4.17
|
|
39
|
+
- @prosopo/datasets@3.0.42
|
|
40
|
+
- @prosopo/env@3.2.21
|
|
41
|
+
- @prosopo/keyring@2.8.35
|
|
42
|
+
- @prosopo/provider@3.12.14
|
|
43
|
+
- @prosopo/types-env@2.7.46
|
|
44
|
+
|
|
45
|
+
## 3.1.23
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- Updated dependencies [cb8ab85]
|
|
49
|
+
- @prosopo/provider@3.12.13
|
|
50
|
+
- @prosopo/types@3.5.10
|
|
51
|
+
- @prosopo/cli@3.4.16
|
|
52
|
+
- @prosopo/datasets@3.0.41
|
|
53
|
+
- @prosopo/types-env@2.7.45
|
|
54
|
+
- @prosopo/env@3.2.20
|
|
55
|
+
- @prosopo/keyring@2.8.34
|
|
56
|
+
|
|
57
|
+
## 3.1.22
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Updated dependencies [43907e8]
|
|
61
|
+
- Updated dependencies [b4639ec]
|
|
62
|
+
- Updated dependencies [005ce66]
|
|
63
|
+
- Updated dependencies [7101036]
|
|
64
|
+
- @prosopo/types@3.5.9
|
|
65
|
+
- @prosopo/provider@3.12.12
|
|
66
|
+
- @prosopo/util@3.1.7
|
|
67
|
+
- @prosopo/cli@3.4.15
|
|
68
|
+
- @prosopo/datasets@3.0.40
|
|
69
|
+
- @prosopo/types-env@2.7.44
|
|
70
|
+
- @prosopo/env@3.2.19
|
|
71
|
+
- @prosopo/keyring@2.8.33
|
|
72
|
+
|
|
73
|
+
## 3.1.21
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- Updated dependencies [4b6dc9d]
|
|
77
|
+
- Updated dependencies [e5c259d]
|
|
78
|
+
- Updated dependencies [6420187]
|
|
79
|
+
- @prosopo/provider@3.12.11
|
|
80
|
+
- @prosopo/types@3.5.8
|
|
81
|
+
- @prosopo/cli@3.4.14
|
|
82
|
+
- @prosopo/datasets@3.0.39
|
|
83
|
+
- @prosopo/types-env@2.7.43
|
|
84
|
+
- @prosopo/env@3.2.18
|
|
85
|
+
- @prosopo/keyring@2.8.32
|
|
86
|
+
|
|
3
87
|
## 3.1.20
|
|
4
88
|
### Patch Changes
|
|
5
89
|
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -5,7 +5,6 @@ require("./util/index.cjs");
|
|
|
5
5
|
const index = require("./cli/index.cjs");
|
|
6
6
|
const setup = require("./setup/setup.cjs");
|
|
7
7
|
const provider = require("./setup/provider.cjs");
|
|
8
|
-
const loadContractFiles = require("./util/loadContractFiles.cjs");
|
|
9
8
|
const updateEnv = require("./util/updateEnv.cjs");
|
|
10
9
|
const exec = require("./util/exec.cjs");
|
|
11
10
|
const fluxLogDappDetails = require("./util/fluxLogDappDetails.cjs");
|
|
@@ -13,8 +12,6 @@ exports.processArgs = index.processArgs;
|
|
|
13
12
|
exports.setup = setup.setup;
|
|
14
13
|
exports.updateEnvFile = setup.updateEnvFile;
|
|
15
14
|
exports.setupProvider = provider.setupProvider;
|
|
16
|
-
exports.AbiJSON = loadContractFiles.AbiJSON;
|
|
17
|
-
exports.Wasm = loadContractFiles.Wasm;
|
|
18
15
|
exports.findEnvFiles = updateEnv.findEnvFiles;
|
|
19
16
|
exports.updateDemoHTMLFiles = updateEnv.updateDemoHTMLFiles;
|
|
20
17
|
exports.updateEnvFiles = updateEnv.updateEnvFiles;
|
package/dist/cjs/util/index.cjs
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const loadContractFiles = require("./loadContractFiles.cjs");
|
|
4
3
|
const updateEnv = require("./updateEnv.cjs");
|
|
5
4
|
const exec = require("./exec.cjs");
|
|
6
5
|
const fluxLogDappDetails = require("./fluxLogDappDetails.cjs");
|
|
7
|
-
exports.AbiJSON = loadContractFiles.AbiJSON;
|
|
8
|
-
exports.Wasm = loadContractFiles.Wasm;
|
|
9
6
|
exports.findEnvFiles = updateEnv.findEnvFiles;
|
|
10
7
|
exports.updateDemoHTMLFiles = updateEnv.updateDemoHTMLFiles;
|
|
11
8
|
exports.updateEnvFiles = updateEnv.updateEnvFiles;
|
package/dist/index.js
CHANGED
|
@@ -3,13 +3,10 @@ import "./util/index.js";
|
|
|
3
3
|
import { processArgs } from "./cli/index.js";
|
|
4
4
|
import { setup, updateEnvFile } from "./setup/setup.js";
|
|
5
5
|
import { setupProvider } from "./setup/provider.js";
|
|
6
|
-
import { AbiJSON, Wasm } from "./util/loadContractFiles.js";
|
|
7
6
|
import { findEnvFiles, updateDemoHTMLFiles, updateEnvFiles } from "./util/updateEnv.js";
|
|
8
7
|
import { exec } from "./util/exec.js";
|
|
9
8
|
import { extractReferrersFromLogs } from "./util/fluxLogDappDetails.js";
|
|
10
9
|
export {
|
|
11
|
-
AbiJSON,
|
|
12
|
-
Wasm,
|
|
13
10
|
exec,
|
|
14
11
|
extractReferrersFromLogs,
|
|
15
12
|
findEnvFiles,
|
package/dist/util/index.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { AbiJSON, Wasm } from "./loadContractFiles.js";
|
|
2
1
|
import { findEnvFiles, updateDemoHTMLFiles, updateEnvFiles } from "./updateEnv.js";
|
|
3
2
|
import { exec } from "./exec.js";
|
|
4
3
|
import { extractReferrersFromLogs } from "./fluxLogDappDetails.js";
|
|
5
4
|
export {
|
|
6
|
-
AbiJSON,
|
|
7
|
-
Wasm,
|
|
8
5
|
exec,
|
|
9
6
|
extractReferrersFromLogs,
|
|
10
7
|
findEnvFiles,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/scripts",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.25",
|
|
4
4
|
"description": "Dev scripts for working with prosopo packages",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
},
|
|
14
14
|
"type": "module",
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": "
|
|
17
|
-
"npm": "10.
|
|
16
|
+
"node": ">=v20.0.0",
|
|
17
|
+
"npm": ">=10.6.0"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.esm.config.ts --mode $NODE_ENV",
|
|
@@ -28,43 +28,38 @@
|
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@iarna/toml": "2.2.5",
|
|
31
|
-
"@polkadot/
|
|
32
|
-
"@polkadot/
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@prosopo/
|
|
36
|
-
"@prosopo/
|
|
37
|
-
"@prosopo/
|
|
38
|
-
"@prosopo/
|
|
39
|
-
"@prosopo/
|
|
40
|
-
"@prosopo/
|
|
41
|
-
"@prosopo/
|
|
42
|
-
"@prosopo/
|
|
43
|
-
"@prosopo/
|
|
44
|
-
"@prosopo/
|
|
45
|
-
"@prosopo/
|
|
46
|
-
"@prosopo/
|
|
47
|
-
"@prosopo/util-crypto": "13.5.23",
|
|
48
|
-
"@prosopo/workspace": "3.1.14",
|
|
31
|
+
"@polkadot/util": "13.5.7",
|
|
32
|
+
"@polkadot/util-crypto": "13.5.7",
|
|
33
|
+
"@prosopo/cli": "3.5.0",
|
|
34
|
+
"@prosopo/common": "3.1.22",
|
|
35
|
+
"@prosopo/config": "3.1.22",
|
|
36
|
+
"@prosopo/datasets": "3.0.43",
|
|
37
|
+
"@prosopo/dotenv": "3.0.27",
|
|
38
|
+
"@prosopo/env": "3.2.22",
|
|
39
|
+
"@prosopo/keyring": "2.8.36",
|
|
40
|
+
"@prosopo/locale": "3.1.22",
|
|
41
|
+
"@prosopo/provider": "3.13.0",
|
|
42
|
+
"@prosopo/types": "3.6.0",
|
|
43
|
+
"@prosopo/types-env": "2.7.47",
|
|
44
|
+
"@prosopo/util": "3.2.0",
|
|
45
|
+
"@prosopo/util-crypto": "13.5.24",
|
|
46
|
+
"@prosopo/workspace": "3.1.15",
|
|
49
47
|
"dotenv": "16.4.5",
|
|
50
48
|
"fast-glob": "3.3.2",
|
|
51
49
|
"fs-extra": "11.2.0",
|
|
52
50
|
"yargs": "17.7.2"
|
|
53
51
|
},
|
|
54
|
-
"overrides": {
|
|
55
|
-
"@polkadot/keyring": "12.6.2"
|
|
56
|
-
},
|
|
57
52
|
"devDependencies": {
|
|
58
53
|
"@types/fs-extra": "11.0.4",
|
|
59
54
|
"@types/node": "22.10.2",
|
|
60
|
-
"@vitest/coverage-v8": "3.
|
|
55
|
+
"@vitest/coverage-v8": "3.2.4",
|
|
61
56
|
"concurrently": "9.0.1",
|
|
62
57
|
"del-cli": "6.0.0",
|
|
63
58
|
"npm-run-all": "4.1.5",
|
|
64
59
|
"tslib": "2.7.0",
|
|
65
60
|
"tsx": "4.20.3",
|
|
66
61
|
"typescript": "5.6.2",
|
|
67
|
-
"vite": "6.
|
|
68
|
-
"vitest": "3.
|
|
62
|
+
"vite": "6.4.1",
|
|
63
|
+
"vitest": "3.2.4"
|
|
69
64
|
}
|
|
70
65
|
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const path = require("node:path");
|
|
4
|
-
const apiContract = require("@polkadot/api-contract");
|
|
5
|
-
const util = require("@polkadot/util");
|
|
6
|
-
const common = require("@prosopo/common");
|
|
7
|
-
const fse = require("fs-extra");
|
|
8
|
-
const __dirname$1 = path.resolve();
|
|
9
|
-
async function AbiJSON(filePath) {
|
|
10
|
-
const resolvedFilePath = path.resolve(__dirname$1, filePath);
|
|
11
|
-
await fse.ensureFile(resolvedFilePath);
|
|
12
|
-
const fileExists = await fse.pathExists(resolvedFilePath);
|
|
13
|
-
if (fileExists) {
|
|
14
|
-
const json = JSON.parse(
|
|
15
|
-
await fse.readFile(resolvedFilePath, {
|
|
16
|
-
encoding: "utf8"
|
|
17
|
-
})
|
|
18
|
-
);
|
|
19
|
-
return new apiContract.Abi(json);
|
|
20
|
-
}
|
|
21
|
-
throw new common.ProsopoError("FS.FILE_NOT_FOUND", {
|
|
22
|
-
context: { error: `File ${filePath} does not exist` }
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
async function Wasm(filePath) {
|
|
26
|
-
const resolvedFilePath = path.resolve(__dirname$1, filePath);
|
|
27
|
-
await fse.ensureFile(resolvedFilePath);
|
|
28
|
-
const fileExists = await fse.pathExists(resolvedFilePath);
|
|
29
|
-
if (fileExists) {
|
|
30
|
-
const wasm = `0x${fse.readFileSync(resolvedFilePath).toString("hex")}`;
|
|
31
|
-
const wasmBytes = util.hexToU8a(wasm);
|
|
32
|
-
if (util.isWasm(wasmBytes)) {
|
|
33
|
-
return wasmBytes;
|
|
34
|
-
}
|
|
35
|
-
console.error(`Error loading contract wasm: ${wasm.slice(0, 10)}...`);
|
|
36
|
-
process.exit(1);
|
|
37
|
-
} else {
|
|
38
|
-
throw new common.ProsopoError("FS.FILE_NOT_FOUND", {
|
|
39
|
-
context: { error: `File ${filePath} does not exist` }
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.AbiJSON = AbiJSON;
|
|
44
|
-
exports.Wasm = Wasm;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { Abi } from "@polkadot/api-contract";
|
|
3
|
-
import { hexToU8a, isWasm } from "@polkadot/util";
|
|
4
|
-
import { ProsopoError } from "@prosopo/common";
|
|
5
|
-
import fse from "fs-extra";
|
|
6
|
-
const __dirname = path.resolve();
|
|
7
|
-
async function AbiJSON(filePath) {
|
|
8
|
-
const resolvedFilePath = path.resolve(__dirname, filePath);
|
|
9
|
-
await fse.ensureFile(resolvedFilePath);
|
|
10
|
-
const fileExists = await fse.pathExists(resolvedFilePath);
|
|
11
|
-
if (fileExists) {
|
|
12
|
-
const json = JSON.parse(
|
|
13
|
-
await fse.readFile(resolvedFilePath, {
|
|
14
|
-
encoding: "utf8"
|
|
15
|
-
})
|
|
16
|
-
);
|
|
17
|
-
return new Abi(json);
|
|
18
|
-
}
|
|
19
|
-
throw new ProsopoError("FS.FILE_NOT_FOUND", {
|
|
20
|
-
context: { error: `File ${filePath} does not exist` }
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
async function Wasm(filePath) {
|
|
24
|
-
const resolvedFilePath = path.resolve(__dirname, filePath);
|
|
25
|
-
await fse.ensureFile(resolvedFilePath);
|
|
26
|
-
const fileExists = await fse.pathExists(resolvedFilePath);
|
|
27
|
-
if (fileExists) {
|
|
28
|
-
const wasm = `0x${fse.readFileSync(resolvedFilePath).toString("hex")}`;
|
|
29
|
-
const wasmBytes = hexToU8a(wasm);
|
|
30
|
-
if (isWasm(wasmBytes)) {
|
|
31
|
-
return wasmBytes;
|
|
32
|
-
}
|
|
33
|
-
console.error(`Error loading contract wasm: ${wasm.slice(0, 10)}...`);
|
|
34
|
-
process.exit(1);
|
|
35
|
-
} else {
|
|
36
|
-
throw new ProsopoError("FS.FILE_NOT_FOUND", {
|
|
37
|
-
context: { error: `File ${filePath} does not exist` }
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
AbiJSON,
|
|
43
|
-
Wasm
|
|
44
|
-
};
|