@mnci/cli 4.12.1 → 4.12.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.
- package/dist/cli.js +6 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2331,6 +2331,7 @@ const VERSION_TAG = /<Version>([^<]*)<\\/Version>/
|
|
|
2331
2331
|
*/
|
|
2332
2332
|
function findCsproj (tree, root) {
|
|
2333
2333
|
const name = tree.children(root).find((entry) => entry.endsWith('.csproj'))
|
|
2334
|
+
|
|
2334
2335
|
return name ? posix.join(root, name) : null
|
|
2335
2336
|
}
|
|
2336
2337
|
|
|
@@ -3815,6 +3816,9 @@ var VSCODE_SIDECAR_TARGETS = {
|
|
|
3815
3816
|
"darwin-x64": "darwin-amd64",
|
|
3816
3817
|
"darwin-arm64": "darwin-arm64"
|
|
3817
3818
|
};
|
|
3819
|
+
function scriptObjectLiteral(map) {
|
|
3820
|
+
return `{ ${Object.entries(map).map(([key, value]) => `'${key}': '${value}'`).join(", ")} }`;
|
|
3821
|
+
}
|
|
3818
3822
|
var VSCODE_EXTENSION_SCRIPT = String.raw`#!/usr/bin/env node
|
|
3819
3823
|
// Written by mnci: 'mnci add vscode-extension' creates it and 'mnci upgrade'
|
|
3820
3824
|
// rewrites it, so local edits do not survive an upgrade.
|
|
@@ -3830,7 +3834,7 @@ const { spawnSync } = require('node:child_process')
|
|
|
3830
3834
|
const { cpSync, existsSync, mkdirSync, readFileSync, rmSync } = require('node:fs')
|
|
3831
3835
|
const { basename, dirname, join, resolve } = require('node:path')
|
|
3832
3836
|
|
|
3833
|
-
const TARGETS = ${
|
|
3837
|
+
const TARGETS = ${scriptObjectLiteral(VSCODE_SIDECAR_TARGETS)}
|
|
3834
3838
|
const DROP = resolve('dist/drop')
|
|
3835
3839
|
const VSCE_FLAGS = ['--no-dependencies', '--skip-license', '--allow-missing-repository']
|
|
3836
3840
|
|
|
@@ -3908,7 +3912,7 @@ const manifest = JSON.parse(readFileSync(join(projectRoot, 'package.json'), 'utf
|
|
|
3908
3912
|
const project = basename(resolve(projectRoot))
|
|
3909
3913
|
// nx release --dry-run hands the publish target --dryRun=true and sets NX_DRY_RUN
|
|
3910
3914
|
// (measured on Nx 23), so a dry run never reaches the Marketplace, token or not.
|
|
3911
|
-
const dryRun = rest.some(argument => /^--dry-?run(
|
|
3915
|
+
const dryRun = rest.some(argument => /^--dry-?run(?:=true)?$/i.test(argument)) || process.env.NX_DRY_RUN === 'true'
|
|
3912
3916
|
if (command === 'package') packageExtension(projectRoot, manifest, sidecar)
|
|
3913
3917
|
else if (command === 'publish') publishExtension(manifest, sidecar, dryRun)
|
|
3914
3918
|
else fail('Unknown command ' + command + ' - expected package or publish.')
|