ic-mops 0.40.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/.DS_Store +0 -0
- package/.npmrc +2 -1
- package/CHANGELOG.md +8 -0
- package/DEVELOPMENT.md +25 -0
- package/bundle/bench/bench-canister.mo +87 -0
- package/bundle/bench/user-bench.mo +14 -0
- package/bundle/bin/moc-wrapper.sh +3 -0
- package/bundle/bin/mops.js +3 -0
- package/bundle/cli.js +88 -0
- package/bundle/cli.tgz +0 -0
- package/bundle/declarations/bench/bench.did +26 -0
- package/bundle/declarations/bench/bench.did.d.ts +29 -0
- package/bundle/declarations/bench/bench.did.js +26 -0
- package/bundle/declarations/bench/index.d.ts +50 -0
- package/bundle/declarations/bench/index.js +40 -0
- package/bundle/declarations/main/index.d.ts +50 -0
- package/bundle/declarations/main/index.js +40 -0
- package/bundle/declarations/main/main.did +433 -0
- package/bundle/declarations/main/main.did.d.ts +355 -0
- package/bundle/declarations/main/main.did.js +407 -0
- package/bundle/declarations/storage/index.d.ts +50 -0
- package/bundle/declarations/storage/index.js +30 -0
- package/bundle/declarations/storage/storage.did +46 -0
- package/bundle/declarations/storage/storage.did.d.ts +37 -0
- package/bundle/declarations/storage/storage.did.js +38 -0
- package/bundle/package.json +31 -0
- package/bundle/templates/README.md +13 -0
- package/bundle/templates/licenses/Apache-2.0 +202 -0
- package/bundle/templates/licenses/Apache-2.0-NOTICE +13 -0
- package/bundle/templates/licenses/MIT +21 -0
- package/bundle/templates/mops-publish.yml +17 -0
- package/bundle/templates/mops-test.yml +22 -0
- package/bundle/templates/src/lib.mo +15 -0
- package/bundle/templates/test/lib.test.mo +4 -0
- package/bundle-package-json.ts +17 -0
- package/check-requirements.ts +50 -0
- package/cli.ts +22 -19
- package/commands/add.ts +4 -0
- package/commands/install-all.ts +2 -0
- package/commands/publish.ts +18 -30
- package/commands/self.ts +75 -0
- package/commands/template.ts +9 -10
- 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/api/actors.d.ts +0 -0
- package/dist/api/actors.js +0 -0
- package/dist/api/downloadPackageFiles.d.ts +0 -0
- package/dist/api/downloadPackageFiles.js +0 -0
- package/dist/api/getHighestVersion.d.ts +0 -0
- package/dist/api/getHighestVersion.js +0 -0
- package/dist/api/index.d.ts +0 -0
- package/dist/api/index.js +0 -0
- package/dist/api/network.d.ts +0 -0
- package/dist/api/network.js +0 -0
- package/dist/api/resolveVersion.d.ts +0 -0
- package/dist/api/resolveVersion.js +0 -0
- package/dist/bin/mops.d.ts +1 -1
- package/dist/bin/mops.js +2 -1
- package/dist/bundle-package-json.d.ts +0 -0
- package/dist/bundle-package-json.js +2 -0
- package/dist/cache.d.ts +0 -0
- package/dist/cache.js +0 -0
- package/dist/check-requirements.d.ts +3 -0
- package/dist/check-requirements.js +44 -0
- package/dist/cli.d.ts +0 -0
- package/dist/cli.js +18 -18
- package/dist/commands/add.d.ts +0 -0
- package/dist/commands/add.js +2 -0
- package/dist/commands/available-updates.d.ts +0 -0
- package/dist/commands/available-updates.js +0 -0
- package/dist/commands/bench-replica.d.ts +0 -0
- package/dist/commands/bench-replica.js +0 -0
- package/dist/commands/bench.d.ts +0 -0
- package/dist/commands/bench.js +0 -0
- package/dist/commands/bump.d.ts +0 -0
- package/dist/commands/bump.js +0 -0
- package/dist/commands/docs.d.ts +0 -0
- package/dist/commands/docs.js +0 -0
- package/dist/commands/import-identity.d.ts +0 -0
- package/dist/commands/import-identity.js +0 -0
- package/dist/commands/init.d.ts +0 -0
- package/dist/commands/init.js +0 -0
- package/dist/commands/install-all.d.ts +0 -0
- package/dist/commands/install-all.js +2 -0
- package/dist/commands/install-local.d.ts +0 -0
- package/dist/commands/install-local.js +0 -0
- package/dist/commands/install.d.ts +0 -0
- package/dist/commands/install.js +0 -0
- package/dist/commands/outdated.d.ts +0 -0
- package/dist/commands/outdated.js +0 -0
- package/dist/commands/publish.d.ts +0 -0
- package/dist/commands/publish.js +14 -25
- package/dist/commands/remove.d.ts +0 -0
- package/dist/commands/remove.js +0 -0
- package/dist/commands/search.d.ts +0 -0
- package/dist/commands/search.js +0 -0
- package/dist/commands/self.js +1 -1
- package/dist/commands/sources.d.ts +0 -0
- package/dist/commands/sources.js +0 -0
- package/dist/commands/sync.d.ts +0 -0
- package/dist/commands/sync.js +0 -0
- package/dist/commands/template.d.ts +0 -0
- package/dist/commands/template.js +9 -10
- package/dist/commands/test/mmf1.d.ts +0 -0
- package/dist/commands/test/mmf1.js +0 -0
- package/dist/commands/test/reporters/compact-reporter.d.ts +0 -0
- package/dist/commands/test/reporters/compact-reporter.js +0 -0
- package/dist/commands/test/reporters/files-reporter.d.ts +0 -0
- package/dist/commands/test/reporters/files-reporter.js +0 -0
- package/dist/commands/test/reporters/reporter.d.ts +0 -0
- package/dist/commands/test/reporters/reporter.js +0 -0
- package/dist/commands/test/reporters/silent-reporter.d.ts +0 -0
- package/dist/commands/test/reporters/silent-reporter.js +0 -0
- package/dist/commands/test/reporters/verbose-reporter.d.ts +0 -0
- package/dist/commands/test/reporters/verbose-reporter.js +0 -0
- package/dist/commands/test/test.d.ts +0 -0
- package/dist/commands/test/test.js +0 -0
- package/dist/commands/test/utils.d.ts +0 -0
- package/dist/commands/test/utils.js +0 -0
- package/dist/commands/toolchain/index.d.ts +0 -0
- package/dist/commands/toolchain/index.js +5 -0
- package/dist/commands/toolchain/moc.d.ts +0 -0
- package/dist/commands/toolchain/moc.js +0 -0
- package/dist/commands/toolchain/pocket-ic.d.ts +0 -0
- package/dist/commands/toolchain/pocket-ic.js +0 -0
- package/dist/commands/toolchain/toolchain-utils.d.ts +0 -0
- package/dist/commands/toolchain/toolchain-utils.js +0 -0
- package/dist/commands/toolchain/wasmtime.d.ts +0 -0
- package/dist/commands/toolchain/wasmtime.js +0 -0
- package/dist/commands/transfer-ownership.d.ts +0 -0
- package/dist/commands/transfer-ownership.js +0 -0
- package/dist/commands/update.d.ts +0 -0
- package/dist/commands/update.js +0 -0
- package/dist/commands/user.d.ts +0 -0
- package/dist/commands/user.js +0 -0
- package/dist/commands/whoami.d.ts +0 -0
- package/dist/commands/whoami.js +0 -0
- package/dist/declarations/bench/bench.did +0 -0
- package/dist/declarations/bench/bench.did.d.ts +1 -1
- package/dist/declarations/bench/bench.did.js +0 -0
- package/dist/declarations/bench/index.d.ts +0 -0
- package/dist/declarations/bench/index.js +1 -2
- package/dist/declarations/main/index.d.ts +0 -0
- 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/helpers/find-changelog-entry.d.ts +0 -0
- package/dist/helpers/find-changelog-entry.js +0 -0
- package/dist/helpers/get-dfx-version.d.ts +0 -0
- package/dist/helpers/get-dfx-version.js +0 -0
- package/dist/helpers/get-moc-path.d.ts +0 -0
- package/dist/helpers/get-moc-path.js +0 -0
- package/dist/helpers/get-moc-version.d.ts +0 -0
- package/dist/helpers/get-moc-version.js +0 -0
- package/dist/integrity.d.ts +0 -0
- package/dist/integrity.js +0 -0
- package/dist/mops.d.ts +1 -0
- package/dist/mops.js +12 -1
- package/dist/notify-installs.d.ts +0 -0
- package/dist/notify-installs.js +0 -0
- package/dist/package.json +18 -24
- package/dist/parallel.d.ts +0 -0
- package/dist/parallel.js +0 -0
- package/dist/pem.d.ts +0 -0
- package/dist/pem.js +0 -0
- package/dist/release-cli.d.ts +0 -0
- package/dist/release-cli.js +13 -7
- package/dist/resolve-packages.d.ts +0 -0
- package/dist/resolve-packages.js +0 -0
- package/dist/templates.d.ts +1 -0
- package/dist/templates.js +4 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.js +0 -0
- package/dist/vessel.d.ts +0 -0
- package/dist/vessel.js +0 -0
- package/helpers/find-changelog-entry.ts +27 -0
- package/mops.ts +15 -1
- package/package.json +26 -17
- package/release-cli.ts +67 -0
- package/remove-scripts.ts +6 -0
- package/templates.ts +5 -0
- package/tsconfig.json +1 -1
- package/types.ts +7 -2
- package/commands/self-update.ts +0 -6
- package/dist/commands/self-update.d.ts +0 -3
- package/dist/commands/self-update.js +0 -5
- /package/bin/{mops.ts → mops.js} +0 -0
|
@@ -7,6 +7,7 @@ import { installFromGithub } from '../vessel.js';
|
|
|
7
7
|
import { notifyInstalls } from '../notify-installs.js';
|
|
8
8
|
import { checkIntegrity } from '../integrity.js';
|
|
9
9
|
import { installLocal } from './install-local.js';
|
|
10
|
+
import { checkRequirements } from '../check-requirements.js';
|
|
10
11
|
export async function installAll({ verbose = false, silent = false, lock } = {}) {
|
|
11
12
|
if (!checkConfigFile()) {
|
|
12
13
|
return;
|
|
@@ -38,6 +39,7 @@ export async function installAll({ verbose = false, silent = false, lock } = {})
|
|
|
38
39
|
]);
|
|
39
40
|
if (!silent) {
|
|
40
41
|
logUpdate.clear();
|
|
42
|
+
await checkRequirements();
|
|
41
43
|
console.log(chalk.green('Packages installed'));
|
|
42
44
|
}
|
|
43
45
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/commands/install.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/commands/publish.js
CHANGED
|
@@ -5,14 +5,13 @@ import logUpdate from 'log-update';
|
|
|
5
5
|
import { globbySync } from 'globby';
|
|
6
6
|
import { minimatch } from 'minimatch';
|
|
7
7
|
import prompts from 'prompts';
|
|
8
|
-
import { fromMarkdown } from 'mdast-util-from-markdown';
|
|
9
|
-
import { toMarkdown } from 'mdast-util-to-markdown';
|
|
10
8
|
import { checkConfigFile, getIdentity, getRootDir, progressBar, readConfig } from '../mops.js';
|
|
11
9
|
import { mainActor } from '../api/actors.js';
|
|
12
10
|
import { parallel } from '../parallel.js';
|
|
13
11
|
import { docs } from './docs.js';
|
|
14
12
|
import { testWithReporter } from './test/test.js';
|
|
15
13
|
import { SilentReporter } from './test/reporters/silent-reporter.js';
|
|
14
|
+
import { findChangelogEntry } from '../helpers/find-changelog-entry.js';
|
|
16
15
|
import { bench } from './bench.js';
|
|
17
16
|
export async function publish(options = {}) {
|
|
18
17
|
if (!checkConfigFile()) {
|
|
@@ -23,7 +22,7 @@ export async function publish(options = {}) {
|
|
|
23
22
|
console.log(`Publishing ${config.package?.name}@${config.package?.version}`);
|
|
24
23
|
// validate
|
|
25
24
|
for (let key of Object.keys(config)) {
|
|
26
|
-
if (!['package', 'dependencies', 'dev-dependencies', 'toolchain'].includes(key)) {
|
|
25
|
+
if (!['package', 'dependencies', 'dev-dependencies', 'toolchain', 'requirements'].includes(key)) {
|
|
27
26
|
console.log(chalk.red('Error: ') + `Unknown config section [${key}]`);
|
|
28
27
|
process.exit(1);
|
|
29
28
|
}
|
|
@@ -142,6 +141,14 @@ export async function publish(options = {}) {
|
|
|
142
141
|
}
|
|
143
142
|
}
|
|
144
143
|
}
|
|
144
|
+
if (config.requirements) {
|
|
145
|
+
Object.keys(config.requirements).forEach((name) => {
|
|
146
|
+
if (name !== 'moc') {
|
|
147
|
+
console.log(chalk.red('Error: ') + `Unknown requirement "${name}"`);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
145
152
|
let toBackendDep = (dep) => {
|
|
146
153
|
return {
|
|
147
154
|
...dep,
|
|
@@ -149,6 +156,9 @@ export async function publish(options = {}) {
|
|
|
149
156
|
repo: dep.repo || '',
|
|
150
157
|
};
|
|
151
158
|
};
|
|
159
|
+
let toBackendReq = ([name, value]) => {
|
|
160
|
+
return { name, value };
|
|
161
|
+
};
|
|
152
162
|
// map fields
|
|
153
163
|
let backendPkgConfig = {
|
|
154
164
|
name: config.package.name,
|
|
@@ -167,6 +177,7 @@ export async function publish(options = {}) {
|
|
|
167
177
|
dependencies: Object.values(config.dependencies || {}).map(toBackendDep),
|
|
168
178
|
devDependencies: Object.values(config['dev-dependencies'] || {}).map(toBackendDep),
|
|
169
179
|
scripts: [],
|
|
180
|
+
requirements: [Object.entries(config.requirements || {}).map((req) => toBackendReq(req))],
|
|
170
181
|
};
|
|
171
182
|
let defaultFiles = [
|
|
172
183
|
'mops.toml',
|
|
@@ -355,25 +366,3 @@ async function fetchGitHubReleaseNotes(repo, version) {
|
|
|
355
366
|
}
|
|
356
367
|
return release.body;
|
|
357
368
|
}
|
|
358
|
-
function findChangelogEntry(changelog, version) {
|
|
359
|
-
let tree = fromMarkdown(changelog);
|
|
360
|
-
let found = false;
|
|
361
|
-
let nodes = [];
|
|
362
|
-
for (let node of tree.children) {
|
|
363
|
-
if (found) {
|
|
364
|
-
if (node.type === 'heading') {
|
|
365
|
-
break;
|
|
366
|
-
}
|
|
367
|
-
else {
|
|
368
|
-
nodes.push(node);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
else if (node.type === 'heading' && toMarkdown(node).match(new RegExp(`\\b${version}\\b`))) {
|
|
372
|
-
found = true;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
return toMarkdown({
|
|
376
|
-
type: 'root',
|
|
377
|
-
children: nodes,
|
|
378
|
-
});
|
|
379
|
-
}
|
|
File without changes
|
package/dist/commands/remove.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/commands/search.js
CHANGED
|
File without changes
|
package/dist/commands/self.js
CHANGED
|
@@ -39,7 +39,7 @@ export async function update() {
|
|
|
39
39
|
console.log('Updating to version: ' + chalk.green(latest));
|
|
40
40
|
let pm = detectPackageManager();
|
|
41
41
|
let npmArgs = pm === 'npm' ? ['--no-fund', '--silent'] : [];
|
|
42
|
-
let proc = child_process.spawn(pm, ['add', '-g', ...npmArgs, `${url}/versions/${latest}
|
|
42
|
+
let proc = child_process.spawn(pm, ['add', '-g', ...npmArgs, `${url}/versions/${latest}.tgz`], { stdio: 'inherit', detached: false });
|
|
43
43
|
proc.on('exit', (res) => {
|
|
44
44
|
if (res !== 0) {
|
|
45
45
|
console.log(chalk.red('Failed to update.'));
|
|
File without changes
|
package/dist/commands/sources.js
CHANGED
|
File without changes
|
package/dist/commands/sync.d.ts
CHANGED
|
File without changes
|
package/dist/commands/sync.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -4,6 +4,7 @@ import chalk from 'chalk';
|
|
|
4
4
|
import prompts from 'prompts';
|
|
5
5
|
import camelCase from 'camelcase';
|
|
6
6
|
import { getRootDir, readConfig } from '../mops.js';
|
|
7
|
+
import { copyTemplateFileSync } from '../templates.js';
|
|
7
8
|
export async function template(templateName, options = {}) {
|
|
8
9
|
if (!templateName) {
|
|
9
10
|
let res = await prompts({
|
|
@@ -30,9 +31,8 @@ export async function template(templateName, options = {}) {
|
|
|
30
31
|
console.log(chalk.yellow('Workflow already exists:'), path.relative(getRootDir(), dest));
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
|
-
let mopsTestYml = new URL('../templates/mops-test.yml', import.meta.url);
|
|
34
34
|
fs.mkdirSync(path.resolve(getRootDir(), '.github/workflows'), { recursive: true });
|
|
35
|
-
|
|
35
|
+
copyTemplateFileSync('mops-test.yml', dest);
|
|
36
36
|
console.log(chalk.green('Created'), path.relative(getRootDir(), dest));
|
|
37
37
|
}
|
|
38
38
|
else if (templateName === 'github-workflow:mops-publish') {
|
|
@@ -41,9 +41,8 @@ export async function template(templateName, options = {}) {
|
|
|
41
41
|
console.log(chalk.yellow('Workflow already exists:'), path.relative(getRootDir(), dest));
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
|
-
let mopsPublishYml = new URL('../templates/mops-publish.yml', import.meta.url);
|
|
45
44
|
fs.mkdirSync(path.resolve(getRootDir(), '.github/workflows'), { recursive: true });
|
|
46
|
-
|
|
45
|
+
copyTemplateFileSync('mops-publish.yml', dest);
|
|
47
46
|
console.log(chalk.green('Created'), path.relative(getRootDir(), dest));
|
|
48
47
|
}
|
|
49
48
|
else if (templateName?.startsWith('license:')) {
|
|
@@ -61,13 +60,13 @@ export async function template(templateName, options = {}) {
|
|
|
61
60
|
fs.writeFileSync(file, license);
|
|
62
61
|
};
|
|
63
62
|
if (templateName === 'license:MIT') {
|
|
64
|
-
|
|
63
|
+
copyTemplateFileSync('licenses/MIT', path.resolve(getRootDir(), 'LICENSE'));
|
|
65
64
|
setYearAndOwner(path.resolve(getRootDir(), 'LICENSE'));
|
|
66
65
|
console.log(chalk.green('Created'), path.relative(getRootDir(), 'LICENSE'));
|
|
67
66
|
}
|
|
68
67
|
else if (templateName === 'license:Apache-2.0') {
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
copyTemplateFileSync('licenses/Apache-2.0', path.resolve(getRootDir(), 'LICENSE'));
|
|
69
|
+
copyTemplateFileSync('licenses/Apache-2.0-NOTICE', path.resolve(getRootDir(), 'NOTICE'));
|
|
71
70
|
setYearAndOwner(path.resolve(getRootDir(), 'NOTICE'));
|
|
72
71
|
console.log(chalk.green('Created'), path.relative(getRootDir(), 'LICENSE'));
|
|
73
72
|
console.log(chalk.green('Created'), path.relative(getRootDir(), 'NOTICE'));
|
|
@@ -75,12 +74,12 @@ export async function template(templateName, options = {}) {
|
|
|
75
74
|
}
|
|
76
75
|
else if (templateName === 'lib.mo') {
|
|
77
76
|
fs.mkdirSync(path.join(getRootDir(), 'src'), { recursive: true });
|
|
78
|
-
|
|
77
|
+
copyTemplateFileSync('src/lib.mo', path.resolve(getRootDir(), 'src/lib.mo'));
|
|
79
78
|
console.log(chalk.green('Created'), path.relative(getRootDir(), 'src/lib.mo'));
|
|
80
79
|
}
|
|
81
80
|
else if (templateName === 'lib.test.mo') {
|
|
82
81
|
fs.mkdirSync(path.join(getRootDir(), 'test'), { recursive: true });
|
|
83
|
-
|
|
82
|
+
copyTemplateFileSync('test/lib.test.mo', path.resolve(getRootDir(), 'test/lib.test.mo'));
|
|
84
83
|
console.log(chalk.green('Created'), path.relative(getRootDir(), 'test/lib.test.mo'));
|
|
85
84
|
}
|
|
86
85
|
else if (templateName === 'readme') {
|
|
@@ -89,7 +88,7 @@ export async function template(templateName, options = {}) {
|
|
|
89
88
|
console.log(chalk.yellow('README.md already exists'));
|
|
90
89
|
return;
|
|
91
90
|
}
|
|
92
|
-
|
|
91
|
+
copyTemplateFileSync('README.md', dest);
|
|
93
92
|
let config = readConfig();
|
|
94
93
|
let data = fs.readFileSync(dest).toString();
|
|
95
94
|
data = data.replace(/<year>/g, new Date().getFullYear().toString());
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -6,6 +6,7 @@ import chalk from 'chalk';
|
|
|
6
6
|
import prompts from 'prompts';
|
|
7
7
|
import { createLogUpdate } from 'log-update';
|
|
8
8
|
import { checkConfigFile, getClosestConfigFile, getRootDir, globalCacheDir, readConfig, writeConfig } from '../../mops.js';
|
|
9
|
+
import { checkRequirements } from '../../check-requirements.js';
|
|
9
10
|
import * as moc from './moc.js';
|
|
10
11
|
import * as pocketIc from './pocket-ic.js';
|
|
11
12
|
import * as wasmtime from './wasmtime.js';
|
|
@@ -204,6 +205,7 @@ async function use(tool, version) {
|
|
|
204
205
|
let oldVersion = config.toolchain[tool];
|
|
205
206
|
config.toolchain[tool] = version;
|
|
206
207
|
writeConfig(config);
|
|
208
|
+
await checkRequirements();
|
|
207
209
|
if (oldVersion === version) {
|
|
208
210
|
console.log((`${tool} ${version} is already installed`));
|
|
209
211
|
}
|
|
@@ -230,6 +232,9 @@ async function update(tool) {
|
|
|
230
232
|
let oldVersion = config.toolchain[tool];
|
|
231
233
|
config.toolchain[tool] = version;
|
|
232
234
|
writeConfig(config);
|
|
235
|
+
if (tool === 'moc') {
|
|
236
|
+
await checkRequirements();
|
|
237
|
+
}
|
|
233
238
|
if (oldVersion === version) {
|
|
234
239
|
console.log((`Latest ${tool} ${version} is already installed`));
|
|
235
240
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/commands/update.js
CHANGED
|
File without changes
|
package/dist/commands/user.d.ts
CHANGED
|
File without changes
|
package/dist/commands/user.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/commands/whoami.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -26,4 +26,4 @@ export interface anon_class_10_1 {
|
|
|
26
26
|
}
|
|
27
27
|
export interface _SERVICE extends anon_class_10_1 {}
|
|
28
28
|
export declare const idlFactory: IDL.InterfaceFactory;
|
|
29
|
-
export declare const init: (
|
|
29
|
+
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|
|
File without changes
|
|
File without changes
|
|
@@ -10,8 +10,7 @@ export { idlFactory } from "./bench.did.js";
|
|
|
10
10
|
* beginning in dfx 0.15.0
|
|
11
11
|
*/
|
|
12
12
|
export const canisterId =
|
|
13
|
-
process.env.CANISTER_ID_BENCH
|
|
14
|
-
process.env.BENCH_CANISTER_ID;
|
|
13
|
+
process.env.CANISTER_ID_BENCH;
|
|
15
14
|
|
|
16
15
|
export const createActor = (canisterId, options = {}) => {
|
|
17
16
|
const agent = options.agent || new HttpAgent({ ...options.agentOptions });
|
|
File without changes
|
|
@@ -10,8 +10,7 @@ export { idlFactory } from "./main.did.js";
|
|
|
10
10
|
* beginning in dfx 0.15.0
|
|
11
11
|
*/
|
|
12
12
|
export const canisterId =
|
|
13
|
-
process.env.CANISTER_ID_MAIN
|
|
14
|
-
process.env.MAIN_CANISTER_ID;
|
|
13
|
+
process.env.CANISTER_ID_MAIN;
|
|
15
14
|
|
|
16
15
|
export const createActor = (canisterId, options = {}) => {
|
|
17
16
|
const agent = options.agent || new HttpAgent({ ...options.agentOptions });
|
|
@@ -132,6 +132,11 @@ type Response =
|
|
|
132
132
|
streaming_strategy: opt StreamingStrategy;
|
|
133
133
|
upgrade: opt bool;
|
|
134
134
|
};
|
|
135
|
+
type Requirement =
|
|
136
|
+
record {
|
|
137
|
+
name: text;
|
|
138
|
+
value: text;
|
|
139
|
+
};
|
|
135
140
|
type Request =
|
|
136
141
|
record {
|
|
137
142
|
body: blob;
|
|
@@ -145,7 +150,7 @@ type PageCount = nat;
|
|
|
145
150
|
type PackageVersion = text;
|
|
146
151
|
type PackageSummary__1 =
|
|
147
152
|
record {
|
|
148
|
-
config:
|
|
153
|
+
config: PackageConfigV3;
|
|
149
154
|
downloadsInLast30Days: nat;
|
|
150
155
|
downloadsInLast7Days: nat;
|
|
151
156
|
downloadsTotal: nat;
|
|
@@ -157,7 +162,7 @@ type PackageSummary__1 =
|
|
|
157
162
|
type PackageSummaryWithChanges__1 =
|
|
158
163
|
record {
|
|
159
164
|
changes: PackageChanges;
|
|
160
|
-
config:
|
|
165
|
+
config: PackageConfigV3;
|
|
161
166
|
downloadsInLast30Days: nat;
|
|
162
167
|
downloadsInLast7Days: nat;
|
|
163
168
|
downloadsTotal: nat;
|
|
@@ -169,7 +174,7 @@ type PackageSummaryWithChanges__1 =
|
|
|
169
174
|
type PackageSummaryWithChanges =
|
|
170
175
|
record {
|
|
171
176
|
changes: PackageChanges;
|
|
172
|
-
config:
|
|
177
|
+
config: PackageConfigV3;
|
|
173
178
|
downloadsInLast30Days: nat;
|
|
174
179
|
downloadsInLast7Days: nat;
|
|
175
180
|
downloadsTotal: nat;
|
|
@@ -180,7 +185,7 @@ type PackageSummaryWithChanges =
|
|
|
180
185
|
};
|
|
181
186
|
type PackageSummary =
|
|
182
187
|
record {
|
|
183
|
-
config:
|
|
188
|
+
config: PackageConfigV3;
|
|
184
189
|
downloadsInLast30Days: nat;
|
|
185
190
|
downloadsInLast7Days: nat;
|
|
186
191
|
downloadsTotal: nat;
|
|
@@ -218,7 +223,7 @@ type PackageDetails =
|
|
|
218
223
|
record {
|
|
219
224
|
benchmarks: Benchmarks__1;
|
|
220
225
|
changes: PackageChanges;
|
|
221
|
-
config:
|
|
226
|
+
config: PackageConfigV3;
|
|
222
227
|
dependents: vec PackageSummary__1;
|
|
223
228
|
deps: vec PackageSummary__1;
|
|
224
229
|
devDeps: vec PackageSummary__1;
|
|
@@ -234,7 +239,7 @@ type PackageDetails =
|
|
|
234
239
|
testStats: TestStats__1;
|
|
235
240
|
versionHistory: vec PackageSummaryWithChanges__1;
|
|
236
241
|
};
|
|
237
|
-
type
|
|
242
|
+
type PackageConfigV3_Publishing =
|
|
238
243
|
record {
|
|
239
244
|
baseDir: text;
|
|
240
245
|
dependencies: vec DependencyV2;
|
|
@@ -250,10 +255,11 @@ type PackageConfigV2__1 =
|
|
|
250
255
|
name: PackageName__1;
|
|
251
256
|
readme: text;
|
|
252
257
|
repository: text;
|
|
258
|
+
requirements: opt vec Requirement;
|
|
253
259
|
scripts: vec Script;
|
|
254
260
|
version: text;
|
|
255
261
|
};
|
|
256
|
-
type
|
|
262
|
+
type PackageConfigV3 =
|
|
257
263
|
record {
|
|
258
264
|
baseDir: text;
|
|
259
265
|
dependencies: vec DependencyV2;
|
|
@@ -269,6 +275,7 @@ type PackageConfigV2 =
|
|
|
269
275
|
name: PackageName__1;
|
|
270
276
|
readme: text;
|
|
271
277
|
repository: text;
|
|
278
|
+
requirements: vec Requirement;
|
|
272
279
|
scripts: vec Script;
|
|
273
280
|
version: text;
|
|
274
281
|
};
|
|
@@ -341,7 +348,7 @@ type Main =
|
|
|
341
348
|
search: (Text, opt nat, opt nat) -> (vec PackageSummary, PageCount) query;
|
|
342
349
|
setUserProp: (text, text) -> (Result_1);
|
|
343
350
|
startFileUpload: (PublishingId, Text, nat, blob) -> (Result_3);
|
|
344
|
-
startPublish: (
|
|
351
|
+
startPublish: (PackageConfigV3_Publishing) -> (Result_2);
|
|
345
352
|
transferOwnership: (PackageName, principal) -> (Result_1);
|
|
346
353
|
transformRequest: (HttpTransformArg) -> (HttpResponse) query;
|
|
347
354
|
uploadBenchmarks: (PublishingId, Benchmarks) -> (Result);
|
|
@@ -117,7 +117,7 @@ export interface Main {
|
|
|
117
117
|
[PublishingId, Text, bigint, Uint8Array | number[]],
|
|
118
118
|
Result_3
|
|
119
119
|
>,
|
|
120
|
-
'startPublish' : ActorMethod<[
|
|
120
|
+
'startPublish' : ActorMethod<[PackageConfigV3_Publishing], Result_2>,
|
|
121
121
|
'transferOwnership' : ActorMethod<[PackageName, Principal], Result_1>,
|
|
122
122
|
'transformRequest' : ActorMethod<[HttpTransformArg], HttpResponse>,
|
|
123
123
|
'uploadBenchmarks' : ActorMethod<[PublishingId, Benchmarks], Result>,
|
|
@@ -136,7 +136,7 @@ export interface PackageChanges {
|
|
|
136
136
|
'notes' : string,
|
|
137
137
|
'devDeps' : Array<DepChange>,
|
|
138
138
|
}
|
|
139
|
-
export interface
|
|
139
|
+
export interface PackageConfigV3 {
|
|
140
140
|
'dfx' : string,
|
|
141
141
|
'moc' : string,
|
|
142
142
|
'scripts' : Array<Script>,
|
|
@@ -151,10 +151,11 @@ export interface PackageConfigV2 {
|
|
|
151
151
|
'devDependencies' : Array<DependencyV2>,
|
|
152
152
|
'repository' : string,
|
|
153
153
|
'dependencies' : Array<DependencyV2>,
|
|
154
|
+
'requirements' : Array<Requirement>,
|
|
154
155
|
'license' : string,
|
|
155
156
|
'readme' : string,
|
|
156
157
|
}
|
|
157
|
-
export interface
|
|
158
|
+
export interface PackageConfigV3_Publishing {
|
|
158
159
|
'dfx' : string,
|
|
159
160
|
'moc' : string,
|
|
160
161
|
'scripts' : Array<Script>,
|
|
@@ -169,6 +170,7 @@ export interface PackageConfigV2__1 {
|
|
|
169
170
|
'devDependencies' : Array<DependencyV2>,
|
|
170
171
|
'repository' : string,
|
|
171
172
|
'dependencies' : Array<DependencyV2>,
|
|
173
|
+
'requirements' : [] | [Array<Requirement>],
|
|
172
174
|
'license' : string,
|
|
173
175
|
'readme' : string,
|
|
174
176
|
}
|
|
@@ -187,7 +189,7 @@ export interface PackageDetails {
|
|
|
187
189
|
'dependents' : Array<PackageSummary__1>,
|
|
188
190
|
'devDeps' : Array<PackageSummary__1>,
|
|
189
191
|
'downloadsInLast7Days' : bigint,
|
|
190
|
-
'config' :
|
|
192
|
+
'config' : PackageConfigV3,
|
|
191
193
|
'changes' : PackageChanges,
|
|
192
194
|
'publication' : PackagePublication,
|
|
193
195
|
}
|
|
@@ -220,7 +222,7 @@ export interface PackageSummary {
|
|
|
220
222
|
'downloadsTotal' : bigint,
|
|
221
223
|
'downloadsInLast30Days' : bigint,
|
|
222
224
|
'downloadsInLast7Days' : bigint,
|
|
223
|
-
'config' :
|
|
225
|
+
'config' : PackageConfigV3,
|
|
224
226
|
'publication' : PackagePublication,
|
|
225
227
|
}
|
|
226
228
|
export interface PackageSummaryWithChanges {
|
|
@@ -230,7 +232,7 @@ export interface PackageSummaryWithChanges {
|
|
|
230
232
|
'downloadsTotal' : bigint,
|
|
231
233
|
'downloadsInLast30Days' : bigint,
|
|
232
234
|
'downloadsInLast7Days' : bigint,
|
|
233
|
-
'config' :
|
|
235
|
+
'config' : PackageConfigV3,
|
|
234
236
|
'changes' : PackageChanges,
|
|
235
237
|
'publication' : PackagePublication,
|
|
236
238
|
}
|
|
@@ -241,7 +243,7 @@ export interface PackageSummaryWithChanges__1 {
|
|
|
241
243
|
'downloadsTotal' : bigint,
|
|
242
244
|
'downloadsInLast30Days' : bigint,
|
|
243
245
|
'downloadsInLast7Days' : bigint,
|
|
244
|
-
'config' :
|
|
246
|
+
'config' : PackageConfigV3,
|
|
245
247
|
'changes' : PackageChanges,
|
|
246
248
|
'publication' : PackagePublication,
|
|
247
249
|
}
|
|
@@ -252,7 +254,7 @@ export interface PackageSummary__1 {
|
|
|
252
254
|
'downloadsTotal' : bigint,
|
|
253
255
|
'downloadsInLast30Days' : bigint,
|
|
254
256
|
'downloadsInLast7Days' : bigint,
|
|
255
|
-
'config' :
|
|
257
|
+
'config' : PackageConfigV3,
|
|
256
258
|
'publication' : PackagePublication,
|
|
257
259
|
}
|
|
258
260
|
export type PackageVersion = string;
|
|
@@ -265,6 +267,7 @@ export interface Request {
|
|
|
265
267
|
'headers' : Array<Header>,
|
|
266
268
|
'certificate_version' : [] | [number],
|
|
267
269
|
}
|
|
270
|
+
export interface Requirement { 'value' : string, 'name' : string }
|
|
268
271
|
export interface Response {
|
|
269
272
|
'body' : Uint8Array | number[],
|
|
270
273
|
'headers' : Array<Header>,
|
|
@@ -349,4 +352,4 @@ export interface User__1 {
|
|
|
349
352
|
}
|
|
350
353
|
export interface _SERVICE extends Main {}
|
|
351
354
|
export declare const idlFactory: IDL.InterfaceFactory;
|
|
352
|
-
export declare const init: (
|
|
355
|
+
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|
|
@@ -62,7 +62,8 @@ export const idlFactory = ({ IDL }) => {
|
|
|
62
62
|
'repo' : IDL.Text,
|
|
63
63
|
'version' : IDL.Text,
|
|
64
64
|
});
|
|
65
|
-
const
|
|
65
|
+
const Requirement = IDL.Record({ 'value' : IDL.Text, 'name' : IDL.Text });
|
|
66
|
+
const PackageConfigV3 = IDL.Record({
|
|
66
67
|
'dfx' : IDL.Text,
|
|
67
68
|
'moc' : IDL.Text,
|
|
68
69
|
'scripts' : IDL.Vec(Script),
|
|
@@ -77,6 +78,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
77
78
|
'devDependencies' : IDL.Vec(DependencyV2),
|
|
78
79
|
'repository' : IDL.Text,
|
|
79
80
|
'dependencies' : IDL.Vec(DependencyV2),
|
|
81
|
+
'requirements' : IDL.Vec(Requirement),
|
|
80
82
|
'license' : IDL.Text,
|
|
81
83
|
'readme' : IDL.Text,
|
|
82
84
|
});
|
|
@@ -92,7 +94,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
92
94
|
'downloadsTotal' : IDL.Nat,
|
|
93
95
|
'downloadsInLast30Days' : IDL.Nat,
|
|
94
96
|
'downloadsInLast7Days' : IDL.Nat,
|
|
95
|
-
'config' :
|
|
97
|
+
'config' : PackageConfigV3,
|
|
96
98
|
'publication' : PackagePublication,
|
|
97
99
|
});
|
|
98
100
|
const BenchmarkMetric = IDL.Text;
|
|
@@ -118,7 +120,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
118
120
|
'downloadsTotal' : IDL.Nat,
|
|
119
121
|
'downloadsInLast30Days' : IDL.Nat,
|
|
120
122
|
'downloadsInLast7Days' : IDL.Nat,
|
|
121
|
-
'config' :
|
|
123
|
+
'config' : PackageConfigV3,
|
|
122
124
|
'publication' : PackagePublication,
|
|
123
125
|
});
|
|
124
126
|
const TestStats__1 = IDL.Record({
|
|
@@ -158,7 +160,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
158
160
|
'downloadsTotal' : IDL.Nat,
|
|
159
161
|
'downloadsInLast30Days' : IDL.Nat,
|
|
160
162
|
'downloadsInLast7Days' : IDL.Nat,
|
|
161
|
-
'config' :
|
|
163
|
+
'config' : PackageConfigV3,
|
|
162
164
|
'changes' : PackageChanges,
|
|
163
165
|
'publication' : PackagePublication,
|
|
164
166
|
});
|
|
@@ -177,7 +179,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
177
179
|
'dependents' : IDL.Vec(PackageSummary__1),
|
|
178
180
|
'devDeps' : IDL.Vec(PackageSummary__1),
|
|
179
181
|
'downloadsInLast7Days' : IDL.Nat,
|
|
180
|
-
'config' :
|
|
182
|
+
'config' : PackageConfigV3,
|
|
181
183
|
'changes' : PackageChanges,
|
|
182
184
|
'publication' : PackagePublication,
|
|
183
185
|
});
|
|
@@ -189,7 +191,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
189
191
|
'downloadsTotal' : IDL.Nat,
|
|
190
192
|
'downloadsInLast30Days' : IDL.Nat,
|
|
191
193
|
'downloadsInLast7Days' : IDL.Nat,
|
|
192
|
-
'config' :
|
|
194
|
+
'config' : PackageConfigV3,
|
|
193
195
|
'changes' : PackageChanges,
|
|
194
196
|
'publication' : PackagePublication,
|
|
195
197
|
});
|
|
@@ -245,7 +247,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
245
247
|
const PageCount = IDL.Nat;
|
|
246
248
|
const Result_1 = IDL.Variant({ 'ok' : IDL.Null, 'err' : IDL.Text });
|
|
247
249
|
const Result_3 = IDL.Variant({ 'ok' : FileId, 'err' : Err });
|
|
248
|
-
const
|
|
250
|
+
const PackageConfigV3_Publishing = IDL.Record({
|
|
249
251
|
'dfx' : IDL.Text,
|
|
250
252
|
'moc' : IDL.Text,
|
|
251
253
|
'scripts' : IDL.Vec(Script),
|
|
@@ -260,6 +262,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
260
262
|
'devDependencies' : IDL.Vec(DependencyV2),
|
|
261
263
|
'repository' : IDL.Text,
|
|
262
264
|
'dependencies' : IDL.Vec(DependencyV2),
|
|
265
|
+
'requirements' : IDL.Opt(IDL.Vec(Requirement)),
|
|
263
266
|
'license' : IDL.Text,
|
|
264
267
|
'readme' : IDL.Text,
|
|
265
268
|
});
|
|
@@ -379,7 +382,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
379
382
|
[Result_3],
|
|
380
383
|
[],
|
|
381
384
|
),
|
|
382
|
-
'startPublish' : IDL.Func([
|
|
385
|
+
'startPublish' : IDL.Func([PackageConfigV3_Publishing], [Result_2], []),
|
|
383
386
|
'transferOwnership' : IDL.Func(
|
|
384
387
|
[PackageName, IDL.Principal],
|
|
385
388
|
[Result_1],
|
|
File without changes
|
|
File without changes
|