@mintlify/cli 4.0.1573 → 4.0.1575
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/bin/cli.js +8 -3
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/bin/vendor/converter.js +2 -2
- package/package.json +7 -7
- package/src/cli.tsx +6 -0
package/bin/cli.js
CHANGED
|
@@ -122,6 +122,11 @@ export const cli = ({ packageName = 'mint' }) => {
|
|
|
122
122
|
type: 'array',
|
|
123
123
|
description: 'Mock user groups for local development and testing',
|
|
124
124
|
example: '--groups admin user',
|
|
125
|
+
})
|
|
126
|
+
.option('signed-in', {
|
|
127
|
+
type: 'boolean',
|
|
128
|
+
default: false,
|
|
129
|
+
description: 'Mock a signed-in user with no groups for local development and testing',
|
|
125
130
|
})
|
|
126
131
|
.option('disable-openapi', {
|
|
127
132
|
type: 'boolean',
|
|
@@ -136,7 +141,7 @@ export const cli = ({ packageName = 'mint' }) => {
|
|
|
136
141
|
.usage('usage: mintlify dev [options]')
|
|
137
142
|
.example('mintlify dev', 'run with default settings (opens in browser)')
|
|
138
143
|
.example('mintlify dev --no-open', 'run without opening in browser'), (argv) => __awaiter(void 0, void 0, void 0, function* () {
|
|
139
|
-
var _a;
|
|
144
|
+
var _a, _b;
|
|
140
145
|
yield autoUpgradeIfNeeded();
|
|
141
146
|
const port = yield checkPort(argv);
|
|
142
147
|
const { cli: cliVersion } = getVersions(packageName);
|
|
@@ -148,9 +153,9 @@ export const cli = ({ packageName = 'mint' }) => {
|
|
|
148
153
|
subdomain =
|
|
149
154
|
configuredSubdomain !== null && configuredSubdomain !== void 0 ? configuredSubdomain : (accessToken ? (yield getCliSubdomains(accessToken))[0] : undefined);
|
|
150
155
|
}
|
|
151
|
-
catch (
|
|
156
|
+
catch (_c) { }
|
|
152
157
|
if (port != undefined) {
|
|
153
|
-
yield dev(Object.assign(Object.assign({}, argv), { port,
|
|
158
|
+
yield dev(Object.assign(Object.assign({}, argv), { groups: (_b = argv.groups) !== null && _b !== void 0 ? _b : (argv.signedIn ? [] : undefined), port,
|
|
154
159
|
packageName,
|
|
155
160
|
cliVersion,
|
|
156
161
|
accessToken,
|