ic-mops 0.41.0 → 0.41.1
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/bundle/bin/mops.js +0 -0
- package/bundle/cli.js +29 -29
- package/bundle/cli.tgz +0 -0
- package/bundle/declarations/bench/bench.did.d.ts +1 -1
- package/bundle/declarations/bench/index.js +1 -2
- package/bundle/declarations/main/index.js +1 -2
- package/bundle/declarations/main/main.did +15 -8
- package/bundle/declarations/main/main.did.d.ts +12 -9
- package/bundle/declarations/main/main.did.js +11 -8
- package/bundle-package-json.ts +3 -0
- package/check-requirements.ts +50 -0
- package/commands/add.ts +4 -0
- package/commands/install-all.ts +2 -0
- package/commands/publish.ts +17 -3
- package/commands/toolchain/index.ts +7 -0
- package/declarations/bench/bench.did.d.ts +1 -1
- package/declarations/bench/index.js +1 -2
- package/declarations/main/index.js +1 -2
- package/declarations/main/main.did +15 -8
- package/declarations/main/main.did.d.ts +12 -9
- package/declarations/main/main.did.js +11 -8
- package/dist/bin/mops.js +0 -0
- package/dist/bundle-package-json.js +2 -0
- package/dist/check-requirements.js +9 -4
- package/dist/commands/add.js +2 -0
- package/dist/commands/install-all.js +2 -0
- package/dist/commands/publish.js +13 -1
- package/dist/commands/toolchain/index.js +5 -0
- package/dist/declarations/bench/bench.did.d.ts +1 -1
- package/dist/declarations/bench/index.js +1 -2
- package/dist/declarations/main/index.js +1 -2
- package/dist/declarations/main/main.did +15 -8
- package/dist/declarations/main/main.did.d.ts +12 -9
- package/dist/declarations/main/main.did.js +11 -8
- package/dist/mops.js +8 -1
- package/dist/package.json +3 -3
- package/dist/release-cli.js +4 -0
- package/dist/types.d.ts +4 -0
- package/mops.ts +10 -1
- package/package.json +3 -3
- package/release-cli.ts +5 -0
- package/types.ts +7 -2
package/dist/types.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export type Config = {
|
|
|
18
18
|
dependencies?: Dependencies;
|
|
19
19
|
'dev-dependencies'?: Dependencies;
|
|
20
20
|
toolchain?: Toolchain;
|
|
21
|
+
requirements?: Requirements;
|
|
21
22
|
};
|
|
22
23
|
export type Dependencies = Record<string, Dependency>;
|
|
23
24
|
export type Dependency = {
|
|
@@ -32,3 +33,6 @@ export type Toolchain = {
|
|
|
32
33
|
'pocket-ic'?: string;
|
|
33
34
|
};
|
|
34
35
|
export type Tool = 'moc' | 'wasmtime' | 'pocket-ic';
|
|
36
|
+
export type Requirements = {
|
|
37
|
+
moc?: string;
|
|
38
|
+
};
|
package/mops.ts
CHANGED
|
@@ -206,7 +206,16 @@ export function readConfig(configFile = getClosestConfigFile()) : Config {
|
|
|
206
206
|
processDeps(toml.dependencies || {});
|
|
207
207
|
processDeps(toml['dev-dependencies'] || {});
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
let config : Config = {...toml};
|
|
210
|
+
|
|
211
|
+
Object.entries(config.requirements || {}).forEach(([name, value]) => {
|
|
212
|
+
if (name === 'moc') {
|
|
213
|
+
config.requirements = config.requirements || {};
|
|
214
|
+
config.requirements.moc = value;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
return config;
|
|
210
219
|
}
|
|
211
220
|
|
|
212
221
|
export function writeConfig(config : Config, configFile = getClosestConfigFile()) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ic-mops",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
|
-
"mops": "bin/mops.js",
|
|
7
|
-
"ic-mops": "bin/mops.js",
|
|
6
|
+
"mops": "dist/bin/mops.js",
|
|
7
|
+
"ic-mops": "dist/bin/mops.js",
|
|
8
8
|
"moc-wrapper": "bin/moc-wrapper.sh"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
package/release-cli.ts
CHANGED
|
@@ -14,6 +14,11 @@ let __dirname = new URL('.', import.meta.url).pathname;
|
|
|
14
14
|
execSync('npm run prepare', {stdio: 'inherit', cwd: __dirname});
|
|
15
15
|
execSync('npm run bundle', {stdio: 'inherit', cwd: __dirname});
|
|
16
16
|
|
|
17
|
+
// fix package.json paths
|
|
18
|
+
// let packageJson = fs.readFileSync(path.resolve(__dirname, 'bundle/package.json'), 'utf8');
|
|
19
|
+
// packageJson = packageJson.replaceAll('dist/', '');
|
|
20
|
+
// fs.writeFileSync(path.resolve(__dirname, 'bundle/package.json'), packageJson);
|
|
21
|
+
|
|
17
22
|
let version = JSON.parse(fs.readFileSync(path.resolve(__dirname, 'package.json'), 'utf8')).version;
|
|
18
23
|
let major = semver.parse(version)?.major;
|
|
19
24
|
let tag = semver.parse(version)?.prerelease[0] || 'latest';
|
package/types.ts
CHANGED
|
@@ -18,6 +18,7 @@ export type Config = {
|
|
|
18
18
|
dependencies ?: Dependencies;
|
|
19
19
|
'dev-dependencies' ?: Dependencies;
|
|
20
20
|
toolchain ?: Toolchain;
|
|
21
|
+
requirements ?: Requirements;
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
export type Dependencies = Record<string, Dependency>;
|
|
@@ -27,7 +28,7 @@ export type Dependency = {
|
|
|
27
28
|
version ?: string; // mops package
|
|
28
29
|
repo ?: string; // github package
|
|
29
30
|
path ?: string; // local package
|
|
30
|
-
}
|
|
31
|
+
};
|
|
31
32
|
|
|
32
33
|
export type Toolchain = {
|
|
33
34
|
moc ?: string;
|
|
@@ -35,4 +36,8 @@ export type Toolchain = {
|
|
|
35
36
|
'pocket-ic' ?: string;
|
|
36
37
|
};
|
|
37
38
|
|
|
38
|
-
export type Tool = 'moc' | 'wasmtime' | 'pocket-ic';
|
|
39
|
+
export type Tool = 'moc' | 'wasmtime' | 'pocket-ic';
|
|
40
|
+
|
|
41
|
+
export type Requirements = {
|
|
42
|
+
moc ?: string;
|
|
43
|
+
};
|