@osdk/cli 0.26.0-beta.6 → 0.26.0-beta.8
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 +12 -0
- package/build/esm/{acorn-LQZJTRX7.js → acorn-RXMSUCXL.js} +33 -33
- package/build/esm/acorn-RXMSUCXL.js.map +1 -0
- package/build/esm/{angular-VWUX447C.js → angular-ZXAN5BMN.js} +11 -11
- package/build/esm/angular-ZXAN5BMN.js.map +1 -0
- package/build/esm/{babel-7BWEVLBS.js → babel-TI7T67T2.js} +67 -67
- package/build/esm/babel-TI7T67T2.js.map +1 -0
- package/build/esm/{chunk-SAOPV5FF.js → chunk-2U36M44D.js} +3 -3
- package/build/esm/chunk-2U36M44D.js.map +1 -0
- package/build/esm/{chunk-LR3YBME3.js → chunk-KJFA7LBI.js} +10 -10
- package/build/esm/chunk-KJFA7LBI.js.map +1 -0
- package/build/esm/{chunk-KHVWTBWA.js → chunk-M2BWWO6L.js} +8 -8
- package/build/esm/chunk-M2BWWO6L.js.map +1 -0
- package/build/esm/{chunk-GVZBRYRL.js → chunk-ML7ZMS6G.js} +3 -3
- package/build/esm/chunk-ML7ZMS6G.js.map +1 -0
- package/build/esm/{chunk-KXNCVDQG.js → chunk-MU54JM45.js} +11 -11
- package/build/esm/chunk-MU54JM45.js.map +1 -0
- package/build/esm/{chunk-HCWMXOMI.js → chunk-N3LXG6II.js} +5 -4
- package/build/esm/chunk-N3LXG6II.js.map +1 -0
- package/build/esm/{chunk-TYCMYZ74.js → chunk-OFL7F425.js} +31 -21
- package/build/esm/chunk-OFL7F425.js.map +1 -0
- package/build/esm/{chunk-PXU2ECCD.js → chunk-P5HXJTVE.js} +23 -16
- package/build/esm/chunk-P5HXJTVE.js.map +1 -0
- package/build/esm/{chunk-DMUWBIYY.js → chunk-VHOQB2JW.js} +4 -4
- package/build/esm/chunk-VHOQB2JW.js.map +1 -0
- package/build/esm/{estree-PI6JMQNR.js → estree-CSIG7D6Y.js} +102 -102
- package/build/esm/estree-CSIG7D6Y.js.map +1 -0
- package/build/esm/find-up-EKHQCTZM.js +4 -0
- package/build/esm/{find-up-QYNPYSRQ.js.map → find-up-EKHQCTZM.js.map} +1 -1
- package/build/esm/{flow-AP4DEOL5.js → flow-NUNWZLRW.js} +17 -17
- package/build/esm/flow-NUNWZLRW.js.map +1 -0
- package/build/esm/{glimmer-LM2ZFC5U.js → glimmer-GYUSOBQY.js} +53 -53
- package/build/esm/glimmer-GYUSOBQY.js.map +1 -0
- package/build/esm/{graphql-U5CPDQKQ.js → graphql-OALHBC5M.js} +21 -21
- package/build/esm/graphql-OALHBC5M.js.map +1 -0
- package/build/esm/{handleGenerate-KB4B5KME.js → handleGenerate-3SPVQBRK.js} +345 -316
- package/build/esm/handleGenerate-3SPVQBRK.js.map +1 -0
- package/build/esm/{html-FNGHE355.js → html-4RLNYFM4.js} +37 -37
- package/build/esm/html-4RLNYFM4.js.map +1 -0
- package/build/esm/index.js +23 -23
- package/build/esm/index.js.map +1 -1
- package/build/esm/loginFlow-ETZCNKG3.js +4 -0
- package/build/esm/{loginFlow-ESPJDVBX.js.map → loginFlow-ETZCNKG3.js.map} +1 -1
- package/build/esm/{markdown-HUHOYR5Q.js → markdown-MRACSGE5.js} +48 -48
- package/build/esm/markdown-MRACSGE5.js.map +1 -0
- package/build/esm/{meriyah-WP7UQXC7.js → meriyah-LVMHXIGF.js} +37 -37
- package/build/esm/meriyah-LVMHXIGF.js.map +1 -0
- package/build/esm/{postcss-JMNG34CL.js → postcss-A2ITI5N4.js} +78 -78
- package/build/esm/postcss-A2ITI5N4.js.map +1 -0
- package/build/esm/{siteDeployCommand-FKDPDR4P.js → siteDeployCommand-Y5UMKNDE.js} +12 -12
- package/build/esm/siteDeployCommand-Y5UMKNDE.js.map +1 -0
- package/build/esm/{typescript-A4QI3FB6.js → typescript-BMNHHGAA.js} +667 -667
- package/build/esm/typescript-BMNHHGAA.js.map +1 -0
- package/build/esm/{versionDeleteCommand-YDDZMNZR.js → versionDeleteCommand-V3ERNBUY.js} +9 -8
- package/build/esm/versionDeleteCommand-V3ERNBUY.js.map +1 -0
- package/build/esm/{versionDeleteCommand-3WAXOD3K.js → versionDeleteCommand-VTDZ5DMG.js} +9 -8
- package/build/esm/versionDeleteCommand-VTDZ5DMG.js.map +1 -0
- package/build/esm/{versionGetCommand-D5UKJRW7.js → versionGetCommand-5RGYFRW4.js} +6 -6
- package/build/esm/versionGetCommand-5RGYFRW4.js.map +1 -0
- package/build/esm/{versionInfoCommand-KAW7DOIN.js → versionInfoCommand-GUETKW4X.js} +6 -6
- package/build/esm/versionInfoCommand-GUETKW4X.js.map +1 -0
- package/build/esm/{versionListCommand-LI6TPANH.js → versionListCommand-BPI6W6H5.js} +6 -6
- package/build/esm/versionListCommand-BPI6W6H5.js.map +1 -0
- package/build/esm/{versionListCommand-VYQCZPIZ.js → versionListCommand-ETUCNREL.js} +6 -6
- package/build/esm/versionListCommand-ETUCNREL.js.map +1 -0
- package/build/esm/{versionSetCommand-MR343G7W.js → versionSetCommand-5JMRDYUM.js} +6 -6
- package/build/esm/versionSetCommand-5JMRDYUM.js.map +1 -0
- package/build/esm/{versionUnsetCommand-HDH44EUP.js → versionUnsetCommand-CL5VWZ6T.js} +9 -8
- package/build/esm/versionUnsetCommand-CL5VWZ6T.js.map +1 -0
- package/build/esm/{widgetSetDeployCommand-YVAIPCBY.js → widgetSetDeployCommand-KK2J3CM6.js} +10 -10
- package/build/esm/widgetSetDeployCommand-KK2J3CM6.js.map +1 -0
- package/build/esm/{yaml-IT3UOTAK.js → yaml-XQ236J4T.js} +49 -49
- package/build/esm/yaml-XQ236J4T.js.map +1 -0
- package/build/types/consola/handlePromptCancel.d.ts.map +1 -1
- package/build/types/net/createFetch.d.mts.map +1 -1
- package/package.json +8 -8
- package/build/esm/acorn-LQZJTRX7.js.map +0 -1
- package/build/esm/angular-VWUX447C.js.map +0 -1
- package/build/esm/babel-7BWEVLBS.js.map +0 -1
- package/build/esm/chunk-DMUWBIYY.js.map +0 -1
- package/build/esm/chunk-GVZBRYRL.js.map +0 -1
- package/build/esm/chunk-HCWMXOMI.js.map +0 -1
- package/build/esm/chunk-KHVWTBWA.js.map +0 -1
- package/build/esm/chunk-KXNCVDQG.js.map +0 -1
- package/build/esm/chunk-LR3YBME3.js.map +0 -1
- package/build/esm/chunk-PXU2ECCD.js.map +0 -1
- package/build/esm/chunk-SAOPV5FF.js.map +0 -1
- package/build/esm/chunk-TYCMYZ74.js.map +0 -1
- package/build/esm/estree-PI6JMQNR.js.map +0 -1
- package/build/esm/find-up-QYNPYSRQ.js +0 -4
- package/build/esm/flow-AP4DEOL5.js.map +0 -1
- package/build/esm/glimmer-LM2ZFC5U.js.map +0 -1
- package/build/esm/graphql-U5CPDQKQ.js.map +0 -1
- package/build/esm/handleGenerate-KB4B5KME.js.map +0 -1
- package/build/esm/html-FNGHE355.js.map +0 -1
- package/build/esm/loginFlow-ESPJDVBX.js +0 -4
- package/build/esm/markdown-HUHOYR5Q.js.map +0 -1
- package/build/esm/meriyah-WP7UQXC7.js.map +0 -1
- package/build/esm/postcss-JMNG34CL.js.map +0 -1
- package/build/esm/siteDeployCommand-FKDPDR4P.js.map +0 -1
- package/build/esm/typescript-A4QI3FB6.js.map +0 -1
- package/build/esm/versionDeleteCommand-3WAXOD3K.js.map +0 -1
- package/build/esm/versionDeleteCommand-YDDZMNZR.js.map +0 -1
- package/build/esm/versionGetCommand-D5UKJRW7.js.map +0 -1
- package/build/esm/versionInfoCommand-KAW7DOIN.js.map +0 -1
- package/build/esm/versionListCommand-LI6TPANH.js.map +0 -1
- package/build/esm/versionListCommand-VYQCZPIZ.js.map +0 -1
- package/build/esm/versionSetCommand-MR343G7W.js.map +0 -1
- package/build/esm/versionUnsetCommand-HDH44EUP.js.map +0 -1
- package/build/esm/widgetSetDeployCommand-YVAIPCBY.js.map +0 -1
- package/build/esm/yaml-IT3UOTAK.js.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { createFetchHeaderMutator, createRetryingFetch, createFetchOrThrow, PalantirApiError } from './chunk-
|
|
2
|
-
import { YargsCheckError, ExitProcessError } from './chunk-
|
|
3
|
-
import { findUp } from './chunk-
|
|
4
|
-
import { invokeLoginFlow } from './chunk-
|
|
5
|
-
import { __commonJS, init_esm_shims, __export, __toESM } from './chunk-
|
|
6
|
-
import * as fs8 from 'fs';
|
|
7
|
-
import
|
|
1
|
+
import { createFetchHeaderMutator, createRetryingFetch, createFetchOrThrow, PalantirApiError } from './chunk-P5HXJTVE.js';
|
|
2
|
+
import { YargsCheckError, ExitProcessError } from './chunk-2U36M44D.js';
|
|
3
|
+
import { findUp } from './chunk-KJFA7LBI.js';
|
|
4
|
+
import { invokeLoginFlow } from './chunk-M2BWWO6L.js';
|
|
5
|
+
import { __commonJS, init_esm_shims, __export, __toESM } from './chunk-VHOQB2JW.js';
|
|
6
|
+
import * as fs8 from 'node:fs';
|
|
7
|
+
import * as path19 from 'node:path';
|
|
8
|
+
import path19__default from 'node:path';
|
|
8
9
|
import * as path9 from 'path';
|
|
9
10
|
import path9__default, { dirname } from 'path';
|
|
10
11
|
import { createRequire, builtinModules } from 'module';
|
|
@@ -14,9 +15,11 @@ import os from 'os';
|
|
|
14
15
|
import tty from 'tty';
|
|
15
16
|
import fs from 'fs/promises';
|
|
16
17
|
import assert2 from 'assert';
|
|
18
|
+
import fs6, { realpathSync, statSync, Stats } from 'fs';
|
|
17
19
|
import v8 from 'v8';
|
|
18
20
|
import { format, inspect } from 'util';
|
|
19
21
|
import consola$1, { consola } from 'consola';
|
|
22
|
+
import { fileURLToPath as fileURLToPath$1 } from 'node:url';
|
|
20
23
|
|
|
21
24
|
// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
22
25
|
var require_fast_deep_equal = __commonJS({
|
|
@@ -54,10 +57,10 @@ var require_fast_deep_equal = __commonJS({
|
|
|
54
57
|
// ../cli.cmd.typescript/build/esm/generate/handleGenerate.mjs
|
|
55
58
|
init_esm_shims();
|
|
56
59
|
|
|
57
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
60
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/index.js
|
|
58
61
|
init_esm_shims();
|
|
59
62
|
|
|
60
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
63
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
|
|
61
64
|
init_esm_shims();
|
|
62
65
|
|
|
63
66
|
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.3.0/node_modules/@osdk/shared.net.platformapi/build/esm/index.js
|
|
@@ -110,9 +113,9 @@ var UnknownError = class extends PalantirApiError2 {
|
|
|
110
113
|
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.3.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js
|
|
111
114
|
async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {
|
|
112
115
|
const path21 = origPath.replace(/\{([^}]+)\}/g, () => encodeURIComponent(args.shift()));
|
|
113
|
-
const body = flags & 1 ? args.shift() :
|
|
114
|
-
const queryArgs = flags & 2 ? args.shift() :
|
|
115
|
-
const headerArgs = flags & 4 ? args.shift() :
|
|
116
|
+
const body = flags & 1 ? args.shift() : undefined;
|
|
117
|
+
const queryArgs = flags & 2 ? args.shift() : undefined;
|
|
118
|
+
const headerArgs = flags & 4 ? args.shift() : undefined;
|
|
116
119
|
const method = ["GET", "POST", "PUT", "DELETE", "PATCH"][httpMethodNum];
|
|
117
120
|
return await apiFetch(client[symbolClientContext2] ?? client[symbolClientContext] ?? client, method, path21, body, queryArgs, headerArgs, contentType, responseContentType);
|
|
118
121
|
}
|
|
@@ -168,34 +171,34 @@ function parseUrl(baseUrl, endpointPath) {
|
|
|
168
171
|
return new URL(`api${endpointPath}`, baseUrl);
|
|
169
172
|
}
|
|
170
173
|
|
|
171
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
174
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
|
|
172
175
|
init_esm_shims();
|
|
173
176
|
|
|
174
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
177
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
|
|
175
178
|
init_esm_shims();
|
|
176
179
|
|
|
177
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
180
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/AttachmentPropertyV2.js
|
|
178
181
|
init_esm_shims();
|
|
179
182
|
|
|
180
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
183
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/LinkedObjectV2.js
|
|
181
184
|
init_esm_shims();
|
|
182
185
|
|
|
183
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
186
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
|
|
184
187
|
init_esm_shims();
|
|
185
188
|
|
|
186
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
189
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
|
|
187
190
|
init_esm_shims();
|
|
188
191
|
|
|
189
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
192
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
|
|
190
193
|
init_esm_shims();
|
|
191
194
|
|
|
192
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
195
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
|
|
193
196
|
init_esm_shims();
|
|
194
197
|
|
|
195
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
198
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectV2.js
|
|
196
199
|
init_esm_shims();
|
|
197
200
|
|
|
198
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
201
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyV2.js
|
|
199
202
|
var OntologyV2_exports = {};
|
|
200
203
|
__export(OntologyV2_exports, {
|
|
201
204
|
get: () => get,
|
|
@@ -216,16 +219,16 @@ function getFullMetadata($ctx, ...args) {
|
|
|
216
219
|
return foundryPlatformFetch($ctx, _getFullMetadata, ...args);
|
|
217
220
|
}
|
|
218
221
|
|
|
219
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
222
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
|
|
220
223
|
init_esm_shims();
|
|
221
224
|
|
|
222
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
225
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
|
|
223
226
|
init_esm_shims();
|
|
224
227
|
|
|
225
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
228
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
|
|
226
229
|
init_esm_shims();
|
|
227
230
|
|
|
228
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
231
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
|
|
229
232
|
init_esm_shims();
|
|
230
233
|
|
|
231
234
|
// ../generator/build/esm/index.js
|
|
@@ -265,7 +268,7 @@ var AbstractImportable = class {
|
|
|
265
268
|
}
|
|
266
269
|
getImportPathRelTo = (filePath) => {
|
|
267
270
|
if (this.importPath.startsWith(".")) {
|
|
268
|
-
const result =
|
|
271
|
+
const result = path19.relative(path19.dirname(filePath), this.importPath).split(path19.sep).join("/");
|
|
269
272
|
if (result.startsWith(".")) {
|
|
270
273
|
return result;
|
|
271
274
|
} else {
|
|
@@ -284,7 +287,7 @@ var EnhancedBase = class extends AbstractImportable {
|
|
|
284
287
|
};
|
|
285
288
|
function extractNamespace(fqApiName) {
|
|
286
289
|
const last = fqApiName.lastIndexOf(".");
|
|
287
|
-
if (last === -1) return [
|
|
290
|
+
if (last === -1) return [undefined, fqApiName];
|
|
288
291
|
return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];
|
|
289
292
|
}
|
|
290
293
|
|
|
@@ -328,7 +331,7 @@ init_esm_shims();
|
|
|
328
331
|
function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true, log) {
|
|
329
332
|
const sdkPropDefinition = objectPropertyTypeToSdkPropertyDefinition(input.dataType, log);
|
|
330
333
|
if (sdkPropDefinition == null) {
|
|
331
|
-
return
|
|
334
|
+
return undefined;
|
|
332
335
|
}
|
|
333
336
|
switch (input.dataType.type) {
|
|
334
337
|
case "integer":
|
|
@@ -369,12 +372,12 @@ function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true, log) {
|
|
|
369
372
|
case "cipherText":
|
|
370
373
|
case "vector": {
|
|
371
374
|
log?.info(`${JSON.stringify(input.dataType.type)} is not a supported dataType`);
|
|
372
|
-
return
|
|
375
|
+
return undefined;
|
|
373
376
|
}
|
|
374
377
|
default:
|
|
375
378
|
input.dataType;
|
|
376
379
|
log?.info(`${JSON.stringify(input.dataType)} is not a supported dataType`);
|
|
377
|
-
return
|
|
380
|
+
return undefined;
|
|
378
381
|
}
|
|
379
382
|
}
|
|
380
383
|
function objectPropertyTypeToSdkPropertyDefinition(propertyType, log) {
|
|
@@ -415,11 +418,11 @@ function objectPropertyTypeToSdkPropertyDefinition(propertyType, log) {
|
|
|
415
418
|
case "cipherText":
|
|
416
419
|
case "vector": {
|
|
417
420
|
log?.info(`${JSON.stringify(propertyType.type)} is not a supported propertyType`);
|
|
418
|
-
return
|
|
421
|
+
return undefined;
|
|
419
422
|
}
|
|
420
423
|
default: {
|
|
421
424
|
log?.info(`${JSON.stringify(propertyType)} is not a supported propertyType`);
|
|
422
|
-
return
|
|
425
|
+
return undefined;
|
|
423
426
|
}
|
|
424
427
|
}
|
|
425
428
|
}
|
|
@@ -596,7 +599,7 @@ function wirePropertyV2ToSdkPrimaryKeyTypeDefinition(input) {
|
|
|
596
599
|
|
|
597
600
|
// ../generator-converters/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.js
|
|
598
601
|
function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2, log) {
|
|
599
|
-
if (objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey] ===
|
|
602
|
+
if (objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey] === undefined) {
|
|
600
603
|
throw new Error(`Primary key ${objectTypeWithLink.objectType.primaryKey} not found in ${objectTypeWithLink.objectType.apiName}`);
|
|
601
604
|
}
|
|
602
605
|
if (objectTypeWithLink.implementsInterfaces2 == null && objectTypeWithLink.implementsInterfaces != null) {
|
|
@@ -619,7 +622,7 @@ function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2, l
|
|
|
619
622
|
implements: objectTypeWithLink.implementsInterfaces,
|
|
620
623
|
interfaceMap,
|
|
621
624
|
inverseInterfaceMap: Object.fromEntries(Object.entries(interfaceMap).map(([interfaceApiName, props]) => [interfaceApiName, invertProps(props)])),
|
|
622
|
-
icon: supportedIconTypes.includes(objectTypeWithLink.objectType.icon.type) ? objectTypeWithLink.objectType.icon :
|
|
625
|
+
icon: supportedIconTypes.includes(objectTypeWithLink.objectType.icon.type) ? objectTypeWithLink.objectType.icon : undefined,
|
|
623
626
|
titleProperty: objectTypeWithLink.objectType.titleProperty,
|
|
624
627
|
displayName: objectTypeWithLink.objectType.displayName,
|
|
625
628
|
pluralDisplayName: objectTypeWithLink.objectType.pluralDisplayName,
|
|
@@ -629,7 +632,7 @@ function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2, l
|
|
|
629
632
|
};
|
|
630
633
|
}
|
|
631
634
|
function invertProps(a) {
|
|
632
|
-
return a ? Object.fromEntries(Object.entries(a).map(([k, v]) => [v, k])) :
|
|
635
|
+
return a ? Object.fromEntries(Object.entries(a).map(([k, v]) => [v, k])) : undefined;
|
|
633
636
|
}
|
|
634
637
|
var supportedIconTypes = ["blueprint"];
|
|
635
638
|
|
|
@@ -727,6 +730,20 @@ function wireQueryDataTypeToQueryDataTypeDefinition(input) {
|
|
|
727
730
|
threeDimensionalAggregation: get3DQueryAggregationProps(input),
|
|
728
731
|
nullable: false
|
|
729
732
|
};
|
|
733
|
+
case "entrySet":
|
|
734
|
+
const keyType = wireQueryDataTypeToQueryDataTypeDefinition(input.keyType);
|
|
735
|
+
if (!validMapKeyTypes.includes(keyType.type)) {
|
|
736
|
+
throw new Error("Map types with a key type of " + keyType.type + " are not supported" + validMapKeyTypes.toString());
|
|
737
|
+
}
|
|
738
|
+
if (keyType.multiplicity === true) {
|
|
739
|
+
throw new Error("Map types cannot have keys as arrays");
|
|
740
|
+
}
|
|
741
|
+
return {
|
|
742
|
+
type: "map",
|
|
743
|
+
nullable: false,
|
|
744
|
+
keyType,
|
|
745
|
+
valueType: wireQueryDataTypeToQueryDataTypeDefinition(input.valueType)
|
|
746
|
+
};
|
|
730
747
|
case "null":
|
|
731
748
|
case "unsupported":
|
|
732
749
|
throw new Error(`Unable to process query because the server indicated an unsupported QueryDataType.type: ${input.type}. Please check that your query is using supported types.`);
|
|
@@ -771,6 +788,7 @@ function get3DQueryAggregationProps(input) {
|
|
|
771
788
|
function guardInvalidKeyTypes(key2) {
|
|
772
789
|
return key2.type === "string" || key2.type === "boolean";
|
|
773
790
|
}
|
|
791
|
+
var validMapKeyTypes = ["string", "object", "double", "float", "integer", "long", "date", "timestamp", "byte", "datetime", "decimal", "marking", "short", "objectType"];
|
|
774
792
|
|
|
775
793
|
// ../generator-converters/build/esm/wireQueryTypeV2ToSdkQueryMetadata.js
|
|
776
794
|
init_esm_shims();
|
|
@@ -794,7 +812,7 @@ function wireQueryParameterV2ToQueryParameterDefinition(parameter) {
|
|
|
794
812
|
// ../generator/build/esm/util/deleteUndefineds.js
|
|
795
813
|
init_esm_shims();
|
|
796
814
|
function deleteUndefineds(obj) {
|
|
797
|
-
return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !==
|
|
815
|
+
return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));
|
|
798
816
|
}
|
|
799
817
|
|
|
800
818
|
// ../generator/build/esm/GenerateContext/EnhancedInterfaceType.js
|
|
@@ -1086,7 +1104,7 @@ function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) {
|
|
|
1086
1104
|
if (!docType) {
|
|
1087
1105
|
throw new invalid_doc_error_default(doc2);
|
|
1088
1106
|
}
|
|
1089
|
-
if ((onEnter == null ?
|
|
1107
|
+
if ((onEnter == null ? undefined : onEnter(doc2)) === false) {
|
|
1090
1108
|
continue;
|
|
1091
1109
|
}
|
|
1092
1110
|
switch (docType) {
|
|
@@ -1261,7 +1279,7 @@ function label(label2, contents) {
|
|
|
1261
1279
|
} : contents;
|
|
1262
1280
|
}
|
|
1263
1281
|
var at = (isOptionalObject, object, index) => {
|
|
1264
|
-
if (isOptionalObject && (object ===
|
|
1282
|
+
if (isOptionalObject && (object === undefined || object === null)) {
|
|
1265
1283
|
return;
|
|
1266
1284
|
}
|
|
1267
1285
|
if (Array.isArray(object) || typeof object === "string") {
|
|
@@ -1271,7 +1289,7 @@ var at = (isOptionalObject, object, index) => {
|
|
|
1271
1289
|
};
|
|
1272
1290
|
var at_default = at;
|
|
1273
1291
|
var stringReplaceAll = (isOptionalObject, original, pattern, replacement) => {
|
|
1274
|
-
if (isOptionalObject && (original ===
|
|
1292
|
+
if (isOptionalObject && (original === undefined || original === null)) {
|
|
1275
1293
|
return;
|
|
1276
1294
|
}
|
|
1277
1295
|
if (original.replaceAll) {
|
|
@@ -1410,7 +1428,7 @@ function findInDoc(doc, fn, defaultValue) {
|
|
|
1410
1428
|
return false;
|
|
1411
1429
|
}
|
|
1412
1430
|
const maybeResult = fn(doc2);
|
|
1413
|
-
if (maybeResult !==
|
|
1431
|
+
if (maybeResult !== undefined) {
|
|
1414
1432
|
shouldSkipFurtherProcessing = true;
|
|
1415
1433
|
result = maybeResult;
|
|
1416
1434
|
}
|
|
@@ -2304,7 +2322,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2304
2322
|
};
|
|
2305
2323
|
var require_array = __commonJS2({ "node_modules/fast-glob/out/utils/array.js"(exports) {
|
|
2306
2324
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2307
|
-
exports.splitWhen = exports.flatten =
|
|
2325
|
+
exports.splitWhen = exports.flatten = undefined;
|
|
2308
2326
|
function flatten(items) {
|
|
2309
2327
|
return items.reduce((collection, item) => [].concat(collection, item), []);
|
|
2310
2328
|
}
|
|
@@ -2326,7 +2344,7 @@ var require_array = __commonJS2({ "node_modules/fast-glob/out/utils/array.js"(ex
|
|
|
2326
2344
|
} });
|
|
2327
2345
|
var require_errno = __commonJS2({ "node_modules/fast-glob/out/utils/errno.js"(exports) {
|
|
2328
2346
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2329
|
-
exports.isEnoentCodeError =
|
|
2347
|
+
exports.isEnoentCodeError = undefined;
|
|
2330
2348
|
function isEnoentCodeError(error) {
|
|
2331
2349
|
return error.code === "ENOENT";
|
|
2332
2350
|
}
|
|
@@ -2334,7 +2352,7 @@ var require_errno = __commonJS2({ "node_modules/fast-glob/out/utils/errno.js"(ex
|
|
|
2334
2352
|
} });
|
|
2335
2353
|
var require_fs = __commonJS2({ "node_modules/fast-glob/out/utils/fs.js"(exports) {
|
|
2336
2354
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2337
|
-
exports.createDirentFromStats =
|
|
2355
|
+
exports.createDirentFromStats = undefined;
|
|
2338
2356
|
var DirentFromStats = class {
|
|
2339
2357
|
constructor(name, stats) {
|
|
2340
2358
|
this.name = name;
|
|
@@ -2354,7 +2372,7 @@ var require_fs = __commonJS2({ "node_modules/fast-glob/out/utils/fs.js"(exports)
|
|
|
2354
2372
|
} });
|
|
2355
2373
|
var require_path = __commonJS2({ "node_modules/fast-glob/out/utils/path.js"(exports) {
|
|
2356
2374
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2357
|
-
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify =
|
|
2375
|
+
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = undefined;
|
|
2358
2376
|
var os2 = __require("os");
|
|
2359
2377
|
var path132 = __require("path");
|
|
2360
2378
|
var IS_WINDOWS_PLATFORM = os2.platform() === "win32";
|
|
@@ -2627,7 +2645,7 @@ var require_utils = __commonJS2({ "node_modules/braces/lib/utils.js"(exports) {
|
|
|
2627
2645
|
const flat = (arr) => {
|
|
2628
2646
|
for (let i2 = 0; i2 < arr.length; i2++) {
|
|
2629
2647
|
let ele = arr[i2];
|
|
2630
|
-
Array.isArray(ele) ? flat(ele) : ele !==
|
|
2648
|
+
Array.isArray(ele) ? flat(ele) : ele !== undefined && result.push(ele);
|
|
2631
2649
|
}
|
|
2632
2650
|
return result;
|
|
2633
2651
|
};
|
|
@@ -2678,7 +2696,7 @@ var require_to_regex_range = __commonJS2({ "node_modules/to-regex-range/index.js
|
|
|
2678
2696
|
if (isNumber(min) === false) {
|
|
2679
2697
|
throw new TypeError("toRegexRange: expected the first argument to be a number");
|
|
2680
2698
|
}
|
|
2681
|
-
if (max ===
|
|
2699
|
+
if (max === undefined || min === max) {
|
|
2682
2700
|
return String(min);
|
|
2683
2701
|
}
|
|
2684
2702
|
if (isNumber(max) === false) {
|
|
@@ -2736,9 +2754,9 @@ var require_to_regex_range = __commonJS2({ "node_modules/to-regex-range/index.js
|
|
|
2736
2754
|
return state.result;
|
|
2737
2755
|
};
|
|
2738
2756
|
function collatePatterns(neg, pos2, options8) {
|
|
2739
|
-
let onlyNegative = filterPatterns(neg, pos2, "-", false)
|
|
2740
|
-
let onlyPositive = filterPatterns(pos2, neg, "", false)
|
|
2741
|
-
let intersected = filterPatterns(neg, pos2, "-?", true)
|
|
2757
|
+
let onlyNegative = filterPatterns(neg, pos2, "-", false);
|
|
2758
|
+
let onlyPositive = filterPatterns(pos2, neg, "", false);
|
|
2759
|
+
let intersected = filterPatterns(neg, pos2, "-?", true);
|
|
2742
2760
|
let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
|
|
2743
2761
|
return subpatterns.join("|");
|
|
2744
2762
|
}
|
|
@@ -3140,7 +3158,7 @@ var require_expand = __commonJS2({ "node_modules/braces/lib/expand.js"(exports,
|
|
|
3140
3158
|
return utils2.flatten(result);
|
|
3141
3159
|
};
|
|
3142
3160
|
var expand = (ast, options8 = {}) => {
|
|
3143
|
-
let rangeLimit = options8.rangeLimit ===
|
|
3161
|
+
let rangeLimit = options8.rangeLimit === undefined ? 1e3 : options8.rangeLimit;
|
|
3144
3162
|
let walk = (node, parent = {}) => {
|
|
3145
3163
|
node.queue = [];
|
|
3146
3164
|
let p = parent;
|
|
@@ -4648,7 +4666,7 @@ var require_parse2 = __commonJS2({ "node_modules/picomatch/lib/parse.js"(exports
|
|
|
4648
4666
|
continue;
|
|
4649
4667
|
}
|
|
4650
4668
|
if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
|
|
4651
|
-
const end = rest[1] !==
|
|
4669
|
+
const end = rest[1] !== undefined ? "|$" : "";
|
|
4652
4670
|
state.output = state.output.slice(0, -(prior.output + prev.output).length);
|
|
4653
4671
|
prior.output = `(?:${prior.output}`;
|
|
4654
4672
|
prev.type = "globstar";
|
|
@@ -5061,7 +5079,7 @@ var require_micromatch = __commonJS2({ "node_modules/micromatch/index.js"(export
|
|
|
5061
5079
|
let regex = picomatch.makeRe(String(glob), { ...options8, capture: true });
|
|
5062
5080
|
let match = regex.exec(posix ? utils2.toPosixSlashes(input) : input);
|
|
5063
5081
|
if (match) {
|
|
5064
|
-
return match.slice(1).map((v) => v ===
|
|
5082
|
+
return match.slice(1).map((v) => v === undefined ? "" : v);
|
|
5065
5083
|
}
|
|
5066
5084
|
};
|
|
5067
5085
|
micromatch2.makeRe = (...args) => picomatch.makeRe(...args);
|
|
@@ -5090,7 +5108,7 @@ var require_micromatch = __commonJS2({ "node_modules/micromatch/index.js"(export
|
|
|
5090
5108
|
} });
|
|
5091
5109
|
var require_pattern = __commonJS2({ "node_modules/fast-glob/out/utils/pattern.js"(exports) {
|
|
5092
5110
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5093
|
-
exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern =
|
|
5111
|
+
exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = undefined;
|
|
5094
5112
|
var path132 = __require("path");
|
|
5095
5113
|
var globParent = require_glob_parent();
|
|
5096
5114
|
var micromatch2 = require_micromatch();
|
|
@@ -5347,7 +5365,7 @@ var require_merge2 = __commonJS2({ "node_modules/merge2/index.js"(exports, modul
|
|
|
5347
5365
|
} });
|
|
5348
5366
|
var require_stream = __commonJS2({ "node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
5349
5367
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5350
|
-
exports.merge =
|
|
5368
|
+
exports.merge = undefined;
|
|
5351
5369
|
var merge2 = require_merge2();
|
|
5352
5370
|
function merge3(streams) {
|
|
5353
5371
|
const mergedStream = merge2(streams);
|
|
@@ -5365,7 +5383,7 @@ var require_stream = __commonJS2({ "node_modules/fast-glob/out/utils/stream.js"(
|
|
|
5365
5383
|
} });
|
|
5366
5384
|
var require_string = __commonJS2({ "node_modules/fast-glob/out/utils/string.js"(exports) {
|
|
5367
5385
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5368
|
-
exports.isEmpty = exports.isString =
|
|
5386
|
+
exports.isEmpty = exports.isString = undefined;
|
|
5369
5387
|
function isString(input) {
|
|
5370
5388
|
return typeof input === "string";
|
|
5371
5389
|
}
|
|
@@ -5377,7 +5395,7 @@ var require_string = __commonJS2({ "node_modules/fast-glob/out/utils/string.js"(
|
|
|
5377
5395
|
} });
|
|
5378
5396
|
var require_utils3 = __commonJS2({ "node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
5379
5397
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5380
|
-
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array =
|
|
5398
|
+
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
|
|
5381
5399
|
var array2 = require_array();
|
|
5382
5400
|
exports.array = array2;
|
|
5383
5401
|
var errno = require_errno();
|
|
@@ -5395,7 +5413,7 @@ var require_utils3 = __commonJS2({ "node_modules/fast-glob/out/utils/index.js"(e
|
|
|
5395
5413
|
} });
|
|
5396
5414
|
var require_tasks = __commonJS2({ "node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
5397
5415
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5398
|
-
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate =
|
|
5416
|
+
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
|
|
5399
5417
|
var utils2 = require_utils3();
|
|
5400
5418
|
function generate(input, settings) {
|
|
5401
5419
|
const patterns = processPatterns(input, settings);
|
|
@@ -5480,7 +5498,7 @@ var require_tasks = __commonJS2({ "node_modules/fast-glob/out/managers/tasks.js"
|
|
|
5480
5498
|
} });
|
|
5481
5499
|
var require_async = __commonJS2({ "node_modules/@nodelib/fs.stat/out/providers/async.js"(exports) {
|
|
5482
5500
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5483
|
-
exports.read =
|
|
5501
|
+
exports.read = undefined;
|
|
5484
5502
|
function read3(path132, settings, callback) {
|
|
5485
5503
|
settings.fs.lstat(path132, (lstatError, lstat) => {
|
|
5486
5504
|
if (lstatError !== null) {
|
|
@@ -5517,7 +5535,7 @@ var require_async = __commonJS2({ "node_modules/@nodelib/fs.stat/out/providers/a
|
|
|
5517
5535
|
} });
|
|
5518
5536
|
var require_sync = __commonJS2({ "node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports) {
|
|
5519
5537
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5520
|
-
exports.read =
|
|
5538
|
+
exports.read = undefined;
|
|
5521
5539
|
function read3(path132, settings) {
|
|
5522
5540
|
const lstat = settings.fs.lstatSync(path132);
|
|
5523
5541
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
@@ -5540,11 +5558,11 @@ var require_sync = __commonJS2({ "node_modules/@nodelib/fs.stat/out/providers/sy
|
|
|
5540
5558
|
} });
|
|
5541
5559
|
var require_fs2 = __commonJS2({ "node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports) {
|
|
5542
5560
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5543
|
-
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER =
|
|
5561
|
+
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = undefined;
|
|
5544
5562
|
var fs72 = __require("fs");
|
|
5545
5563
|
exports.FILE_SYSTEM_ADAPTER = { lstat: fs72.lstat, stat: fs72.stat, lstatSync: fs72.lstatSync, statSync: fs72.statSync };
|
|
5546
5564
|
function createFileSystemAdapter(fsMethods) {
|
|
5547
|
-
if (fsMethods ===
|
|
5565
|
+
if (fsMethods === undefined) {
|
|
5548
5566
|
return exports.FILE_SYSTEM_ADAPTER;
|
|
5549
5567
|
}
|
|
5550
5568
|
return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
|
|
@@ -5563,14 +5581,14 @@ var require_settings = __commonJS2({ "node_modules/@nodelib/fs.stat/out/settings
|
|
|
5563
5581
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
5564
5582
|
}
|
|
5565
5583
|
_getValue(option, value) {
|
|
5566
|
-
return option !== null && option !==
|
|
5584
|
+
return option !== null && option !== undefined ? option : value;
|
|
5567
5585
|
}
|
|
5568
5586
|
};
|
|
5569
5587
|
exports.default = Settings;
|
|
5570
5588
|
} });
|
|
5571
5589
|
var require_out = __commonJS2({ "node_modules/@nodelib/fs.stat/out/index.js"(exports) {
|
|
5572
5590
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5573
|
-
exports.statSync = exports.stat = exports.Settings =
|
|
5591
|
+
exports.statSync = exports.stat = exports.Settings = undefined;
|
|
5574
5592
|
var async = require_async();
|
|
5575
5593
|
var sync = require_sync();
|
|
5576
5594
|
var settings_1 = require_settings();
|
|
@@ -5649,9 +5667,9 @@ var require_run_parallel = __commonJS2({ "node_modules/run-parallel/index.js"(ex
|
|
|
5649
5667
|
} });
|
|
5650
5668
|
var require_constants3 = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/constants.js"(exports) {
|
|
5651
5669
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5652
|
-
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES =
|
|
5670
|
+
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = undefined;
|
|
5653
5671
|
var NODE_PROCESS_VERSION_PARTS = process.versions.node.split(".");
|
|
5654
|
-
if (NODE_PROCESS_VERSION_PARTS[0] ===
|
|
5672
|
+
if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) {
|
|
5655
5673
|
throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
|
|
5656
5674
|
}
|
|
5657
5675
|
var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
|
|
@@ -5664,7 +5682,7 @@ var require_constants3 = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/con
|
|
|
5664
5682
|
} });
|
|
5665
5683
|
var require_fs3 = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports) {
|
|
5666
5684
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5667
|
-
exports.createDirentFromStats =
|
|
5685
|
+
exports.createDirentFromStats = undefined;
|
|
5668
5686
|
var DirentFromStats = class {
|
|
5669
5687
|
constructor(name, stats) {
|
|
5670
5688
|
this.name = name;
|
|
@@ -5684,13 +5702,13 @@ var require_fs3 = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/utils/fs.j
|
|
|
5684
5702
|
} });
|
|
5685
5703
|
var require_utils4 = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
5686
5704
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5687
|
-
exports.fs =
|
|
5705
|
+
exports.fs = undefined;
|
|
5688
5706
|
var fs72 = require_fs3();
|
|
5689
5707
|
exports.fs = fs72;
|
|
5690
5708
|
} });
|
|
5691
5709
|
var require_common = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports) {
|
|
5692
5710
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5693
|
-
exports.joinPathSegments =
|
|
5711
|
+
exports.joinPathSegments = undefined;
|
|
5694
5712
|
function joinPathSegments(a, b, separator) {
|
|
5695
5713
|
if (a.endsWith(separator)) {
|
|
5696
5714
|
return a + b;
|
|
@@ -5701,7 +5719,7 @@ var require_common = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/provide
|
|
|
5701
5719
|
} });
|
|
5702
5720
|
var require_async2 = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports) {
|
|
5703
5721
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5704
|
-
exports.readdir = exports.readdirWithFileTypes = exports.read =
|
|
5722
|
+
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
5705
5723
|
var fsStat = require_out();
|
|
5706
5724
|
var rpl = require_run_parallel();
|
|
5707
5725
|
var constants_1 = require_constants3();
|
|
@@ -5798,7 +5816,7 @@ var require_async2 = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/provide
|
|
|
5798
5816
|
} });
|
|
5799
5817
|
var require_sync2 = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports) {
|
|
5800
5818
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5801
|
-
exports.readdir = exports.readdirWithFileTypes = exports.read =
|
|
5819
|
+
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
5802
5820
|
var fsStat = require_out();
|
|
5803
5821
|
var constants_1 = require_constants3();
|
|
5804
5822
|
var utils2 = require_utils4();
|
|
@@ -5844,11 +5862,11 @@ var require_sync2 = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/provider
|
|
|
5844
5862
|
} });
|
|
5845
5863
|
var require_fs4 = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports) {
|
|
5846
5864
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5847
|
-
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER =
|
|
5865
|
+
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = undefined;
|
|
5848
5866
|
var fs72 = __require("fs");
|
|
5849
5867
|
exports.FILE_SYSTEM_ADAPTER = { lstat: fs72.lstat, stat: fs72.stat, lstatSync: fs72.lstatSync, statSync: fs72.statSync, readdir: fs72.readdir, readdirSync: fs72.readdirSync };
|
|
5850
5868
|
function createFileSystemAdapter(fsMethods) {
|
|
5851
|
-
if (fsMethods ===
|
|
5869
|
+
if (fsMethods === undefined) {
|
|
5852
5870
|
return exports.FILE_SYSTEM_ADAPTER;
|
|
5853
5871
|
}
|
|
5854
5872
|
return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
|
|
@@ -5871,14 +5889,14 @@ var require_settings2 = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/sett
|
|
|
5871
5889
|
this.fsStatSettings = new fsStat.Settings({ followSymbolicLink: this.followSymbolicLinks, fs: this.fs, throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink });
|
|
5872
5890
|
}
|
|
5873
5891
|
_getValue(option, value) {
|
|
5874
|
-
return option !== null && option !==
|
|
5892
|
+
return option !== null && option !== undefined ? option : value;
|
|
5875
5893
|
}
|
|
5876
5894
|
};
|
|
5877
5895
|
exports.default = Settings;
|
|
5878
5896
|
} });
|
|
5879
5897
|
var require_out2 = __commonJS2({ "node_modules/@nodelib/fs.scandir/out/index.js"(exports) {
|
|
5880
5898
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5881
|
-
exports.Settings = exports.scandirSync = exports.scandir =
|
|
5899
|
+
exports.Settings = exports.scandirSync = exports.scandir = undefined;
|
|
5882
5900
|
var async = require_async2();
|
|
5883
5901
|
var sync = require_sync2();
|
|
5884
5902
|
var settings_1 = require_settings2();
|
|
@@ -6146,7 +6164,7 @@ var require_queue = __commonJS2({ "node_modules/fastq/queue.js"(exports, module)
|
|
|
6146
6164
|
} });
|
|
6147
6165
|
var require_common2 = __commonJS2({ "node_modules/@nodelib/fs.walk/out/readers/common.js"(exports) {
|
|
6148
6166
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6149
|
-
exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError =
|
|
6167
|
+
exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = undefined;
|
|
6150
6168
|
function isFatalError(settings, error) {
|
|
6151
6169
|
if (settings.errorFilter === null) {
|
|
6152
6170
|
return true;
|
|
@@ -6245,13 +6263,13 @@ var require_async3 = __commonJS2({ "node_modules/@nodelib/fs.walk/out/readers/as
|
|
|
6245
6263
|
_worker(item, done) {
|
|
6246
6264
|
this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {
|
|
6247
6265
|
if (error !== null) {
|
|
6248
|
-
done(error,
|
|
6266
|
+
done(error, undefined);
|
|
6249
6267
|
return;
|
|
6250
6268
|
}
|
|
6251
6269
|
for (const entry of entries) {
|
|
6252
6270
|
this._handleEntry(entry, item.base);
|
|
6253
6271
|
}
|
|
6254
|
-
done(null,
|
|
6272
|
+
done(null, undefined);
|
|
6255
6273
|
});
|
|
6256
6274
|
}
|
|
6257
6275
|
_handleError(error) {
|
|
@@ -6267,14 +6285,14 @@ var require_async3 = __commonJS2({ "node_modules/@nodelib/fs.walk/out/readers/as
|
|
|
6267
6285
|
return;
|
|
6268
6286
|
}
|
|
6269
6287
|
const fullpath = entry.path;
|
|
6270
|
-
if (base !==
|
|
6288
|
+
if (base !== undefined) {
|
|
6271
6289
|
entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
|
|
6272
6290
|
}
|
|
6273
6291
|
if (common2.isAppliedFilter(this._settings.entryFilter, entry)) {
|
|
6274
6292
|
this._emitEntry(entry);
|
|
6275
6293
|
}
|
|
6276
6294
|
if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) {
|
|
6277
|
-
this._pushToQueue(fullpath, base ===
|
|
6295
|
+
this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);
|
|
6278
6296
|
}
|
|
6279
6297
|
}
|
|
6280
6298
|
_emitEntry(entry) {
|
|
@@ -6389,14 +6407,14 @@ var require_sync3 = __commonJS2({ "node_modules/@nodelib/fs.walk/out/readers/syn
|
|
|
6389
6407
|
}
|
|
6390
6408
|
_handleEntry(entry, base) {
|
|
6391
6409
|
const fullpath = entry.path;
|
|
6392
|
-
if (base !==
|
|
6410
|
+
if (base !== undefined) {
|
|
6393
6411
|
entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
|
|
6394
6412
|
}
|
|
6395
6413
|
if (common2.isAppliedFilter(this._settings.entryFilter, entry)) {
|
|
6396
6414
|
this._pushToStorage(entry);
|
|
6397
6415
|
}
|
|
6398
6416
|
if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) {
|
|
6399
|
-
this._pushToQueue(fullpath, base ===
|
|
6417
|
+
this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);
|
|
6400
6418
|
}
|
|
6401
6419
|
}
|
|
6402
6420
|
_pushToStorage(entry) {
|
|
@@ -6427,7 +6445,7 @@ var require_settings3 = __commonJS2({ "node_modules/@nodelib/fs.walk/out/setting
|
|
|
6427
6445
|
var Settings = class {
|
|
6428
6446
|
constructor(_options = {}) {
|
|
6429
6447
|
this._options = _options;
|
|
6430
|
-
this.basePath = this._getValue(this._options.basePath,
|
|
6448
|
+
this.basePath = this._getValue(this._options.basePath, undefined);
|
|
6431
6449
|
this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY);
|
|
6432
6450
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
6433
6451
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
@@ -6436,14 +6454,14 @@ var require_settings3 = __commonJS2({ "node_modules/@nodelib/fs.walk/out/setting
|
|
|
6436
6454
|
this.fsScandirSettings = new fsScandir.Settings({ followSymbolicLinks: this._options.followSymbolicLinks, fs: this._options.fs, pathSegmentSeparator: this._options.pathSegmentSeparator, stats: this._options.stats, throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink });
|
|
6437
6455
|
}
|
|
6438
6456
|
_getValue(option, value) {
|
|
6439
|
-
return option !== null && option !==
|
|
6457
|
+
return option !== null && option !== undefined ? option : value;
|
|
6440
6458
|
}
|
|
6441
6459
|
};
|
|
6442
6460
|
exports.default = Settings;
|
|
6443
6461
|
} });
|
|
6444
6462
|
var require_out3 = __commonJS2({ "node_modules/@nodelib/fs.walk/out/index.js"(exports) {
|
|
6445
6463
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6446
|
-
exports.Settings = exports.walkStream = exports.walkSync = exports.walk =
|
|
6464
|
+
exports.Settings = exports.walkStream = exports.walkSync = exports.walk = undefined;
|
|
6447
6465
|
var async_1 = require_async4();
|
|
6448
6466
|
var stream_1 = require_stream2();
|
|
6449
6467
|
var sync_1 = require_sync4();
|
|
@@ -6750,7 +6768,7 @@ var require_entry = __commonJS2({ "node_modules/fast-glob/out/providers/filters/
|
|
|
6750
6768
|
return this.index.has(filepath);
|
|
6751
6769
|
}
|
|
6752
6770
|
_createIndexRecord(filepath) {
|
|
6753
|
-
this.index.set(filepath,
|
|
6771
|
+
this.index.set(filepath, undefined);
|
|
6754
6772
|
}
|
|
6755
6773
|
_onlyFileFilter(entry) {
|
|
6756
6774
|
return this._settings.onlyFiles && !entry.dirent.isFile();
|
|
@@ -6968,7 +6986,7 @@ var require_sync6 = __commonJS2({ "node_modules/fast-glob/out/providers/sync.js"
|
|
|
6968
6986
|
} });
|
|
6969
6987
|
var require_settings4 = __commonJS2({ "node_modules/fast-glob/out/settings.js"(exports) {
|
|
6970
6988
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6971
|
-
exports.DEFAULT_FILE_SYSTEM_ADAPTER =
|
|
6989
|
+
exports.DEFAULT_FILE_SYSTEM_ADAPTER = undefined;
|
|
6972
6990
|
var fs72 = __require("fs");
|
|
6973
6991
|
var os2 = __require("os");
|
|
6974
6992
|
var CPU_COUNT = Math.max(os2.cpus().length, 1);
|
|
@@ -7006,7 +7024,7 @@ var require_settings4 = __commonJS2({ "node_modules/fast-glob/out/settings.js"(e
|
|
|
7006
7024
|
this.ignore = [].concat(this.ignore);
|
|
7007
7025
|
}
|
|
7008
7026
|
_getValue(option, value) {
|
|
7009
|
-
return option ===
|
|
7027
|
+
return option === undefined ? value : option;
|
|
7010
7028
|
}
|
|
7011
7029
|
_getFileSystemMethods(methods = {}) {
|
|
7012
7030
|
return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
|
|
@@ -7091,7 +7109,7 @@ var require_out4 = __commonJS2({ "node_modules/fast-glob/out/index.js"(exports,
|
|
|
7091
7109
|
}
|
|
7092
7110
|
win322.convertPathToPattern = convertPathToPattern2;
|
|
7093
7111
|
})(FastGlob2.win32 || (FastGlob2.win32 = {}));
|
|
7094
|
-
})(FastGlob
|
|
7112
|
+
})(FastGlob);
|
|
7095
7113
|
function getWorks(source2, _Provider, options8) {
|
|
7096
7114
|
const patterns = [].concat(source2);
|
|
7097
7115
|
const settings = new settings_1.default(options8);
|
|
@@ -7146,8 +7164,8 @@ var require_re = __commonJS2({ "node_modules/semver/internal/re.js"(exports, mod
|
|
|
7146
7164
|
debug(name, index, value);
|
|
7147
7165
|
t[name] = index;
|
|
7148
7166
|
src[index] = value;
|
|
7149
|
-
re[index] = new RegExp(value, isGlobal ? "g" :
|
|
7150
|
-
safeRe[index] = new RegExp(safe, isGlobal ? "g" :
|
|
7167
|
+
re[index] = new RegExp(value, isGlobal ? "g" : undefined);
|
|
7168
|
+
safeRe[index] = new RegExp(safe, isGlobal ? "g" : undefined);
|
|
7151
7169
|
};
|
|
7152
7170
|
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
7153
7171
|
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
@@ -7324,11 +7342,11 @@ var require_semver = __commonJS2({ "node_modules/semver/classes/semver.js"(expor
|
|
|
7324
7342
|
const a = this.prerelease[i2];
|
|
7325
7343
|
const b = other.prerelease[i2];
|
|
7326
7344
|
debug("prerelease compare", i2, a, b);
|
|
7327
|
-
if (a ===
|
|
7345
|
+
if (a === undefined && b === undefined) {
|
|
7328
7346
|
return 0;
|
|
7329
|
-
} else if (b ===
|
|
7347
|
+
} else if (b === undefined) {
|
|
7330
7348
|
return 1;
|
|
7331
|
-
} else if (a ===
|
|
7349
|
+
} else if (a === undefined) {
|
|
7332
7350
|
return -1;
|
|
7333
7351
|
} else if (a === b) {
|
|
7334
7352
|
continue;
|
|
@@ -7346,11 +7364,11 @@ var require_semver = __commonJS2({ "node_modules/semver/classes/semver.js"(expor
|
|
|
7346
7364
|
const a = this.build[i2];
|
|
7347
7365
|
const b = other.build[i2];
|
|
7348
7366
|
debug("prerelease compare", i2, a, b);
|
|
7349
|
-
if (a ===
|
|
7367
|
+
if (a === undefined && b === undefined) {
|
|
7350
7368
|
return 0;
|
|
7351
|
-
} else if (b ===
|
|
7369
|
+
} else if (b === undefined) {
|
|
7352
7370
|
return 1;
|
|
7353
|
-
} else if (a ===
|
|
7371
|
+
} else if (a === undefined) {
|
|
7354
7372
|
return -1;
|
|
7355
7373
|
} else if (a === b) {
|
|
7356
7374
|
continue;
|
|
@@ -7648,7 +7666,7 @@ var require_yallist = __commonJS2({ "node_modules/editorconfig/node_modules/yall
|
|
|
7648
7666
|
};
|
|
7649
7667
|
Yallist.prototype.pop = function() {
|
|
7650
7668
|
if (!this.tail) {
|
|
7651
|
-
return
|
|
7669
|
+
return undefined;
|
|
7652
7670
|
}
|
|
7653
7671
|
var res = this.tail.value;
|
|
7654
7672
|
this.tail = this.tail.prev;
|
|
@@ -7662,7 +7680,7 @@ var require_yallist = __commonJS2({ "node_modules/editorconfig/node_modules/yall
|
|
|
7662
7680
|
};
|
|
7663
7681
|
Yallist.prototype.shift = function() {
|
|
7664
7682
|
if (!this.head) {
|
|
7665
|
-
return
|
|
7683
|
+
return undefined;
|
|
7666
7684
|
}
|
|
7667
7685
|
var res = this.head.value;
|
|
7668
7686
|
this.head = this.head.next;
|
|
@@ -7983,7 +8001,7 @@ var require_lru_cache = __commonJS2({ "node_modules/editorconfig/node_modules/lr
|
|
|
7983
8001
|
if (isStale(self, hit)) {
|
|
7984
8002
|
del(self, node);
|
|
7985
8003
|
if (!self[ALLOW_STALE]) {
|
|
7986
|
-
hit =
|
|
8004
|
+
hit = undefined;
|
|
7987
8005
|
}
|
|
7988
8006
|
}
|
|
7989
8007
|
if (hit) {
|
|
@@ -8182,7 +8200,7 @@ var require_lru_cache = __commonJS2({ "node_modules/editorconfig/node_modules/lr
|
|
|
8182
8200
|
var hit = node.value;
|
|
8183
8201
|
if (isStale(self, hit)) {
|
|
8184
8202
|
del(self, node);
|
|
8185
|
-
if (!self[ALLOW_STALE]) hit =
|
|
8203
|
+
if (!self[ALLOW_STALE]) hit = undefined;
|
|
8186
8204
|
} else {
|
|
8187
8205
|
if (doUse) {
|
|
8188
8206
|
self[LRU_LIST].unshiftNode(node);
|
|
@@ -8922,7 +8940,7 @@ var require_ini = __commonJS2({ "node_modules/editorconfig/src/lib/ini.js"(expor
|
|
|
8922
8940
|
f = t = 0;
|
|
8923
8941
|
}
|
|
8924
8942
|
if (op[0] & 5) throw op[1];
|
|
8925
|
-
return { value: op[0] ? op[1] :
|
|
8943
|
+
return { value: op[0] ? op[1] : undefined, done: true };
|
|
8926
8944
|
}
|
|
8927
8945
|
};
|
|
8928
8946
|
var __importStar = exports && exports.__importStar || function(mod) {
|
|
@@ -8938,7 +8956,7 @@ var require_ini = __commonJS2({ "node_modules/editorconfig/src/lib/ini.js"(expor
|
|
|
8938
8956
|
var fs72 = __importStar(__require("fs"));
|
|
8939
8957
|
var regex = { section: /^\s*\[(([^#;]|\\#|\\;)+)\]\s*([#;].*)?$/, param: /^\s*([\w\.\-\_]+)\s*[=:]\s*(.*?)\s*([#;].*)?$/, comment: /^\s*[#;].*$/ };
|
|
8940
8958
|
function parse6(file) {
|
|
8941
|
-
return __awaiter(this,
|
|
8959
|
+
return __awaiter(this, undefined, undefined, function() {
|
|
8942
8960
|
return __generator(this, function(_a) {
|
|
8943
8961
|
return [2, new Promise(function(resolve3, reject) {
|
|
8944
8962
|
fs72.readFile(file, "utf8", function(err, data) {
|
|
@@ -9075,7 +9093,7 @@ var require_src = __commonJS2({ "node_modules/editorconfig/src/index.js"(exports
|
|
|
9075
9093
|
f = t = 0;
|
|
9076
9094
|
}
|
|
9077
9095
|
if (op[0] & 5) throw op[1];
|
|
9078
|
-
return { value: op[0] ? op[1] :
|
|
9096
|
+
return { value: op[0] ? op[1] : undefined, done: true };
|
|
9079
9097
|
}
|
|
9080
9098
|
};
|
|
9081
9099
|
var __importStar = exports && exports.__importStar || function(mod) {
|
|
@@ -9125,7 +9143,7 @@ var require_src = __commonJS2({ "node_modules/editorconfig/src/index.js"(exports
|
|
|
9125
9143
|
return matches;
|
|
9126
9144
|
}
|
|
9127
9145
|
function processOptions(options8, filepath) {
|
|
9128
|
-
if (options8 ===
|
|
9146
|
+
if (options8 === undefined) {
|
|
9129
9147
|
options8 = {};
|
|
9130
9148
|
}
|
|
9131
9149
|
return { config: options8.config || ".editorconfig", version: options8.version || package_json_1.default.version, root: path132.resolve(options8.root || path132.parse(filepath).root) };
|
|
@@ -9142,10 +9160,10 @@ var require_src = __commonJS2({ "node_modules/editorconfig/src/index.js"(exports
|
|
|
9142
9160
|
return path132.join(pathPrefix, glob);
|
|
9143
9161
|
}
|
|
9144
9162
|
function extendProps(props, options8) {
|
|
9145
|
-
if (props ===
|
|
9163
|
+
if (props === undefined) {
|
|
9146
9164
|
props = {};
|
|
9147
9165
|
}
|
|
9148
|
-
if (options8 ===
|
|
9166
|
+
if (options8 === undefined) {
|
|
9149
9167
|
options8 = {};
|
|
9150
9168
|
}
|
|
9151
9169
|
for (var key2 in options8) {
|
|
@@ -9201,7 +9219,7 @@ var require_src = __commonJS2({ "node_modules/editorconfig/src/index.js"(exports
|
|
|
9201
9219
|
return configs;
|
|
9202
9220
|
}
|
|
9203
9221
|
function readConfigFiles(filepaths) {
|
|
9204
|
-
return __awaiter(this,
|
|
9222
|
+
return __awaiter(this, undefined, undefined, function() {
|
|
9205
9223
|
return __generator(this, function(_a) {
|
|
9206
9224
|
return [2, Promise.all(filepaths.map(function(name) {
|
|
9207
9225
|
return new Promise(function(resolve3) {
|
|
@@ -9227,17 +9245,17 @@ var require_src = __commonJS2({ "node_modules/editorconfig/src/index.js"(exports
|
|
|
9227
9245
|
return files;
|
|
9228
9246
|
}
|
|
9229
9247
|
function opts(filepath, options8) {
|
|
9230
|
-
if (options8 ===
|
|
9248
|
+
if (options8 === undefined) {
|
|
9231
9249
|
options8 = {};
|
|
9232
9250
|
}
|
|
9233
9251
|
var resolvedFilePath = path132.resolve(filepath);
|
|
9234
9252
|
return [resolvedFilePath, processOptions(options8, resolvedFilePath)];
|
|
9235
9253
|
}
|
|
9236
9254
|
function parseFromFiles(filepath, files, options8) {
|
|
9237
|
-
if (options8 ===
|
|
9255
|
+
if (options8 === undefined) {
|
|
9238
9256
|
options8 = {};
|
|
9239
9257
|
}
|
|
9240
|
-
return __awaiter(this,
|
|
9258
|
+
return __awaiter(this, undefined, undefined, function() {
|
|
9241
9259
|
var _a, resolvedFilePath, processedOptions;
|
|
9242
9260
|
return __generator(this, function(_b) {
|
|
9243
9261
|
_a = opts(filepath, options8), resolvedFilePath = _a[0], processedOptions = _a[1];
|
|
@@ -9249,7 +9267,7 @@ var require_src = __commonJS2({ "node_modules/editorconfig/src/index.js"(exports
|
|
|
9249
9267
|
}
|
|
9250
9268
|
exports.parseFromFiles = parseFromFiles;
|
|
9251
9269
|
function parseFromFilesSync(filepath, files, options8) {
|
|
9252
|
-
if (options8 ===
|
|
9270
|
+
if (options8 === undefined) {
|
|
9253
9271
|
options8 = {};
|
|
9254
9272
|
}
|
|
9255
9273
|
var _a = opts(filepath, options8), resolvedFilePath = _a[0], processedOptions = _a[1];
|
|
@@ -9257,10 +9275,10 @@ var require_src = __commonJS2({ "node_modules/editorconfig/src/index.js"(exports
|
|
|
9257
9275
|
}
|
|
9258
9276
|
exports.parseFromFilesSync = parseFromFilesSync;
|
|
9259
9277
|
function parse6(_filepath, _options) {
|
|
9260
|
-
if (_options ===
|
|
9278
|
+
if (_options === undefined) {
|
|
9261
9279
|
_options = {};
|
|
9262
9280
|
}
|
|
9263
|
-
return __awaiter(this,
|
|
9281
|
+
return __awaiter(this, undefined, undefined, function() {
|
|
9264
9282
|
var _a, resolvedFilePath, processedOptions, filepaths;
|
|
9265
9283
|
return __generator(this, function(_b) {
|
|
9266
9284
|
_a = opts(_filepath, _options), resolvedFilePath = _a[0], processedOptions = _a[1];
|
|
@@ -9273,7 +9291,7 @@ var require_src = __commonJS2({ "node_modules/editorconfig/src/index.js"(exports
|
|
|
9273
9291
|
}
|
|
9274
9292
|
exports.parse = parse6;
|
|
9275
9293
|
function parseSync(_filepath, _options) {
|
|
9276
|
-
if (_options ===
|
|
9294
|
+
if (_options === undefined) {
|
|
9277
9295
|
_options = {};
|
|
9278
9296
|
}
|
|
9279
9297
|
var _a = opts(_filepath, _options), resolvedFilePath = _a[0], processedOptions = _a[1];
|
|
@@ -9442,7 +9460,7 @@ var require_parser = __commonJS2({ "node_modules/@iarna/toml/lib/parser.js"(expo
|
|
|
9442
9460
|
}
|
|
9443
9461
|
return(value) {
|
|
9444
9462
|
if (this.stack.length === 0) throw this.error(new ParserError("Stack underflow"));
|
|
9445
|
-
if (value ===
|
|
9463
|
+
if (value === undefined) value = this.state.buf;
|
|
9446
9464
|
this.state = this.stack.pop();
|
|
9447
9465
|
this.state.returned = value;
|
|
9448
9466
|
}
|
|
@@ -9642,7 +9660,7 @@ var require_toml_parser = __commonJS2({ "node_modules/@iarna/toml/lib/toml-parse
|
|
|
9642
9660
|
var _declared = Symbol("declared");
|
|
9643
9661
|
var hasOwnProperty3 = Object.prototype.hasOwnProperty;
|
|
9644
9662
|
var defineProperty = Object.defineProperty;
|
|
9645
|
-
var descriptor = { configurable: true, enumerable: true, writable: true, value:
|
|
9663
|
+
var descriptor = { configurable: true, enumerable: true, writable: true, value: undefined };
|
|
9646
9664
|
function hasKey(obj, key2) {
|
|
9647
9665
|
if (hasOwnProperty3.call(obj, key2)) return true;
|
|
9648
9666
|
if (key2 === "__proto__") defineProperty(obj, "__proto__", descriptor);
|
|
@@ -10894,7 +10912,7 @@ var require_js_tokens = __commonJS2({ "node_modules/js-tokens/index.js"(exports)
|
|
|
10894
10912
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10895
10913
|
exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
|
|
10896
10914
|
exports.matchToToken = function(match) {
|
|
10897
|
-
var token2 = { type: "invalid", value: match[0], closed:
|
|
10915
|
+
var token2 = { type: "invalid", value: match[0], closed: undefined };
|
|
10898
10916
|
if (match[1]) token2.type = "string", token2.closed = !!(match[3] || match[4]);
|
|
10899
10917
|
else if (match[5]) token2.type = "comment";
|
|
10900
10918
|
else if (match[6]) token2.type = "comment", token2.closed = !!match[7];
|
|
@@ -11798,7 +11816,7 @@ var require_color_convert = __commonJS2({ "node_modules/color-convert/index.js"(
|
|
|
11798
11816
|
var models = Object.keys(conversions);
|
|
11799
11817
|
function wrapRaw(fn) {
|
|
11800
11818
|
var wrappedFn = function(args) {
|
|
11801
|
-
if (args ===
|
|
11819
|
+
if (args === undefined || args === null) {
|
|
11802
11820
|
return args;
|
|
11803
11821
|
}
|
|
11804
11822
|
if (arguments.length > 1) {
|
|
@@ -11813,7 +11831,7 @@ var require_color_convert = __commonJS2({ "node_modules/color-convert/index.js"(
|
|
|
11813
11831
|
}
|
|
11814
11832
|
function wrapRounded(fn) {
|
|
11815
11833
|
var wrappedFn = function(args) {
|
|
11816
|
-
if (args ===
|
|
11834
|
+
if (args === undefined || args === null) {
|
|
11817
11835
|
return args;
|
|
11818
11836
|
}
|
|
11819
11837
|
if (arguments.length > 1) {
|
|
@@ -12153,7 +12171,7 @@ var require_chalk = __commonJS2({ "node_modules/@babel/code-frame/node_modules/c
|
|
|
12153
12171
|
function applyOptions2(obj, options8) {
|
|
12154
12172
|
options8 = options8 || {};
|
|
12155
12173
|
const scLevel = stdoutColor2 ? stdoutColor2.level : 0;
|
|
12156
|
-
obj.level = options8.level ===
|
|
12174
|
+
obj.level = options8.level === undefined ? scLevel : options8.level;
|
|
12157
12175
|
obj.enabled = "enabled" in options8 ? options8.enabled : obj.level > 0;
|
|
12158
12176
|
}
|
|
12159
12177
|
function Chalk(options8) {
|
|
@@ -12356,7 +12374,7 @@ var require_lib2 = __commonJS2({ "node_modules/@babel/highlight/lib/index.js"(ex
|
|
|
12356
12374
|
function shouldHighlight(options8) {
|
|
12357
12375
|
return _chalk.default.level > 0 || options8.forceColor;
|
|
12358
12376
|
}
|
|
12359
|
-
var chalkWithForcedColor =
|
|
12377
|
+
var chalkWithForcedColor = undefined;
|
|
12360
12378
|
function getChalk(forceColor) {
|
|
12361
12379
|
if (forceColor) {
|
|
12362
12380
|
var _chalkWithForcedColor;
|
|
@@ -12401,7 +12419,7 @@ var require_lib3 = __commonJS2({ "node_modules/@babel/code-frame/lib/index.js"(e
|
|
|
12401
12419
|
}
|
|
12402
12420
|
return n.default = e, t && t.set(e, n), n;
|
|
12403
12421
|
}
|
|
12404
|
-
var chalkWithForcedColor =
|
|
12422
|
+
var chalkWithForcedColor = undefined;
|
|
12405
12423
|
function getChalk(forceColor) {
|
|
12406
12424
|
if (forceColor) {
|
|
12407
12425
|
var _chalkWithForcedColor;
|
|
@@ -12901,7 +12919,7 @@ var require_readlines = __commonJS2({ "node_modules/n-readlines/readlines.js"(ex
|
|
|
12901
12919
|
line3 = buffer2.slice(lastNewLineBufferPosition, bufferPosition);
|
|
12902
12920
|
lines.push(line3);
|
|
12903
12921
|
lastNewLineBufferPosition = bufferPosition;
|
|
12904
|
-
} else if (bufferPositionValue ===
|
|
12922
|
+
} else if (bufferPositionValue === undefined) {
|
|
12905
12923
|
break;
|
|
12906
12924
|
}
|
|
12907
12925
|
}
|
|
@@ -12975,7 +12993,7 @@ var require_base = __commonJS2({ "node_modules/diff/lib/diff/base.js"(exports) {
|
|
|
12975
12993
|
/*istanbul ignore start*/
|
|
12976
12994
|
/*istanbul ignore end*/
|
|
12977
12995
|
diff: function diff(oldString, newString) {
|
|
12978
|
-
var options8 = arguments.length > 2 && arguments[2] !==
|
|
12996
|
+
var options8 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
12979
12997
|
var callback = options8.callback;
|
|
12980
12998
|
if (typeof options8 === "function") {
|
|
12981
12999
|
callback = options8;
|
|
@@ -12986,7 +13004,7 @@ var require_base = __commonJS2({ "node_modules/diff/lib/diff/base.js"(exports) {
|
|
|
12986
13004
|
function done(value) {
|
|
12987
13005
|
if (callback) {
|
|
12988
13006
|
setTimeout(function() {
|
|
12989
|
-
callback(
|
|
13007
|
+
callback(undefined, value);
|
|
12990
13008
|
}, 0);
|
|
12991
13009
|
return true;
|
|
12992
13010
|
} else {
|
|
@@ -13012,24 +13030,24 @@ var require_base = __commonJS2({ "node_modules/diff/lib/diff/base.js"(exports) {
|
|
|
13012
13030
|
for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
|
|
13013
13031
|
var basePath = (
|
|
13014
13032
|
/*istanbul ignore start*/
|
|
13015
|
-
|
|
13033
|
+
undefined
|
|
13016
13034
|
);
|
|
13017
13035
|
var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
|
|
13018
13036
|
if (addPath) {
|
|
13019
|
-
bestPath[diagonalPath - 1] =
|
|
13037
|
+
bestPath[diagonalPath - 1] = undefined;
|
|
13020
13038
|
}
|
|
13021
13039
|
var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
|
|
13022
13040
|
if (!canAdd && !canRemove) {
|
|
13023
|
-
bestPath[diagonalPath] =
|
|
13041
|
+
bestPath[diagonalPath] = undefined;
|
|
13024
13042
|
continue;
|
|
13025
13043
|
}
|
|
13026
13044
|
if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
|
|
13027
13045
|
basePath = clonePath(removePath);
|
|
13028
|
-
self.pushComponent(basePath.components,
|
|
13046
|
+
self.pushComponent(basePath.components, undefined, true);
|
|
13029
13047
|
} else {
|
|
13030
13048
|
basePath = addPath;
|
|
13031
13049
|
basePath.newPos++;
|
|
13032
|
-
self.pushComponent(basePath.components, true,
|
|
13050
|
+
self.pushComponent(basePath.components, true, undefined);
|
|
13033
13051
|
}
|
|
13034
13052
|
_oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath);
|
|
13035
13053
|
if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
|
|
@@ -13164,7 +13182,7 @@ var require_base = __commonJS2({ "node_modules/diff/lib/diff/base.js"(exports) {
|
|
|
13164
13182
|
var require_array2 = __commonJS2({ "node_modules/diff/lib/diff/array.js"(exports) {
|
|
13165
13183
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13166
13184
|
exports.diffArrays = diffArrays2;
|
|
13167
|
-
exports.arrayDiff =
|
|
13185
|
+
exports.arrayDiff = undefined;
|
|
13168
13186
|
var _base = _interopRequireDefault(require_base());
|
|
13169
13187
|
function _interopRequireDefault(obj) {
|
|
13170
13188
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
@@ -13377,7 +13395,7 @@ function translateLevel(level) {
|
|
|
13377
13395
|
}
|
|
13378
13396
|
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
13379
13397
|
const noFlagForceColor = envForceColor();
|
|
13380
|
-
if (noFlagForceColor !==
|
|
13398
|
+
if (noFlagForceColor !== undefined) {
|
|
13381
13399
|
flagForceColor = noFlagForceColor;
|
|
13382
13400
|
}
|
|
13383
13401
|
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
@@ -13395,7 +13413,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
13395
13413
|
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
13396
13414
|
return 1;
|
|
13397
13415
|
}
|
|
13398
|
-
if (haveStream && !streamIsTTY && forceColor ===
|
|
13416
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
13399
13417
|
return 0;
|
|
13400
13418
|
}
|
|
13401
13419
|
const min = forceColor || 0;
|
|
@@ -13494,7 +13512,7 @@ var applyOptions = (object, options8 = {}) => {
|
|
|
13494
13512
|
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
13495
13513
|
}
|
|
13496
13514
|
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
13497
|
-
object.level = options8.level ===
|
|
13515
|
+
object.level = options8.level === undefined ? colorLevel : options8.level;
|
|
13498
13516
|
};
|
|
13499
13517
|
var chalkFactory = (options8) => {
|
|
13500
13518
|
const chalk2 = (...strings) => strings.join(" ");
|
|
@@ -13560,7 +13578,7 @@ var proto = Object.defineProperties(() => {
|
|
|
13560
13578
|
var createStyler = (open, close, parent) => {
|
|
13561
13579
|
let openAll;
|
|
13562
13580
|
let closeAll;
|
|
13563
|
-
if (parent ===
|
|
13581
|
+
if (parent === undefined) {
|
|
13564
13582
|
openAll = open;
|
|
13565
13583
|
closeAll = close;
|
|
13566
13584
|
} else {
|
|
@@ -13582,12 +13600,12 @@ var applyStyle = (self, string) => {
|
|
|
13582
13600
|
return self[IS_EMPTY] ? "" : string;
|
|
13583
13601
|
}
|
|
13584
13602
|
let styler = self[STYLER];
|
|
13585
|
-
if (styler ===
|
|
13603
|
+
if (styler === undefined) {
|
|
13586
13604
|
return string;
|
|
13587
13605
|
}
|
|
13588
13606
|
const { openAll, closeAll } = styler;
|
|
13589
13607
|
if (string.includes("\x1B")) {
|
|
13590
|
-
while (styler !==
|
|
13608
|
+
while (styler !== undefined) {
|
|
13591
13609
|
string = stringReplaceAll2(string, styler.close, styler.open);
|
|
13592
13610
|
styler = styler.parent;
|
|
13593
13611
|
}
|
|
@@ -13719,7 +13737,7 @@ var Schema = class {
|
|
|
13719
13737
|
this.name = parameters.name;
|
|
13720
13738
|
}
|
|
13721
13739
|
default(_utils) {
|
|
13722
|
-
return
|
|
13740
|
+
return undefined;
|
|
13723
13741
|
}
|
|
13724
13742
|
// this is actually an abstract method but we need a placeholder to get `function.length`
|
|
13725
13743
|
/* c8 ignore start */
|
|
@@ -13737,10 +13755,10 @@ var Schema = class {
|
|
|
13737
13755
|
return false;
|
|
13738
13756
|
}
|
|
13739
13757
|
forward(_value, _utils) {
|
|
13740
|
-
return
|
|
13758
|
+
return undefined;
|
|
13741
13759
|
}
|
|
13742
13760
|
redirect(_value, _utils) {
|
|
13743
|
-
return
|
|
13761
|
+
return undefined;
|
|
13744
13762
|
}
|
|
13745
13763
|
overlap(currentValue, _newValue, _utils) {
|
|
13746
13764
|
return currentValue;
|
|
@@ -13915,14 +13933,14 @@ function normalizeInvalidHandler(invalidHandler) {
|
|
|
13915
13933
|
};
|
|
13916
13934
|
}
|
|
13917
13935
|
function normalizeDefaultResult(result) {
|
|
13918
|
-
return result ===
|
|
13936
|
+
return result === undefined ? {} : result;
|
|
13919
13937
|
}
|
|
13920
13938
|
function normalizeExpectedResult(result) {
|
|
13921
13939
|
if (typeof result === "string") {
|
|
13922
13940
|
return { text: result };
|
|
13923
13941
|
}
|
|
13924
13942
|
const { text, list: list2 } = result;
|
|
13925
|
-
assert((text || list2) !==
|
|
13943
|
+
assert((text || list2) !== undefined, "Unexpected `expected` result, there should be at least one field.");
|
|
13926
13944
|
if (!list2) {
|
|
13927
13945
|
return { text };
|
|
13928
13946
|
}
|
|
@@ -13938,7 +13956,7 @@ function normalizeTransferResult(result, value) {
|
|
|
13938
13956
|
return typeof result === "string" || "key" in result ? { from: value, to: result } : "from" in result ? { from: result.from, to: result.to } : { from: value, to: result.to };
|
|
13939
13957
|
}
|
|
13940
13958
|
function normalizeForwardResult(result, value) {
|
|
13941
|
-
return result ===
|
|
13959
|
+
return result === undefined ? [] : Array.isArray(result) ? result.map((transferResult) => normalizeTransferResult(transferResult, value)) : [normalizeTransferResult(result, value)];
|
|
13942
13960
|
}
|
|
13943
13961
|
function normalizeRedirectResult(result, value) {
|
|
13944
13962
|
const redirect = normalizeForwardResult(typeof result === "object" && "redirect" in result ? result.redirect : result, value);
|
|
@@ -13970,11 +13988,11 @@ var ChoiceSchema = class extends Schema {
|
|
|
13970
13988
|
}
|
|
13971
13989
|
forward(value) {
|
|
13972
13990
|
const choiceInfo = this._choices.get(value);
|
|
13973
|
-
return choiceInfo ? choiceInfo.forward :
|
|
13991
|
+
return choiceInfo ? choiceInfo.forward : undefined;
|
|
13974
13992
|
}
|
|
13975
13993
|
redirect(value) {
|
|
13976
13994
|
const choiceInfo = this._choices.get(value);
|
|
13977
|
-
return choiceInfo ? choiceInfo.redirect :
|
|
13995
|
+
return choiceInfo ? choiceInfo.redirect : undefined;
|
|
13978
13996
|
}
|
|
13979
13997
|
};
|
|
13980
13998
|
var NumberSchema = class extends Schema {
|
|
@@ -14209,7 +14227,7 @@ function partition2(array2, predicate) {
|
|
|
14209
14227
|
var partition_default = partition2;
|
|
14210
14228
|
var import_editorconfig = __toESM2(require_src());
|
|
14211
14229
|
async function isDirectory(directory, options8) {
|
|
14212
|
-
const allowSymlinks = (options8 == null ?
|
|
14230
|
+
const allowSymlinks = (options8 == null ? undefined : options8.allowSymlinks) ?? true;
|
|
14213
14231
|
let stats;
|
|
14214
14232
|
try {
|
|
14215
14233
|
stats = await (allowSymlinks ? fs.stat : fs.lstat)(toPath(directory));
|
|
@@ -14249,9 +14267,9 @@ var Searcher = class {
|
|
|
14249
14267
|
*/
|
|
14250
14268
|
constructor({ names, filter: filter2, stopDirectory }) {
|
|
14251
14269
|
__privateAdd(this, _searchInDirectory);
|
|
14252
|
-
__privateAdd(this, _names,
|
|
14253
|
-
__privateAdd(this, _filter,
|
|
14254
|
-
__privateAdd(this, _stopDirectory,
|
|
14270
|
+
__privateAdd(this, _names, undefined);
|
|
14271
|
+
__privateAdd(this, _filter, undefined);
|
|
14272
|
+
__privateAdd(this, _stopDirectory, undefined);
|
|
14255
14273
|
__privateAdd(this, _cache, /* @__PURE__ */ new Map());
|
|
14256
14274
|
__privateSet(this, _names, names);
|
|
14257
14275
|
__privateSet(this, _filter, filter2);
|
|
@@ -14304,10 +14322,10 @@ var searchOptions = { names: MARKERS, filter: ({ path: directory }) => is_direct
|
|
|
14304
14322
|
async function findProjectRoot(startDirectory, options8) {
|
|
14305
14323
|
searcher ?? (searcher = new searcher_default(searchOptions));
|
|
14306
14324
|
const mark = await searcher.search(startDirectory, options8);
|
|
14307
|
-
return mark ? path9.dirname(mark) :
|
|
14325
|
+
return mark ? path9.dirname(mark) : undefined;
|
|
14308
14326
|
}
|
|
14309
14327
|
function clearFindProjectRootCache() {
|
|
14310
|
-
searcher == null ?
|
|
14328
|
+
searcher == null ? undefined : searcher.clearCache();
|
|
14311
14329
|
}
|
|
14312
14330
|
function removeUnset(editorConfig) {
|
|
14313
14331
|
const result = {};
|
|
@@ -14340,7 +14358,7 @@ function editorConfigToPrettier(editorConfig) {
|
|
|
14340
14358
|
result.tabWidth = editorConfig.tab_width;
|
|
14341
14359
|
} else if (editorConfig.indent_style === "space" && editorConfig.indent_size && editorConfig.indent_size !== "tab") {
|
|
14342
14360
|
result.tabWidth = editorConfig.indent_size;
|
|
14343
|
-
} else if (editorConfig.tab_width !==
|
|
14361
|
+
} else if (editorConfig.tab_width !== undefined) {
|
|
14344
14362
|
result.tabWidth = editorConfig.tab_width;
|
|
14345
14363
|
}
|
|
14346
14364
|
if (editorConfig.max_line_length) {
|
|
@@ -14408,10 +14426,10 @@ getStdin.buffer = async () => {
|
|
|
14408
14426
|
function writeFormattedFile(file, data) {
|
|
14409
14427
|
return fs.writeFile(file, data);
|
|
14410
14428
|
}
|
|
14411
|
-
var mockable = { getPrettierConfigSearchStopDirectory: () =>
|
|
14429
|
+
var mockable = { getPrettierConfigSearchStopDirectory: () => undefined, getStdin, isCI: () => import_ci_info.isCI, writeFormattedFile };
|
|
14412
14430
|
var mockable_default = mockable;
|
|
14413
14431
|
async function isFile(file, options8) {
|
|
14414
|
-
const allowSymlinks = (options8 == null ?
|
|
14432
|
+
const allowSymlinks = (options8 == null ? undefined : options8.allowSymlinks) ?? true;
|
|
14415
14433
|
let stats;
|
|
14416
14434
|
try {
|
|
14417
14435
|
stats = await (allowSymlinks ? fs.stat : fs.lstat)(toPath(file));
|
|
@@ -16194,7 +16212,7 @@ function loadAll$1(input, iterator, options8) {
|
|
|
16194
16212
|
function load$1(input, options8) {
|
|
16195
16213
|
var documents = loadDocuments(input, options8);
|
|
16196
16214
|
if (documents.length === 0) {
|
|
16197
|
-
return
|
|
16215
|
+
return undefined;
|
|
16198
16216
|
} else if (documents.length === 1) {
|
|
16199
16217
|
return documents[0];
|
|
16200
16218
|
}
|
|
@@ -16235,9 +16253,9 @@ var parse2 = function parse3(text, reviver) {
|
|
|
16235
16253
|
pos = 0;
|
|
16236
16254
|
line2 = 1;
|
|
16237
16255
|
column = 0;
|
|
16238
|
-
token =
|
|
16239
|
-
key =
|
|
16240
|
-
root =
|
|
16256
|
+
token = undefined;
|
|
16257
|
+
key = undefined;
|
|
16258
|
+
root = undefined;
|
|
16241
16259
|
do {
|
|
16242
16260
|
token = lex();
|
|
16243
16261
|
parseStates[parseState]();
|
|
@@ -16254,7 +16272,7 @@ function internalize(holder, name, reviver) {
|
|
|
16254
16272
|
for (let i2 = 0; i2 < value.length; i2++) {
|
|
16255
16273
|
const key2 = String(i2);
|
|
16256
16274
|
const replacement = internalize(value, key2, reviver);
|
|
16257
|
-
if (replacement ===
|
|
16275
|
+
if (replacement === undefined) {
|
|
16258
16276
|
delete value[key2];
|
|
16259
16277
|
} else {
|
|
16260
16278
|
Object.defineProperty(value, key2, { value: replacement, writable: true, enumerable: true, configurable: true });
|
|
@@ -16263,7 +16281,7 @@ function internalize(holder, name, reviver) {
|
|
|
16263
16281
|
} else {
|
|
16264
16282
|
for (const key2 in value) {
|
|
16265
16283
|
const replacement = internalize(value, key2, reviver);
|
|
16266
|
-
if (replacement ===
|
|
16284
|
+
if (replacement === undefined) {
|
|
16267
16285
|
delete value[key2];
|
|
16268
16286
|
} else {
|
|
16269
16287
|
Object.defineProperty(value, key2, { value: replacement, writable: true, enumerable: true, configurable: true });
|
|
@@ -16329,7 +16347,7 @@ var lexStates = { default() {
|
|
|
16329
16347
|
read();
|
|
16330
16348
|
lexState = "comment";
|
|
16331
16349
|
return;
|
|
16332
|
-
case
|
|
16350
|
+
case undefined:
|
|
16333
16351
|
read();
|
|
16334
16352
|
return newToken("eof");
|
|
16335
16353
|
}
|
|
@@ -16356,7 +16374,7 @@ var lexStates = { default() {
|
|
|
16356
16374
|
read();
|
|
16357
16375
|
lexState = "multiLineCommentAsterisk";
|
|
16358
16376
|
return;
|
|
16359
|
-
case
|
|
16377
|
+
case undefined:
|
|
16360
16378
|
throw invalidChar(read());
|
|
16361
16379
|
}
|
|
16362
16380
|
read();
|
|
@@ -16369,7 +16387,7 @@ var lexStates = { default() {
|
|
|
16369
16387
|
read();
|
|
16370
16388
|
lexState = "default";
|
|
16371
16389
|
return;
|
|
16372
|
-
case
|
|
16390
|
+
case undefined:
|
|
16373
16391
|
throw invalidChar(read());
|
|
16374
16392
|
}
|
|
16375
16393
|
read();
|
|
@@ -16383,7 +16401,7 @@ var lexStates = { default() {
|
|
|
16383
16401
|
read();
|
|
16384
16402
|
lexState = "default";
|
|
16385
16403
|
return;
|
|
16386
|
-
case
|
|
16404
|
+
case undefined:
|
|
16387
16405
|
read();
|
|
16388
16406
|
return newToken("eof");
|
|
16389
16407
|
}
|
|
@@ -16672,7 +16690,7 @@ var lexStates = { default() {
|
|
|
16672
16690
|
case "\u2029":
|
|
16673
16691
|
separatorChar(c);
|
|
16674
16692
|
break;
|
|
16675
|
-
case
|
|
16693
|
+
case undefined:
|
|
16676
16694
|
throw invalidChar(read());
|
|
16677
16695
|
}
|
|
16678
16696
|
buffer += read();
|
|
@@ -16803,7 +16821,7 @@ function escape() {
|
|
|
16803
16821
|
case "8":
|
|
16804
16822
|
case "9":
|
|
16805
16823
|
throw invalidChar(read());
|
|
16806
|
-
case
|
|
16824
|
+
case undefined:
|
|
16807
16825
|
throw invalidChar(read());
|
|
16808
16826
|
}
|
|
16809
16827
|
return read();
|
|
@@ -16915,7 +16933,7 @@ function push() {
|
|
|
16915
16933
|
value = token.value;
|
|
16916
16934
|
break;
|
|
16917
16935
|
}
|
|
16918
|
-
if (root ===
|
|
16936
|
+
if (root === undefined) {
|
|
16919
16937
|
root = value;
|
|
16920
16938
|
} else {
|
|
16921
16939
|
const parent = stack[stack.length - 1];
|
|
@@ -16955,7 +16973,7 @@ function pop() {
|
|
|
16955
16973
|
}
|
|
16956
16974
|
}
|
|
16957
16975
|
function invalidChar(c2) {
|
|
16958
|
-
if (c2 ===
|
|
16976
|
+
if (c2 === undefined) {
|
|
16959
16977
|
return syntaxError(`JSON5: invalid end of input at ${line2}:${column}`);
|
|
16960
16978
|
}
|
|
16961
16979
|
return syntaxError(`JSON5: invalid character '${formatChar(c2)}' at ${line2}:${column}`);
|
|
@@ -17016,9 +17034,9 @@ var _JSONError = class _JSONError2 extends Error {
|
|
|
17016
17034
|
__publicField(this, "fileName");
|
|
17017
17035
|
__publicField(this, "codeFrame");
|
|
17018
17036
|
__publicField(this, "rawCodeFrame");
|
|
17019
|
-
__privateAdd(this, _message,
|
|
17037
|
+
__privateAdd(this, _message, undefined);
|
|
17020
17038
|
__privateSet(this, _message, message);
|
|
17021
|
-
(_a = Error.captureStackTrace) == null ?
|
|
17039
|
+
(_a = Error.captureStackTrace) == null ? undefined : _a.call(Error, this, _JSONError2);
|
|
17022
17040
|
}
|
|
17023
17041
|
get message() {
|
|
17024
17042
|
const { fileName, codeFrame } = this;
|
|
@@ -17263,7 +17281,7 @@ codes.ERR_INVALID_MODULE_SPECIFIER = createError(
|
|
|
17263
17281
|
* @param {string} reason
|
|
17264
17282
|
* @param {string} [base]
|
|
17265
17283
|
*/
|
|
17266
|
-
(request, reason, base =
|
|
17284
|
+
(request, reason, base = undefined) => {
|
|
17267
17285
|
return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
|
|
17268
17286
|
},
|
|
17269
17287
|
TypeError
|
|
@@ -17289,7 +17307,7 @@ codes.ERR_INVALID_PACKAGE_TARGET = createError(
|
|
|
17289
17307
|
* @param {boolean} [isImport=false]
|
|
17290
17308
|
* @param {string} [base]
|
|
17291
17309
|
*/
|
|
17292
|
-
(pkgPath, key2, target, isImport = false, base =
|
|
17310
|
+
(pkgPath, key2, target, isImport = false, base = undefined) => {
|
|
17293
17311
|
const relError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
|
|
17294
17312
|
if (key2 === ".") {
|
|
17295
17313
|
assert2(isImport === false);
|
|
@@ -17331,7 +17349,7 @@ codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError(
|
|
|
17331
17349
|
* @param {string} subpath
|
|
17332
17350
|
* @param {string} [base]
|
|
17333
17351
|
*/
|
|
17334
|
-
(pkgPath, subpath, base =
|
|
17352
|
+
(pkgPath, subpath, base = undefined) => {
|
|
17335
17353
|
if (subpath === ".") return `No "exports" main defined in ${pkgPath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
17336
17354
|
return `Package subpath '${subpath}' is not defined by "exports" in ${pkgPath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
17337
17355
|
},
|
|
@@ -17407,10 +17425,10 @@ function isErrorStackTraceLimitWritable() {
|
|
|
17407
17425
|
} catch {
|
|
17408
17426
|
}
|
|
17409
17427
|
const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
17410
|
-
if (desc ===
|
|
17428
|
+
if (desc === undefined) {
|
|
17411
17429
|
return Object.isExtensible(Error);
|
|
17412
17430
|
}
|
|
17413
|
-
return own.call(desc, "writable") && desc.writable !==
|
|
17431
|
+
return own.call(desc, "writable") && desc.writable !== undefined ? desc.writable : desc.set !== undefined;
|
|
17414
17432
|
}
|
|
17415
17433
|
function hideStackFrames(fn) {
|
|
17416
17434
|
const hidden = nodeInternalPrefix + fn.name;
|
|
@@ -17436,7 +17454,7 @@ var captureLargerStackTrace = hideStackFrames(
|
|
|
17436
17454
|
);
|
|
17437
17455
|
function getMessage(key2, args, self) {
|
|
17438
17456
|
const message = messages.get(key2);
|
|
17439
|
-
assert2(message !==
|
|
17457
|
+
assert2(message !== undefined, "expected `message` to be found");
|
|
17440
17458
|
if (typeof message === "function") {
|
|
17441
17459
|
assert2(
|
|
17442
17460
|
message.length <= args.length,
|
|
@@ -17454,7 +17472,7 @@ function getMessage(key2, args, self) {
|
|
|
17454
17472
|
return Reflect.apply(format, null, args);
|
|
17455
17473
|
}
|
|
17456
17474
|
function determineSpecificType(value) {
|
|
17457
|
-
if (value === null || value ===
|
|
17475
|
+
if (value === null || value === undefined) {
|
|
17458
17476
|
return String(value);
|
|
17459
17477
|
}
|
|
17460
17478
|
if (typeof value === "function" && value.name) {
|
|
@@ -17484,7 +17502,7 @@ function read2(jsonPath, { base, specifier }) {
|
|
|
17484
17502
|
}
|
|
17485
17503
|
let string;
|
|
17486
17504
|
try {
|
|
17487
|
-
string =
|
|
17505
|
+
string = fs6.readFileSync(path9__default.toNamespacedPath(jsonPath), "utf8");
|
|
17488
17506
|
} catch (error) {
|
|
17489
17507
|
const exception2 = (
|
|
17490
17508
|
/** @type {ErrnoException} */
|
|
@@ -17497,14 +17515,14 @@ function read2(jsonPath, { base, specifier }) {
|
|
|
17497
17515
|
const result = {
|
|
17498
17516
|
exists: false,
|
|
17499
17517
|
pjsonPath: jsonPath,
|
|
17500
|
-
main:
|
|
17501
|
-
name:
|
|
17518
|
+
main: undefined,
|
|
17519
|
+
name: undefined,
|
|
17502
17520
|
type: "none",
|
|
17503
17521
|
// Ignore unknown types for forwards compatibility
|
|
17504
|
-
exports:
|
|
17505
|
-
imports:
|
|
17522
|
+
exports: undefined,
|
|
17523
|
+
imports: undefined
|
|
17506
17524
|
};
|
|
17507
|
-
if (string !==
|
|
17525
|
+
if (string !== undefined) {
|
|
17508
17526
|
let parsed;
|
|
17509
17527
|
try {
|
|
17510
17528
|
parsed = JSON.parse(string);
|
|
@@ -17555,7 +17573,7 @@ function getPackageScopeConfig(resolved) {
|
|
|
17555
17573
|
}
|
|
17556
17574
|
}
|
|
17557
17575
|
const packageJSONPath = fileURLToPath(packageJSONUrl);
|
|
17558
|
-
return { pjsonPath: packageJSONPath, exists: false, main:
|
|
17576
|
+
return { pjsonPath: packageJSONPath, exists: false, main: undefined, name: undefined, type: "none", exports: undefined, imports: undefined };
|
|
17559
17577
|
}
|
|
17560
17578
|
function getPackageType(url2) {
|
|
17561
17579
|
const packageConfig = getPackageScopeConfig(url2);
|
|
@@ -17624,7 +17642,7 @@ function getFileProtocolModuleFormat(url2, _context, ignoreErrors) {
|
|
|
17624
17642
|
const format3 = extensionFormatMap[ext];
|
|
17625
17643
|
if (format3) return format3;
|
|
17626
17644
|
if (ignoreErrors) {
|
|
17627
|
-
return
|
|
17645
|
+
return undefined;
|
|
17628
17646
|
}
|
|
17629
17647
|
const filepath = fileURLToPath(url2);
|
|
17630
17648
|
throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath);
|
|
@@ -17648,7 +17666,7 @@ function getDefaultConditionsSet() {
|
|
|
17648
17666
|
return DEFAULT_CONDITIONS_SET;
|
|
17649
17667
|
}
|
|
17650
17668
|
function getConditionsSet(conditions) {
|
|
17651
|
-
if (conditions !==
|
|
17669
|
+
if (conditions !== undefined && conditions !== getDefaultConditions()) {
|
|
17652
17670
|
if (!Array.isArray(conditions)) {
|
|
17653
17671
|
throw new ERR_INVALID_ARG_VALUE("conditions", conditions, "expected an array");
|
|
17654
17672
|
}
|
|
@@ -17700,12 +17718,12 @@ function tryStatSync(path132) {
|
|
|
17700
17718
|
}
|
|
17701
17719
|
function fileExists(url2) {
|
|
17702
17720
|
const stats = statSync(url2, { throwIfNoEntry: false });
|
|
17703
|
-
const isFile2 = stats ? stats.isFile() :
|
|
17704
|
-
return isFile2 === null || isFile2 ===
|
|
17721
|
+
const isFile2 = stats ? stats.isFile() : undefined;
|
|
17722
|
+
return isFile2 === null || isFile2 === undefined ? false : isFile2;
|
|
17705
17723
|
}
|
|
17706
17724
|
function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
17707
17725
|
let guess;
|
|
17708
|
-
if (packageConfig.main !==
|
|
17726
|
+
if (packageConfig.main !== undefined) {
|
|
17709
17727
|
guess = new URL$1(packageConfig.main, packageJsonUrl);
|
|
17710
17728
|
if (fileExists(guess)) return guess;
|
|
17711
17729
|
const tries2 = [`./${packageConfig.main}.js`, `./${packageConfig.main}.json`, `./${packageConfig.main}.node`, `./${packageConfig.main}/index.js`, `./${packageConfig.main}/index.json`, `./${packageConfig.main}/index.node`];
|
|
@@ -17713,7 +17731,7 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
|
17713
17731
|
while (++i22 < tries2.length) {
|
|
17714
17732
|
guess = new URL$1(tries2[i22], packageJsonUrl);
|
|
17715
17733
|
if (fileExists(guess)) break;
|
|
17716
|
-
guess =
|
|
17734
|
+
guess = undefined;
|
|
17717
17735
|
}
|
|
17718
17736
|
if (guess) {
|
|
17719
17737
|
emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main);
|
|
@@ -17725,7 +17743,7 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
|
17725
17743
|
while (++i2 < tries.length) {
|
|
17726
17744
|
guess = new URL$1(tries[i2], packageJsonUrl);
|
|
17727
17745
|
if (fileExists(guess)) break;
|
|
17728
|
-
guess =
|
|
17746
|
+
guess = undefined;
|
|
17729
17747
|
}
|
|
17730
17748
|
if (guess) {
|
|
17731
17749
|
emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main);
|
|
@@ -17860,14 +17878,14 @@ function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, b
|
|
|
17860
17878
|
if (exception2.code === "ERR_INVALID_PACKAGE_TARGET") continue;
|
|
17861
17879
|
throw error;
|
|
17862
17880
|
}
|
|
17863
|
-
if (resolveResult ===
|
|
17881
|
+
if (resolveResult === undefined) continue;
|
|
17864
17882
|
if (resolveResult === null) {
|
|
17865
17883
|
lastException = null;
|
|
17866
17884
|
continue;
|
|
17867
17885
|
}
|
|
17868
17886
|
return resolveResult;
|
|
17869
17887
|
}
|
|
17870
|
-
if (lastException ===
|
|
17888
|
+
if (lastException === undefined || lastException === null) {
|
|
17871
17889
|
return null;
|
|
17872
17890
|
}
|
|
17873
17891
|
throw lastException;
|
|
@@ -17890,7 +17908,7 @@ function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, b
|
|
|
17890
17908
|
target[key2]
|
|
17891
17909
|
);
|
|
17892
17910
|
const resolveResult = resolvePackageTarget(packageJsonUrl, conditionalTarget, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions);
|
|
17893
|
-
if (resolveResult ===
|
|
17911
|
+
if (resolveResult === undefined) continue;
|
|
17894
17912
|
return resolveResult;
|
|
17895
17913
|
}
|
|
17896
17914
|
}
|
|
@@ -17936,7 +17954,7 @@ function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, ba
|
|
|
17936
17954
|
if (own2.call(exports, packageSubpath) && !packageSubpath.includes("*") && !packageSubpath.endsWith("/")) {
|
|
17937
17955
|
const target = exports[packageSubpath];
|
|
17938
17956
|
const resolveResult = resolvePackageTarget(packageJsonUrl, target, "", packageSubpath, base, false, false, false, conditions);
|
|
17939
|
-
if (resolveResult === null || resolveResult ===
|
|
17957
|
+
if (resolveResult === null || resolveResult === undefined) {
|
|
17940
17958
|
throw exportsNotFound(packageSubpath, packageJsonUrl, base);
|
|
17941
17959
|
}
|
|
17942
17960
|
return resolveResult;
|
|
@@ -17965,7 +17983,7 @@ function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, ba
|
|
|
17965
17983
|
exports[bestMatch]
|
|
17966
17984
|
);
|
|
17967
17985
|
const resolveResult = resolvePackageTarget(packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, false, packageSubpath.endsWith("/"), conditions);
|
|
17968
|
-
if (resolveResult === null || resolveResult ===
|
|
17986
|
+
if (resolveResult === null || resolveResult === undefined) {
|
|
17969
17987
|
throw exportsNotFound(packageSubpath, packageJsonUrl, base);
|
|
17970
17988
|
}
|
|
17971
17989
|
return resolveResult;
|
|
@@ -17998,7 +18016,7 @@ function packageImportsResolve(name, base, conditions) {
|
|
|
17998
18016
|
if (imports) {
|
|
17999
18017
|
if (own2.call(imports, name) && !name.includes("*")) {
|
|
18000
18018
|
const resolveResult = resolvePackageTarget(packageJsonUrl, imports[name], "", name, base, false, true, false, conditions);
|
|
18001
|
-
if (resolveResult !== null && resolveResult !==
|
|
18019
|
+
if (resolveResult !== null && resolveResult !== undefined) {
|
|
18002
18020
|
return resolveResult;
|
|
18003
18021
|
}
|
|
18004
18022
|
} else {
|
|
@@ -18020,7 +18038,7 @@ function packageImportsResolve(name, base, conditions) {
|
|
|
18020
18038
|
if (bestMatch) {
|
|
18021
18039
|
const target = imports[bestMatch];
|
|
18022
18040
|
const resolveResult = resolvePackageTarget(packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, true, false, conditions);
|
|
18023
|
-
if (resolveResult !== null && resolveResult !==
|
|
18041
|
+
if (resolveResult !== null && resolveResult !== undefined) {
|
|
18024
18042
|
return resolveResult;
|
|
18025
18043
|
}
|
|
18026
18044
|
}
|
|
@@ -18059,7 +18077,7 @@ function packageResolve(specifier, base, conditions) {
|
|
|
18059
18077
|
const packageConfig = getPackageScopeConfig(base);
|
|
18060
18078
|
if (packageConfig.exists) {
|
|
18061
18079
|
const packageJsonUrl2 = pathToFileURL(packageConfig.pjsonPath);
|
|
18062
|
-
if (packageConfig.name === packageName && packageConfig.exports !==
|
|
18080
|
+
if (packageConfig.name === packageName && packageConfig.exports !== undefined && packageConfig.exports !== null) {
|
|
18063
18081
|
return packageExportsResolve(packageJsonUrl2, packageSubpath, packageConfig, base, conditions);
|
|
18064
18082
|
}
|
|
18065
18083
|
}
|
|
@@ -18075,7 +18093,7 @@ function packageResolve(specifier, base, conditions) {
|
|
|
18075
18093
|
continue;
|
|
18076
18094
|
}
|
|
18077
18095
|
const packageConfig2 = package_json_reader_default.read(packageJsonPath, { base, specifier });
|
|
18078
|
-
if (packageConfig2.exports !==
|
|
18096
|
+
if (packageConfig2.exports !== undefined && packageConfig2.exports !== null) {
|
|
18079
18097
|
return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig2, base, conditions);
|
|
18080
18098
|
}
|
|
18081
18099
|
if (packageSubpath === ".") {
|
|
@@ -18116,7 +18134,7 @@ function moduleResolve(specifier, base, conditions, preserveSymlinks) {
|
|
|
18116
18134
|
}
|
|
18117
18135
|
}
|
|
18118
18136
|
}
|
|
18119
|
-
assert2(resolved !==
|
|
18137
|
+
assert2(resolved !== undefined, "expected to be defined");
|
|
18120
18138
|
if (resolved.protocol !== "file:") {
|
|
18121
18139
|
return resolved;
|
|
18122
18140
|
}
|
|
@@ -18127,11 +18145,11 @@ function checkIfDisallowedImport(specifier, parsed, parsedParentURL) {
|
|
|
18127
18145
|
const parentProtocol = parsedParentURL.protocol;
|
|
18128
18146
|
if (parentProtocol === "http:" || parentProtocol === "https:") {
|
|
18129
18147
|
if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) {
|
|
18130
|
-
const parsedProtocol = parsed == null ?
|
|
18148
|
+
const parsedProtocol = parsed == null ? undefined : parsed.protocol;
|
|
18131
18149
|
if (parsedProtocol && parsedProtocol !== "https:" && parsedProtocol !== "http:") {
|
|
18132
18150
|
throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier, parsedParentURL, "remote imports cannot import from a local location.");
|
|
18133
18151
|
}
|
|
18134
|
-
return { url: (parsed == null ?
|
|
18152
|
+
return { url: (parsed == null ? undefined : parsed.href) || "" };
|
|
18135
18153
|
}
|
|
18136
18154
|
if (builtinModules.includes(specifier)) {
|
|
18137
18155
|
throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier, parsedParentURL, "remote imports cannot import from a local location.");
|
|
@@ -18144,7 +18162,7 @@ function isURL(self) {
|
|
|
18144
18162
|
return Boolean(self && typeof self === "object" && "href" in self && typeof self.href === "string" && "protocol" in self && typeof self.protocol === "string" && self.href && self.protocol);
|
|
18145
18163
|
}
|
|
18146
18164
|
function throwIfInvalidParentURL(parentURL) {
|
|
18147
|
-
if (parentURL ===
|
|
18165
|
+
if (parentURL === undefined) {
|
|
18148
18166
|
return;
|
|
18149
18167
|
}
|
|
18150
18168
|
if (typeof parentURL !== "string" && !isURL(parentURL)) {
|
|
@@ -18153,7 +18171,7 @@ function throwIfInvalidParentURL(parentURL) {
|
|
|
18153
18171
|
}
|
|
18154
18172
|
function defaultResolve(specifier, context = {}) {
|
|
18155
18173
|
const { parentURL } = context;
|
|
18156
|
-
assert2(parentURL !==
|
|
18174
|
+
assert2(parentURL !== undefined, "expected `parentURL` to be defined");
|
|
18157
18175
|
throwIfInvalidParentURL(parentURL);
|
|
18158
18176
|
let parsedParentURL;
|
|
18159
18177
|
if (parentURL) {
|
|
@@ -18215,7 +18233,7 @@ async function loadExternalConfig(externalConfig, configFile) {
|
|
|
18215
18233
|
try {
|
|
18216
18234
|
return require_from_file_default(externalConfig, configFile);
|
|
18217
18235
|
} catch (error) {
|
|
18218
|
-
if (!requireErrorCodesShouldBeIgnored.has(error == null ?
|
|
18236
|
+
if (!requireErrorCodesShouldBeIgnored.has(error == null ? undefined : error.code)) {
|
|
18219
18237
|
throw error;
|
|
18220
18238
|
}
|
|
18221
18239
|
}
|
|
@@ -18257,7 +18275,7 @@ function loadPrettierConfig(configFile, { shouldCache }) {
|
|
|
18257
18275
|
return loadCache.get(configFile);
|
|
18258
18276
|
}
|
|
18259
18277
|
function getSearchFunction(stopDirectory) {
|
|
18260
|
-
stopDirectory = stopDirectory ? path9__default.resolve(stopDirectory) :
|
|
18278
|
+
stopDirectory = stopDirectory ? path9__default.resolve(stopDirectory) : undefined;
|
|
18261
18279
|
if (!searchCache.has(stopDirectory)) {
|
|
18262
18280
|
const searcher2 = config_searcher_default(stopDirectory);
|
|
18263
18281
|
const searchFunction = searcher2.search.bind(searcher2);
|
|
@@ -18286,7 +18304,7 @@ async function loadPrettierConfig2(file, options8) {
|
|
|
18286
18304
|
const shouldCache = options8.useCache;
|
|
18287
18305
|
let configFile = options8.config;
|
|
18288
18306
|
if (!configFile) {
|
|
18289
|
-
const directory = file ? path9__default.dirname(path9__default.resolve(file)) :
|
|
18307
|
+
const directory = file ? path9__default.dirname(path9__default.resolve(file)) : undefined;
|
|
18290
18308
|
configFile = await searchPrettierConfig(directory, { shouldCache });
|
|
18291
18309
|
}
|
|
18292
18310
|
if (!configFile) {
|
|
@@ -18309,7 +18327,7 @@ async function resolveConfig(fileUrlOrPath, options8) {
|
|
|
18309
18327
|
return merged;
|
|
18310
18328
|
}
|
|
18311
18329
|
async function resolveConfigFile(fileUrlOrPath) {
|
|
18312
|
-
const directory = fileUrlOrPath ? path9__default.dirname(path9__default.resolve(toPath(fileUrlOrPath))) :
|
|
18330
|
+
const directory = fileUrlOrPath ? path9__default.dirname(path9__default.resolve(toPath(fileUrlOrPath))) : undefined;
|
|
18313
18331
|
const result = await searchPrettierConfig(directory, { shouldCache: false });
|
|
18314
18332
|
return result ?? null;
|
|
18315
18333
|
}
|
|
@@ -18332,7 +18350,7 @@ function pathMatchesGlobs(filePath, patterns, excludedPatterns) {
|
|
|
18332
18350
|
return import_micromatch.default.isMatch(filePath, withoutSlashes, { ignore: excludedPatterns, basename: true, dot: true }) || import_micromatch.default.isMatch(filePath, withSlashes, { ignore: excludedPatterns, basename: false, dot: true });
|
|
18333
18351
|
}
|
|
18334
18352
|
var stringReplaceAll22 = (isOptionalObject, original, pattern, replacement) => {
|
|
18335
|
-
if (isOptionalObject && (original ===
|
|
18353
|
+
if (isOptionalObject && (original === undefined || original === null)) {
|
|
18336
18354
|
return;
|
|
18337
18355
|
}
|
|
18338
18356
|
if (original.replaceAll) {
|
|
@@ -18379,7 +18397,7 @@ async function createSingleIsIgnoredFunction(ignoreFile, withNodeModules) {
|
|
|
18379
18397
|
}
|
|
18380
18398
|
async function createIsIgnoredFunction(ignoreFiles, withNodeModules) {
|
|
18381
18399
|
if (ignoreFiles.length === 0 && !withNodeModules) {
|
|
18382
|
-
ignoreFiles = [
|
|
18400
|
+
ignoreFiles = [undefined];
|
|
18383
18401
|
}
|
|
18384
18402
|
const isIgnoredFunctions = (await Promise.all(ignoreFiles.map((ignoreFile) => createSingleIsIgnoredFunction(ignoreFile, withNodeModules)))).filter(Boolean);
|
|
18385
18403
|
return (file) => isIgnoredFunctions.some((isIgnored2) => isIgnored2(file));
|
|
@@ -18393,7 +18411,7 @@ var import_n_readlines = __toESM2(require_readlines());
|
|
|
18393
18411
|
function getInterpreter(file) {
|
|
18394
18412
|
let fd;
|
|
18395
18413
|
try {
|
|
18396
|
-
fd =
|
|
18414
|
+
fd = fs6.openSync(file, "r");
|
|
18397
18415
|
} catch {
|
|
18398
18416
|
return;
|
|
18399
18417
|
}
|
|
@@ -18410,7 +18428,7 @@ function getInterpreter(file) {
|
|
|
18410
18428
|
}
|
|
18411
18429
|
} finally {
|
|
18412
18430
|
try {
|
|
18413
|
-
|
|
18431
|
+
fs6.closeSync(fd);
|
|
18414
18432
|
} catch {
|
|
18415
18433
|
}
|
|
18416
18434
|
}
|
|
@@ -18422,13 +18440,13 @@ function getLanguageByFileName(languages2, file) {
|
|
|
18422
18440
|
return;
|
|
18423
18441
|
}
|
|
18424
18442
|
const basename = getFileBasename(file).toLowerCase();
|
|
18425
|
-
return languages2.find(({ filenames }) => filenames == null ?
|
|
18443
|
+
return languages2.find(({ filenames }) => filenames == null ? undefined : filenames.some((name) => name.toLowerCase() === basename)) ?? languages2.find(({ extensions }) => extensions == null ? undefined : extensions.some((extension) => basename.endsWith(extension)));
|
|
18426
18444
|
}
|
|
18427
18445
|
function getLanguageByLanguageName(languages2, languageName) {
|
|
18428
18446
|
if (!languageName) {
|
|
18429
18447
|
return;
|
|
18430
18448
|
}
|
|
18431
|
-
return languages2.find(({ name }) => name.toLowerCase() === languageName) ?? languages2.find(({ aliases }) => aliases == null ?
|
|
18449
|
+
return languages2.find(({ name }) => name.toLowerCase() === languageName) ?? languages2.find(({ aliases }) => aliases == null ? undefined : aliases.includes(languageName)) ?? languages2.find(({ extensions }) => extensions == null ? undefined : extensions.includes(`.${languageName}`));
|
|
18432
18450
|
}
|
|
18433
18451
|
function getLanguageByInterpreter(languages2, file) {
|
|
18434
18452
|
if (!file || getFileBasename(file).includes(".")) {
|
|
@@ -18438,7 +18456,7 @@ function getLanguageByInterpreter(languages2, file) {
|
|
|
18438
18456
|
if (!interpreter) {
|
|
18439
18457
|
return;
|
|
18440
18458
|
}
|
|
18441
|
-
return languages2.find(({ interpreters }) => interpreters == null ?
|
|
18459
|
+
return languages2.find(({ interpreters }) => interpreters == null ? undefined : interpreters.includes(interpreter));
|
|
18442
18460
|
}
|
|
18443
18461
|
function inferParser(options8, fileInfo) {
|
|
18444
18462
|
const languages2 = options8.plugins.flatMap((plugin) => (
|
|
@@ -18446,7 +18464,7 @@ function inferParser(options8, fileInfo) {
|
|
|
18446
18464
|
plugin.languages ?? []
|
|
18447
18465
|
));
|
|
18448
18466
|
const language = getLanguageByLanguageName(languages2, fileInfo.language) ?? getLanguageByFileName(languages2, fileInfo.physicalFile) ?? getLanguageByFileName(languages2, fileInfo.file) ?? getLanguageByInterpreter(languages2, fileInfo.physicalFile);
|
|
18449
|
-
return language == null ?
|
|
18467
|
+
return language == null ? undefined : language.parsers[0];
|
|
18450
18468
|
}
|
|
18451
18469
|
var infer_parser_default = inferParser;
|
|
18452
18470
|
async function getFileInfo(file, options8) {
|
|
@@ -18469,7 +18487,7 @@ async function getParser(file, options8) {
|
|
|
18469
18487
|
if (options8.resolveConfig !== false) {
|
|
18470
18488
|
config = await resolveConfig(file);
|
|
18471
18489
|
}
|
|
18472
|
-
return (config == null ?
|
|
18490
|
+
return (config == null ? undefined : config.parser) ?? infer_parser_default(options8, { physicalFile: file });
|
|
18473
18491
|
}
|
|
18474
18492
|
var get_file_info_default = getFileInfo;
|
|
18475
18493
|
var import_diff = __toESM2(require_array2());
|
|
@@ -18591,7 +18609,7 @@ function traverseDoc2(doc2, onEnter, onExit, shouldTraverseConditionalGroups) {
|
|
|
18591
18609
|
if (!docType) {
|
|
18592
18610
|
throw new invalid_doc_error_default2(doc3);
|
|
18593
18611
|
}
|
|
18594
|
-
if ((onEnter == null ?
|
|
18612
|
+
if ((onEnter == null ? undefined : onEnter(doc3)) === false) {
|
|
18595
18613
|
continue;
|
|
18596
18614
|
}
|
|
18597
18615
|
switch (docType) {
|
|
@@ -18686,7 +18704,7 @@ function flattenDoc(doc2) {
|
|
|
18686
18704
|
return { ...doc2, breakContents: flattenDoc(doc2.breakContents), flatContents: flattenDoc(doc2.flatContents) };
|
|
18687
18705
|
}
|
|
18688
18706
|
if (doc2.type === DOC_TYPE_GROUP2) {
|
|
18689
|
-
return { ...doc2, contents: flattenDoc(doc2.contents), expandedStates: (_a = doc2.expandedStates) == null ?
|
|
18707
|
+
return { ...doc2, contents: flattenDoc(doc2.contents), expandedStates: (_a = doc2.expandedStates) == null ? undefined : _a.map(flattenDoc) };
|
|
18690
18708
|
}
|
|
18691
18709
|
if (doc2.type === DOC_TYPE_FILL2) {
|
|
18692
18710
|
return { type: "fill", parts: doc2.parts.map(flattenDoc) };
|
|
@@ -18710,7 +18728,7 @@ function printDocToDebug(doc2) {
|
|
|
18710
18728
|
return printed.length === 1 ? printed[0] : `[${printed.join(", ")}]`;
|
|
18711
18729
|
}
|
|
18712
18730
|
if (doc3.type === DOC_TYPE_LINE2) {
|
|
18713
|
-
const withBreakParent = ((_a = parentParts == null ?
|
|
18731
|
+
const withBreakParent = ((_a = parentParts == null ? undefined : parentParts[index + 1]) == null ? undefined : _a.type) === DOC_TYPE_BREAK_PARENT2;
|
|
18714
18732
|
if (doc3.literal) {
|
|
18715
18733
|
return withBreakParent ? "literalline" : "literallineWithoutBreakParent";
|
|
18716
18734
|
}
|
|
@@ -18723,8 +18741,8 @@ function printDocToDebug(doc2) {
|
|
|
18723
18741
|
return "line";
|
|
18724
18742
|
}
|
|
18725
18743
|
if (doc3.type === DOC_TYPE_BREAK_PARENT2) {
|
|
18726
|
-
const afterHardline = ((_b = parentParts == null ?
|
|
18727
|
-
return afterHardline ?
|
|
18744
|
+
const afterHardline = ((_b = parentParts == null ? undefined : parentParts[index - 1]) == null ? undefined : _b.type) === DOC_TYPE_LINE2 && parentParts[index - 1].hard;
|
|
18745
|
+
return afterHardline ? undefined : "breakParent";
|
|
18728
18746
|
}
|
|
18729
18747
|
if (doc3.type === DOC_TYPE_TRIM2) {
|
|
18730
18748
|
return "trim";
|
|
@@ -18795,7 +18813,7 @@ function printDocToDebug(doc2) {
|
|
|
18795
18813
|
}
|
|
18796
18814
|
}
|
|
18797
18815
|
var at2 = (isOptionalObject, object, index) => {
|
|
18798
|
-
if (isOptionalObject && (object ===
|
|
18816
|
+
if (isOptionalObject && (object === undefined || object === null)) {
|
|
18799
18817
|
return;
|
|
18800
18818
|
}
|
|
18801
18819
|
if (Array.isArray(object) || typeof object === "string") {
|
|
@@ -19717,7 +19735,7 @@ var AstPath = class {
|
|
|
19717
19735
|
let name = null;
|
|
19718
19736
|
let node = this.stack[stackPointer--];
|
|
19719
19737
|
for (const predicate of predicates) {
|
|
19720
|
-
if (node ===
|
|
19738
|
+
if (node === undefined) {
|
|
19721
19739
|
return false;
|
|
19722
19740
|
}
|
|
19723
19741
|
let number = null;
|
|
@@ -19818,7 +19836,7 @@ function* getDescendants(node, options8) {
|
|
|
19818
19836
|
}
|
|
19819
19837
|
function skip(characters) {
|
|
19820
19838
|
return (text, startIndex, options8) => {
|
|
19821
|
-
const backwards = Boolean(options8 == null ?
|
|
19839
|
+
const backwards = Boolean(options8 == null ? undefined : options8.backwards);
|
|
19822
19840
|
if (startIndex === false) {
|
|
19823
19841
|
return false;
|
|
19824
19842
|
}
|
|
@@ -19846,7 +19864,7 @@ var skipSpaces = skip(" ");
|
|
|
19846
19864
|
var skipToLineEnd = skip(",; ");
|
|
19847
19865
|
var skipEverythingButNewLine = skip(/[^\n\r]/);
|
|
19848
19866
|
function skipNewline(text, startIndex, options8) {
|
|
19849
|
-
const backwards = Boolean(options8 == null ?
|
|
19867
|
+
const backwards = Boolean(options8 == null ? undefined : options8.backwards);
|
|
19850
19868
|
if (startIndex === false) {
|
|
19851
19869
|
return false;
|
|
19852
19870
|
}
|
|
@@ -19926,7 +19944,7 @@ function getSortedChildNodes(node, options8) {
|
|
|
19926
19944
|
if (!canAttachComment) {
|
|
19927
19945
|
return [];
|
|
19928
19946
|
}
|
|
19929
|
-
const childNodes = ((getCommentChildNodes == null ?
|
|
19947
|
+
const childNodes = ((getCommentChildNodes == null ? undefined : getCommentChildNodes(node, options8)) ?? [...getChildren(node, { getVisitorKeys: create_get_visitor_keys_function_default(printerGetVisitorKeys) })]).flatMap((node2) => canAttachComment(node2) ? [node2] : getSortedChildNodes(node2, options8));
|
|
19930
19948
|
childNodes.sort((nodeA, nodeB) => locStart(nodeA) - locStart(nodeB) || locEnd(nodeA) - locEnd(nodeB));
|
|
19931
19949
|
childNodesCache.set(node, childNodes);
|
|
19932
19950
|
return childNodes;
|
|
@@ -19960,7 +19978,7 @@ function decorateComment(node, comment, options8, enclosingNode) {
|
|
|
19960
19978
|
}
|
|
19961
19979
|
throw new Error("Comment location overlaps with node location");
|
|
19962
19980
|
}
|
|
19963
|
-
if ((enclosingNode == null ?
|
|
19981
|
+
if ((enclosingNode == null ? undefined : enclosingNode.type) === "TemplateLiteral") {
|
|
19964
19982
|
const { quasis } = enclosingNode;
|
|
19965
19983
|
const commentIndex = findExpressionIndexForComment(quasis, comment, options8);
|
|
19966
19984
|
if (precedingNode && findExpressionIndexForComment(quasis, precedingNode, options8) !== commentIndex) {
|
|
@@ -20105,7 +20123,7 @@ function breakTies(tiesToBreak, options8) {
|
|
|
20105
20123
|
assert2.strictEqual(currentCommentPrecedingNode, precedingNode);
|
|
20106
20124
|
assert2.strictEqual(currentCommentFollowingNode, followingNode);
|
|
20107
20125
|
const gap = options8.originalText.slice(options8.locEnd(comment), gapEndPos);
|
|
20108
|
-
if (((_b = (_a = options8.printer).isGap) == null ?
|
|
20126
|
+
if (((_b = (_a = options8.printer).isGap) == null ? undefined : _b.call(_a, gap, options8)) ?? /^[\s(]*$/.test(gap)) {
|
|
20109
20127
|
gapEndPos = options8.locStart(comment);
|
|
20110
20128
|
} else {
|
|
20111
20129
|
break;
|
|
@@ -20153,7 +20171,7 @@ function printLeadingComment(path132, options8) {
|
|
|
20153
20171
|
const comment = path132.node;
|
|
20154
20172
|
const parts = [printComment(path132, options8)];
|
|
20155
20173
|
const { printer: printer2, originalText, locStart, locEnd } = options8;
|
|
20156
|
-
const isBlock = (_a = printer2.isBlockComment) == null ?
|
|
20174
|
+
const isBlock = (_a = printer2.isBlockComment) == null ? undefined : _a.call(printer2, comment);
|
|
20157
20175
|
if (isBlock) {
|
|
20158
20176
|
const lineBreak = has_newline_default(originalText, locEnd(comment)) ? has_newline_default(originalText, locStart(comment), { backwards: true }) ? hardline2 : line22 : " ";
|
|
20159
20177
|
parts.push(lineBreak);
|
|
@@ -20171,12 +20189,12 @@ function printTrailingComment(path132, options8, previousComment) {
|
|
|
20171
20189
|
const comment = path132.node;
|
|
20172
20190
|
const printed = printComment(path132, options8);
|
|
20173
20191
|
const { printer: printer2, originalText, locStart } = options8;
|
|
20174
|
-
const isBlock = (_a = printer2.isBlockComment) == null ?
|
|
20175
|
-
if ((previousComment == null ?
|
|
20192
|
+
const isBlock = (_a = printer2.isBlockComment) == null ? undefined : _a.call(printer2, comment);
|
|
20193
|
+
if ((previousComment == null ? undefined : previousComment.hasLineSuffix) && !(previousComment == null ? undefined : previousComment.isBlock) || has_newline_default(originalText, locStart(comment), { backwards: true })) {
|
|
20176
20194
|
const isLineBeforeEmpty = is_previous_line_empty_default(originalText, locStart(comment));
|
|
20177
20195
|
return { doc: lineSuffix2([hardline2, isLineBeforeEmpty ? hardline2 : "", printed]), isBlock, hasLineSuffix: true };
|
|
20178
20196
|
}
|
|
20179
|
-
if (!isBlock || (previousComment == null ?
|
|
20197
|
+
if (!isBlock || (previousComment == null ? undefined : previousComment.hasLineSuffix)) {
|
|
20180
20198
|
return { doc: [lineSuffix2([" ", printed]), breakParent2], isBlock, hasLineSuffix: true };
|
|
20181
20199
|
}
|
|
20182
20200
|
return { doc: [" ", printed], isBlock, hasLineSuffix: false };
|
|
@@ -20196,7 +20214,7 @@ function printCommentsSeparately(path132, options8) {
|
|
|
20196
20214
|
let printedTrailingComment;
|
|
20197
20215
|
path132.each(() => {
|
|
20198
20216
|
const comment = path132.node;
|
|
20199
|
-
if (ignored == null ?
|
|
20217
|
+
if (ignored == null ? undefined : ignored.has(comment)) {
|
|
20200
20218
|
return;
|
|
20201
20219
|
}
|
|
20202
20220
|
const { leading, trailing } = comment;
|
|
@@ -20232,7 +20250,7 @@ function createPrintPreCheckFunction(options8) {
|
|
|
20232
20250
|
}
|
|
20233
20251
|
}
|
|
20234
20252
|
var create_print_pre_check_function_default = createPrintPreCheckFunction;
|
|
20235
|
-
var core_options_evaluate_default = { "cursorOffset": { "category": "Special", "type": "int", "default": -1, "range": { "start": -1, "end": Infinity, "step": 1 }, "description": "Print (to stderr) where a cursor at the given position would move to after formatting.", "cliCategory": "Editor" }, "endOfLine": { "category": "Global", "type": "choice", "default": "lf", "description": "Which end of line characters to apply.", "choices": [{ "value": "lf", "description": "Line Feed only (\\n), common on Linux and macOS as well as inside git repos" }, { "value": "crlf", "description": "Carriage Return + Line Feed characters (\\r\\n), common on Windows" }, { "value": "cr", "description": "Carriage Return character only (\\r), used very rarely" }, { "value": "auto", "description": "Maintain existing\n(mixed values within one file are normalised by looking at what's used after the first line)" }] }, "filepath": { "category": "Special", "type": "path", "description": "Specify the input filepath. This will be used to do parser inference.", "cliName": "stdin-filepath", "cliCategory": "Other", "cliDescription": "Path to the file to pretend that stdin comes from." }, "insertPragma": { "category": "Special", "type": "boolean", "default": false, "description": "Insert @format pragma into file's first docblock comment.", "cliCategory": "Other" }, "parser": { "category": "Global", "type": "choice", "default":
|
|
20253
|
+
var core_options_evaluate_default = { "cursorOffset": { "category": "Special", "type": "int", "default": -1, "range": { "start": -1, "end": Infinity, "step": 1 }, "description": "Print (to stderr) where a cursor at the given position would move to after formatting.", "cliCategory": "Editor" }, "endOfLine": { "category": "Global", "type": "choice", "default": "lf", "description": "Which end of line characters to apply.", "choices": [{ "value": "lf", "description": "Line Feed only (\\n), common on Linux and macOS as well as inside git repos" }, { "value": "crlf", "description": "Carriage Return + Line Feed characters (\\r\\n), common on Windows" }, { "value": "cr", "description": "Carriage Return character only (\\r), used very rarely" }, { "value": "auto", "description": "Maintain existing\n(mixed values within one file are normalised by looking at what's used after the first line)" }] }, "filepath": { "category": "Special", "type": "path", "description": "Specify the input filepath. This will be used to do parser inference.", "cliName": "stdin-filepath", "cliCategory": "Other", "cliDescription": "Path to the file to pretend that stdin comes from." }, "insertPragma": { "category": "Special", "type": "boolean", "default": false, "description": "Insert @format pragma into file's first docblock comment.", "cliCategory": "Other" }, "parser": { "category": "Global", "type": "choice", "default": undefined, "description": "Which parser to use.", "exception": (value) => typeof value === "string" || typeof value === "function", "choices": [{ "value": "flow", "description": "Flow" }, { "value": "babel", "description": "JavaScript" }, { "value": "babel-flow", "description": "Flow" }, { "value": "babel-ts", "description": "TypeScript" }, { "value": "typescript", "description": "TypeScript" }, { "value": "acorn", "description": "JavaScript" }, { "value": "espree", "description": "JavaScript" }, { "value": "meriyah", "description": "JavaScript" }, { "value": "css", "description": "CSS" }, { "value": "less", "description": "Less" }, { "value": "scss", "description": "SCSS" }, { "value": "json", "description": "JSON" }, { "value": "json5", "description": "JSON5" }, { "value": "jsonc", "description": "JSON with Comments" }, { "value": "json-stringify", "description": "JSON.stringify" }, { "value": "graphql", "description": "GraphQL" }, { "value": "markdown", "description": "Markdown" }, { "value": "mdx", "description": "MDX" }, { "value": "vue", "description": "Vue" }, { "value": "yaml", "description": "YAML" }, { "value": "glimmer", "description": "Ember / Handlebars" }, { "value": "html", "description": "HTML" }, { "value": "angular", "description": "Angular" }, { "value": "lwc", "description": "Lightning Web Components" }] }, "plugins": { "type": "path", "array": true, "default": [{ "value": [] }], "category": "Global", "description": "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", "exception": (value) => typeof value === "string" || typeof value === "object", "cliName": "plugin", "cliCategory": "Config" }, "printWidth": { "category": "Global", "type": "int", "default": 80, "description": "The line length where Prettier will try wrap.", "range": { "start": 0, "end": Infinity, "step": 1 } }, "rangeEnd": { "category": "Special", "type": "int", "default": Infinity, "range": { "start": 0, "end": Infinity, "step": 1 }, "description": "Format code ending at a given character offset (exclusive).\nThe range will extend forwards to the end of the selected statement.", "cliCategory": "Editor" }, "rangeStart": { "category": "Special", "type": "int", "default": 0, "range": { "start": 0, "end": Infinity, "step": 1 }, "description": "Format code starting at a given character offset.\nThe range will extend backwards to the start of the first line containing the selected statement.", "cliCategory": "Editor" }, "requirePragma": { "category": "Special", "type": "boolean", "default": false, "description": "Require either '@prettier' or '@format' to be present in the file's first docblock comment\nin order for it to be formatted.", "cliCategory": "Other" }, "tabWidth": { "type": "int", "category": "Global", "default": 2, "description": "Number of spaces per indentation level.", "range": { "start": 0, "end": Infinity, "step": 1 } }, "useTabs": { "category": "Global", "type": "boolean", "default": false, "description": "Indent with tabs instead of spaces." }, "embeddedLanguageFormatting": { "category": "Global", "type": "choice", "default": "auto", "description": "Control how Prettier formats quoted code embedded in the file.", "choices": [{ "value": "auto", "description": "Format embedded code if Prettier can automatically identify it." }, { "value": "off", "description": "Never automatically format embedded code." }] } };
|
|
20236
20254
|
function getSupportInfo({ plugins = [], showDeprecated = false } = {}) {
|
|
20237
20255
|
const languages2 = plugins.flatMap((plugin) => plugin.languages ?? []);
|
|
20238
20256
|
const options8 = [];
|
|
@@ -20250,7 +20268,7 @@ function getSupportInfo({ plugins = [], showDeprecated = false } = {}) {
|
|
|
20250
20268
|
}
|
|
20251
20269
|
option.pluginDefaults = Object.fromEntries(plugins.filter((plugin) => {
|
|
20252
20270
|
var _a;
|
|
20253
|
-
return ((_a = plugin.defaultOptions) == null ?
|
|
20271
|
+
return ((_a = plugin.defaultOptions) == null ? undefined : _a[option.name]) !== undefined;
|
|
20254
20272
|
}).map((plugin) => [plugin.name, plugin.defaultOptions[option.name]]));
|
|
20255
20273
|
options8.push(option);
|
|
20256
20274
|
}
|
|
@@ -20265,7 +20283,7 @@ function* collectParsersFromLanguages(parserChoices, languages2, plugins) {
|
|
|
20265
20283
|
existingParsers.add(parserName);
|
|
20266
20284
|
const plugin = plugins.find((plugin2) => plugin2.parsers && Object.prototype.hasOwnProperty.call(plugin2.parsers, parserName));
|
|
20267
20285
|
let description = language.name;
|
|
20268
|
-
if (plugin == null ?
|
|
20286
|
+
if (plugin == null ? undefined : plugin.name) {
|
|
20269
20287
|
description += ` (plugin: ${plugin.name})`;
|
|
20270
20288
|
}
|
|
20271
20289
|
yield { value: parserName, description };
|
|
@@ -20305,7 +20323,7 @@ function normalizeOptions(options8, optionInfos, { logger = false, isCLI = false
|
|
|
20305
20323
|
const unknown = !passThrough ? (key2, value, options9) => {
|
|
20306
20324
|
const { _, ...schemas2 } = options9.schemas;
|
|
20307
20325
|
return levenUnknownHandler(key2, value, { ...options9, schemas: schemas2 });
|
|
20308
|
-
} : Array.isArray(passThrough) ? (key2, value) => !passThrough.includes(key2) ?
|
|
20326
|
+
} : Array.isArray(passThrough) ? (key2, value) => !passThrough.includes(key2) ? undefined : { [key2]: value } : (key2, value) => ({ [key2]: value });
|
|
20309
20327
|
const schemas = optionInfosToSchemas(optionInfos, { isCLI, FlagSchema });
|
|
20310
20328
|
const normalizer = new Normalizer(schemas, { logger, unknown, descriptor });
|
|
20311
20329
|
const shouldSuppressDuplicateDeprecationWarnings = logger !== false;
|
|
@@ -20352,7 +20370,7 @@ function optionInfoToSchema(optionInfo, { isCLI, optionInfos, FlagSchema }) {
|
|
|
20352
20370
|
break;
|
|
20353
20371
|
case "choice":
|
|
20354
20372
|
SchemaConstructor = ChoiceSchema;
|
|
20355
|
-
parameters.choices = optionInfo.choices.map((choiceInfo) => (choiceInfo == null ?
|
|
20373
|
+
parameters.choices = optionInfo.choices.map((choiceInfo) => (choiceInfo == null ? undefined : choiceInfo.redirect) ? { ...choiceInfo, redirect: { to: { key: optionInfo.name, value: choiceInfo.redirect } } } : choiceInfo);
|
|
20356
20374
|
break;
|
|
20357
20375
|
case "boolean":
|
|
20358
20376
|
SchemaConstructor = BooleanSchema;
|
|
@@ -20370,10 +20388,10 @@ function optionInfoToSchema(optionInfo, { isCLI, optionInfos, FlagSchema }) {
|
|
|
20370
20388
|
if (optionInfo.exception) {
|
|
20371
20389
|
parameters.validate = (value, schema2, utils2) => optionInfo.exception(value) || schema2.validate(value, utils2);
|
|
20372
20390
|
} else {
|
|
20373
|
-
parameters.validate = (value, schema2, utils2) => value ===
|
|
20391
|
+
parameters.validate = (value, schema2, utils2) => value === undefined || schema2.validate(value, utils2);
|
|
20374
20392
|
}
|
|
20375
20393
|
if (optionInfo.redirect) {
|
|
20376
|
-
handlers.redirect = (value) => !value ?
|
|
20394
|
+
handlers.redirect = (value) => !value ? undefined : { to: { key: optionInfo.redirect.option, value: optionInfo.redirect.value } };
|
|
20377
20395
|
}
|
|
20378
20396
|
if (optionInfo.deprecated) {
|
|
20379
20397
|
handlers.deprecated = true;
|
|
@@ -20396,7 +20414,7 @@ function optionInfoToSchema(optionInfo, { isCLI, optionInfos, FlagSchema }) {
|
|
|
20396
20414
|
}
|
|
20397
20415
|
var normalize_options_default = normalizeOptions;
|
|
20398
20416
|
var arrayFindLast = (isOptionalObject, array2, callback) => {
|
|
20399
|
-
if (isOptionalObject && (array2 ===
|
|
20417
|
+
if (isOptionalObject && (array2 === undefined || array2 === null)) {
|
|
20400
20418
|
return;
|
|
20401
20419
|
}
|
|
20402
20420
|
if (array2.findLast) {
|
|
@@ -20454,7 +20472,7 @@ function initPrinter(plugin, astFormat) {
|
|
|
20454
20472
|
const printerOrPrinterInitFunction = plugin.printers[astFormat];
|
|
20455
20473
|
return typeof printerOrPrinterInitFunction === "function" ? printerOrPrinterInitFunction() : printerOrPrinterInitFunction;
|
|
20456
20474
|
}
|
|
20457
|
-
var formatOptionsHiddenDefaults = { astFormat: "estree", printer: {}, originalText:
|
|
20475
|
+
var formatOptionsHiddenDefaults = { astFormat: "estree", printer: {}, originalText: undefined, locStart: null, locEnd: null };
|
|
20458
20476
|
async function normalizeFormatOptions(options8, opts = {}) {
|
|
20459
20477
|
var _a;
|
|
20460
20478
|
const rawOptions = { ...options8 };
|
|
@@ -20469,19 +20487,19 @@ async function normalizeFormatOptions(options8, opts = {}) {
|
|
|
20469
20487
|
}
|
|
20470
20488
|
}
|
|
20471
20489
|
const supportOptions = getSupportInfo({ plugins: options8.plugins, showDeprecated: true }).options;
|
|
20472
|
-
const defaults = { ...formatOptionsHiddenDefaults, ...Object.fromEntries(supportOptions.filter((optionInfo) => optionInfo.default !==
|
|
20490
|
+
const defaults = { ...formatOptionsHiddenDefaults, ...Object.fromEntries(supportOptions.filter((optionInfo) => optionInfo.default !== undefined).map((option) => [option.name, option.default])) };
|
|
20473
20491
|
const parserPlugin = getParserPluginByParserName(rawOptions.plugins, rawOptions.parser);
|
|
20474
20492
|
const parser = await initParser(parserPlugin, rawOptions.parser);
|
|
20475
20493
|
rawOptions.astFormat = parser.astFormat;
|
|
20476
20494
|
rawOptions.locEnd = parser.locEnd;
|
|
20477
20495
|
rawOptions.locStart = parser.locStart;
|
|
20478
|
-
const printerPlugin = ((_a = parserPlugin.printers) == null ?
|
|
20496
|
+
const printerPlugin = ((_a = parserPlugin.printers) == null ? undefined : _a[parser.astFormat]) ? parserPlugin : getPrinterPluginByAstFormat(rawOptions.plugins, parser.astFormat);
|
|
20479
20497
|
const printer2 = await initPrinter(printerPlugin, parser.astFormat);
|
|
20480
20498
|
rawOptions.printer = printer2;
|
|
20481
|
-
const pluginDefaults = printerPlugin.defaultOptions ? Object.fromEntries(Object.entries(printerPlugin.defaultOptions).filter(([, value]) => value !==
|
|
20499
|
+
const pluginDefaults = printerPlugin.defaultOptions ? Object.fromEntries(Object.entries(printerPlugin.defaultOptions).filter(([, value]) => value !== undefined)) : {};
|
|
20482
20500
|
const mixedDefaults = { ...defaults, ...pluginDefaults };
|
|
20483
20501
|
for (const [k, value] of Object.entries(mixedDefaults)) {
|
|
20484
|
-
if (rawOptions[k] === null || rawOptions[k] ===
|
|
20502
|
+
if (rawOptions[k] === null || rawOptions[k] === undefined) {
|
|
20485
20503
|
rawOptions[k] = value;
|
|
20486
20504
|
}
|
|
20487
20505
|
}
|
|
@@ -20599,11 +20617,11 @@ async function printAstToDoc(ast, options8) {
|
|
|
20599
20617
|
const ensurePrintingNode = create_print_pre_check_function_default();
|
|
20600
20618
|
const embeds = /* @__PURE__ */ new Map();
|
|
20601
20619
|
await printEmbeddedLanguages(path132, mainPrint, options8, printAstToDoc, embeds);
|
|
20602
|
-
const doc2 = await callPluginPrintFunction(path132, options8, mainPrint,
|
|
20620
|
+
const doc2 = await callPluginPrintFunction(path132, options8, mainPrint, undefined, embeds);
|
|
20603
20621
|
ensureAllCommentsPrinted(options8);
|
|
20604
20622
|
return doc2;
|
|
20605
20623
|
function mainPrint(selector, args) {
|
|
20606
|
-
if (selector ===
|
|
20624
|
+
if (selector === undefined || selector === path132) {
|
|
20607
20625
|
return mainPrintInternal(args);
|
|
20608
20626
|
}
|
|
20609
20627
|
if (Array.isArray(selector)) {
|
|
@@ -20614,10 +20632,10 @@ async function printAstToDoc(ast, options8) {
|
|
|
20614
20632
|
function mainPrintInternal(args) {
|
|
20615
20633
|
ensurePrintingNode(path132);
|
|
20616
20634
|
const value = path132.node;
|
|
20617
|
-
if (value ===
|
|
20635
|
+
if (value === undefined || value === null) {
|
|
20618
20636
|
return "";
|
|
20619
20637
|
}
|
|
20620
|
-
const shouldCache = value && typeof value === "object" && args ===
|
|
20638
|
+
const shouldCache = value && typeof value === "object" && args === undefined;
|
|
20621
20639
|
if (shouldCache && cache3.has(value)) {
|
|
20622
20640
|
return cache3.get(value);
|
|
20623
20641
|
}
|
|
@@ -20633,7 +20651,7 @@ function callPluginPrintFunction(path132, options8, printPath, args, embeds) {
|
|
|
20633
20651
|
const { node } = path132;
|
|
20634
20652
|
const { printer: printer2 } = options8;
|
|
20635
20653
|
let doc2;
|
|
20636
|
-
if ((_a = printer2.hasPrettierIgnore) == null ?
|
|
20654
|
+
if ((_a = printer2.hasPrettierIgnore) == null ? undefined : _a.call(printer2, path132)) {
|
|
20637
20655
|
doc2 = print_ignored_default(path132, options8);
|
|
20638
20656
|
} else if (embeds.has(node)) {
|
|
20639
20657
|
doc2 = embeds.get(node);
|
|
@@ -20714,7 +20732,7 @@ function dropRootParents(parents) {
|
|
|
20714
20732
|
let lastParentIndex = parents.length - 1;
|
|
20715
20733
|
for (; ; ) {
|
|
20716
20734
|
const parent = parents[lastParentIndex];
|
|
20717
|
-
if ((parent == null ?
|
|
20735
|
+
if ((parent == null ? undefined : parent.type) === "Program" || (parent == null ? undefined : parent.type) === "File") {
|
|
20718
20736
|
lastParentIndex--;
|
|
20719
20737
|
} else {
|
|
20720
20738
|
break;
|
|
@@ -20785,7 +20803,7 @@ function isSourceElement(opts, node, parentNode) {
|
|
|
20785
20803
|
case "espree":
|
|
20786
20804
|
case "meriyah":
|
|
20787
20805
|
case "__babel_estree":
|
|
20788
|
-
return isJsSourceElement(node.type, parentNode == null ?
|
|
20806
|
+
return isJsSourceElement(node.type, parentNode == null ? undefined : parentNode.type);
|
|
20789
20807
|
case "json":
|
|
20790
20808
|
case "json5":
|
|
20791
20809
|
case "jsonc":
|
|
@@ -20847,7 +20865,7 @@ async function coreFormat(originalText, opts, addAlignmentSize = 0) {
|
|
|
20847
20865
|
const result = printDocToString2(doc2, opts);
|
|
20848
20866
|
if (addAlignmentSize > 0) {
|
|
20849
20867
|
const trimmed = result.formatted.trim();
|
|
20850
|
-
if (result.cursorNodeStart !==
|
|
20868
|
+
if (result.cursorNodeStart !== undefined) {
|
|
20851
20869
|
result.cursorNodeStart -= result.formatted.indexOf(trimmed);
|
|
20852
20870
|
}
|
|
20853
20871
|
result.formatted = trimmed + convertEndOfLineToChars2(opts.endOfLine);
|
|
@@ -21046,7 +21064,7 @@ var languages_evaluate_default4 = [{ "linguistLanguageId": 146, "name": "Angular
|
|
|
21046
21064
|
var CATEGORY_HTML = "HTML";
|
|
21047
21065
|
var options3 = { bracketSameLine: common_options_evaluate_default.bracketSameLine, htmlWhitespaceSensitivity: { category: CATEGORY_HTML, type: "choice", default: "css", description: "How to handle whitespaces in HTML.", choices: [{ value: "css", description: "Respect the default value of CSS display property." }, { value: "strict", description: "Whitespaces are considered sensitive." }, { value: "ignore", description: "Whitespaces are considered insensitive." }] }, singleAttributePerLine: common_options_evaluate_default.singleAttributePerLine, vueIndentScriptAndStyle: { category: CATEGORY_HTML, type: "boolean", default: false, description: "Indent script and style tags in Vue files." } };
|
|
21048
21066
|
var options_default3 = options3;
|
|
21049
|
-
var languages_evaluate_default5 = [{ "linguistLanguageId": 183, "name": "JavaScript", "type": "programming", "tmScope": "source.js", "aceMode": "javascript", "codemirrorMode": "javascript", "codemirrorMimeType": "text/javascript", "color": "#f1e05a", "aliases": ["js", "node"], "extensions": [".js", "._js", ".bones", ".cjs", ".es", ".es6", ".frag", ".gs", ".jake", ".javascript", ".jsb", ".jscad", ".jsfl", ".jslib", ".jsm", ".jspre", ".jss", ".mjs", ".njs", ".pac", ".sjs", ".ssjs", ".xsjs", ".xsjslib", ".wxs"], "filenames": ["Jakefile"], "interpreters": ["chakra", "d8", "gjs", "js", "node", "nodejs", "qjs", "rhino", "v8", "v8-shell", "zx"], "parsers": ["babel", "acorn", "espree", "meriyah", "babel-flow", "babel-ts", "flow", "typescript"], "vscodeLanguageIds": ["javascript", "mongo"] }, { "linguistLanguageId": 183, "name": "Flow", "type": "programming", "tmScope": "source.js", "aceMode": "javascript", "codemirrorMode": "javascript", "codemirrorMimeType": "text/javascript", "color": "#f1e05a", "aliases": [], "extensions": [".js.flow"], "filenames": [], "interpreters": ["chakra", "d8", "gjs", "js", "node", "nodejs", "qjs", "rhino", "v8", "v8-shell"], "parsers": ["flow", "babel-flow"], "vscodeLanguageIds": ["javascript"] }, { "linguistLanguageId": 183, "name": "JSX", "type": "programming", "tmScope": "source.js.jsx", "aceMode": "javascript", "codemirrorMode": "jsx", "codemirrorMimeType": "text/jsx", "color":
|
|
21067
|
+
var languages_evaluate_default5 = [{ "linguistLanguageId": 183, "name": "JavaScript", "type": "programming", "tmScope": "source.js", "aceMode": "javascript", "codemirrorMode": "javascript", "codemirrorMimeType": "text/javascript", "color": "#f1e05a", "aliases": ["js", "node"], "extensions": [".js", "._js", ".bones", ".cjs", ".es", ".es6", ".frag", ".gs", ".jake", ".javascript", ".jsb", ".jscad", ".jsfl", ".jslib", ".jsm", ".jspre", ".jss", ".mjs", ".njs", ".pac", ".sjs", ".ssjs", ".xsjs", ".xsjslib", ".wxs"], "filenames": ["Jakefile"], "interpreters": ["chakra", "d8", "gjs", "js", "node", "nodejs", "qjs", "rhino", "v8", "v8-shell", "zx"], "parsers": ["babel", "acorn", "espree", "meriyah", "babel-flow", "babel-ts", "flow", "typescript"], "vscodeLanguageIds": ["javascript", "mongo"] }, { "linguistLanguageId": 183, "name": "Flow", "type": "programming", "tmScope": "source.js", "aceMode": "javascript", "codemirrorMode": "javascript", "codemirrorMimeType": "text/javascript", "color": "#f1e05a", "aliases": [], "extensions": [".js.flow"], "filenames": [], "interpreters": ["chakra", "d8", "gjs", "js", "node", "nodejs", "qjs", "rhino", "v8", "v8-shell"], "parsers": ["flow", "babel-flow"], "vscodeLanguageIds": ["javascript"] }, { "linguistLanguageId": 183, "name": "JSX", "type": "programming", "tmScope": "source.js.jsx", "aceMode": "javascript", "codemirrorMode": "jsx", "codemirrorMimeType": "text/jsx", "color": undefined, "aliases": undefined, "extensions": [".jsx"], "filenames": undefined, "interpreters": undefined, "parsers": ["babel", "babel-flow", "babel-ts", "flow", "typescript", "espree", "meriyah"], "vscodeLanguageIds": ["javascriptreact"], "group": "JavaScript" }, { "linguistLanguageId": 378, "name": "TypeScript", "type": "programming", "color": "#3178c6", "aliases": ["ts"], "interpreters": ["deno", "ts-node"], "extensions": [".ts", ".cts", ".mts"], "tmScope": "source.ts", "aceMode": "typescript", "codemirrorMode": "javascript", "codemirrorMimeType": "application/typescript", "parsers": ["typescript", "babel-ts"], "vscodeLanguageIds": ["typescript"] }, { "linguistLanguageId": 94901924, "name": "TSX", "type": "programming", "color": "#3178c6", "group": "TypeScript", "extensions": [".tsx"], "tmScope": "source.tsx", "aceMode": "javascript", "codemirrorMode": "jsx", "codemirrorMimeType": "text/jsx", "parsers": ["typescript", "babel-ts"], "vscodeLanguageIds": ["typescriptreact"] }];
|
|
21050
21068
|
var CATEGORY_JAVASCRIPT = "JavaScript";
|
|
21051
21069
|
var options4 = { arrowParens: { category: CATEGORY_JAVASCRIPT, type: "choice", default: "always", description: "Include parentheses around a sole arrow function parameter.", choices: [{ value: "always", description: "Always include parens. Example: `(x) => x`" }, { value: "avoid", description: "Omit parens when possible. Example: `x => x`" }] }, bracketSameLine: common_options_evaluate_default.bracketSameLine, bracketSpacing: common_options_evaluate_default.bracketSpacing, jsxBracketSameLine: { category: CATEGORY_JAVASCRIPT, type: "boolean", description: "Put > on the last line instead of at a new line.", deprecated: "2.4.0" }, semi: { category: CATEGORY_JAVASCRIPT, type: "boolean", default: true, description: "Print semicolons.", oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." }, experimentalTernaries: { category: CATEGORY_JAVASCRIPT, type: "boolean", default: false, description: "Use curious ternaries, with the question mark after the condition.", oppositeDescription: "Default behavior of ternaries; keep question marks on the same line as the consequent." }, singleQuote: common_options_evaluate_default.singleQuote, jsxSingleQuote: { category: CATEGORY_JAVASCRIPT, type: "boolean", default: false, description: "Use single quotes in JSX." }, quoteProps: { category: CATEGORY_JAVASCRIPT, type: "choice", default: "as-needed", description: "Change when properties in objects are quoted.", choices: [{ value: "as-needed", description: "Only add quotes around object properties where required." }, { value: "consistent", description: "If at least one property in an object requires quotes, quote all properties." }, { value: "preserve", description: "Respect the input use of quotes in object properties." }] }, trailingComma: { category: CATEGORY_JAVASCRIPT, type: "choice", default: "all", description: "Print trailing commas wherever possible when multi-line.", choices: [{ value: "all", description: "Trailing commas wherever possible (including function arguments)." }, { value: "es5", description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" }, { value: "none", description: "No trailing commas." }] }, singleAttributePerLine: common_options_evaluate_default.singleAttributePerLine };
|
|
21052
21070
|
var options_default4 = options4;
|
|
@@ -21078,7 +21096,7 @@ function createParsersAndPrinters(modules) {
|
|
|
21078
21096
|
}
|
|
21079
21097
|
var options7 = { ...options_default, ...options_default2, ...options_default3, ...options_default4, ...options_default5, ...options_default6 };
|
|
21080
21098
|
var languages = [...languages_evaluate_default, ...languages_evaluate_default2, ...languages_evaluate_default3, ...languages_evaluate_default4, ...languages_evaluate_default5, ...languages_evaluate_default6, ...languages_evaluate_default7, ...languages_evaluate_default8];
|
|
21081
|
-
var { parsers, printers } = createParsersAndPrinters([{ importPlugin: () => import('./acorn-
|
|
21099
|
+
var { parsers, printers } = createParsersAndPrinters([{ importPlugin: () => import('./acorn-RXMSUCXL.js'), parsers: ["acorn", "espree"] }, { importPlugin: () => import('./angular-ZXAN5BMN.js'), parsers: ["__ng_action", "__ng_binding", "__ng_interpolation", "__ng_directive"] }, { importPlugin: () => import('./babel-TI7T67T2.js'), parsers: ["babel", "babel-flow", "babel-ts", "__js_expression", "__ts_expression", "__vue_expression", "__vue_ts_expression", "__vue_event_binding", "__vue_ts_event_binding", "__babel_estree", "json", "json5", "jsonc", "json-stringify"] }, { importPlugin: () => import('./estree-CSIG7D6Y.js'), printers: ["estree", "estree-json"] }, { importPlugin: () => import('./flow-NUNWZLRW.js'), parsers: ["flow"] }, { importPlugin: () => import('./glimmer-GYUSOBQY.js'), parsers: ["glimmer"], printers: ["glimmer"] }, { importPlugin: () => import('./graphql-OALHBC5M.js'), parsers: ["graphql"], printers: ["graphql"] }, { importPlugin: () => import('./html-4RLNYFM4.js'), parsers: ["html", "angular", "vue", "lwc"], printers: ["html"] }, { importPlugin: () => import('./markdown-MRACSGE5.js'), parsers: ["markdown", "mdx", "remark"], printers: ["mdast"] }, { importPlugin: () => import('./meriyah-LVMHXIGF.js'), parsers: ["meriyah"] }, { importPlugin: () => import('./postcss-A2ITI5N4.js'), parsers: ["css", "less", "scss"], printers: ["postcss"] }, { importPlugin: () => import('./typescript-BMNHHGAA.js'), parsers: ["typescript"] }, { importPlugin: () => import('./yaml-XQ236J4T.js'), parsers: ["yaml"], printers: ["yaml"] }]);
|
|
21082
21100
|
function loadBuiltinPlugins() {
|
|
21083
21101
|
return [builtin_plugins_proxy_exports];
|
|
21084
21102
|
}
|
|
@@ -21408,12 +21426,12 @@ async function generatePerActionDataFiles({
|
|
|
21408
21426
|
ontology: enhancedOntology,
|
|
21409
21427
|
forInternalUse = false
|
|
21410
21428
|
}) {
|
|
21411
|
-
const outDir =
|
|
21429
|
+
const outDir = path19__default.join(rootOutDir, "ontology", "actions");
|
|
21412
21430
|
await fs9.mkdir(outDir, {
|
|
21413
21431
|
recursive: true
|
|
21414
21432
|
});
|
|
21415
21433
|
await Promise.all(Object.values(enhancedOntology.actionTypes).map(async (action) => {
|
|
21416
|
-
const currentFilePath =
|
|
21434
|
+
const currentFilePath = path19__default.join("ontology", "actions", `${action.shortApiName}.ts`);
|
|
21417
21435
|
const uniqueApiNamesArray = extractReferencedObjectsFromAction(action.raw);
|
|
21418
21436
|
const uniqueApiNames = new Set(uniqueApiNamesArray);
|
|
21419
21437
|
stringUnionFrom([...uniqueApiNames]);
|
|
@@ -21430,7 +21448,7 @@ async function generatePerActionDataFiles({
|
|
|
21430
21448
|
${entries.map(([key2, value]) => {
|
|
21431
21449
|
return `"${key2}": {
|
|
21432
21450
|
${stringify(value, {
|
|
21433
|
-
description: (value2, d) => value2 ? d(value2) :
|
|
21451
|
+
description: (value2, d) => value2 ? d(value2) : undefined,
|
|
21434
21452
|
// trick to remove undefineds
|
|
21435
21453
|
type: (type2) => {
|
|
21436
21454
|
if (typeof type2 === "string") {
|
|
@@ -21447,7 +21465,7 @@ async function generatePerActionDataFiles({
|
|
|
21447
21465
|
} else if (type2.type === "struct") {
|
|
21448
21466
|
return `ActionMetadata.DataType.Struct<${JSON.stringify(type2.struct)}>`;
|
|
21449
21467
|
}
|
|
21450
|
-
return
|
|
21468
|
+
return undefined;
|
|
21451
21469
|
}
|
|
21452
21470
|
})}
|
|
21453
21471
|
}`;
|
|
@@ -21498,8 +21516,8 @@ async function generatePerActionDataFiles({
|
|
|
21498
21516
|
}
|
|
21499
21517
|
}
|
|
21500
21518
|
}
|
|
21501
|
-
const imports = getObjectImports(referencedObjectDefs,
|
|
21502
|
-
await fs9.writeFile(
|
|
21519
|
+
const imports = getObjectImports(referencedObjectDefs, undefined, currentFilePath, true);
|
|
21520
|
+
await fs9.writeFile(path19__default.join(rootOutDir, currentFilePath), await formatTs(`
|
|
21503
21521
|
import type {
|
|
21504
21522
|
ActionDefinition,
|
|
21505
21523
|
ActionMetadata,
|
|
@@ -21558,12 +21576,12 @@ async function generatePerActionDataFiles({
|
|
|
21558
21576
|
signatures: ${action.shortApiName}.Signatures;
|
|
21559
21577
|
},
|
|
21560
21578
|
${stringify(fullActionDef, {
|
|
21561
|
-
"description": () =>
|
|
21562
|
-
"displayName": () =>
|
|
21563
|
-
"modifiedEntities": () =>
|
|
21564
|
-
"parameters": () =>
|
|
21565
|
-
"rid": () =>
|
|
21566
|
-
"status": () =>
|
|
21579
|
+
"description": () => undefined,
|
|
21580
|
+
"displayName": () => undefined,
|
|
21581
|
+
"modifiedEntities": () => undefined,
|
|
21582
|
+
"parameters": () => undefined,
|
|
21583
|
+
"rid": () => undefined,
|
|
21584
|
+
"status": () => undefined
|
|
21567
21585
|
})}
|
|
21568
21586
|
osdkMetadata: typeof $osdkMetadata;
|
|
21569
21587
|
}
|
|
@@ -21574,12 +21592,12 @@ async function generatePerActionDataFiles({
|
|
|
21574
21592
|
return ` export const ${action.shortApiName}: ${action.shortApiName} =
|
|
21575
21593
|
{
|
|
21576
21594
|
${stringify(fullActionDef, {
|
|
21577
|
-
"description": () =>
|
|
21578
|
-
"displayName": () =>
|
|
21579
|
-
"modifiedEntities": () =>
|
|
21580
|
-
"parameters": () =>
|
|
21581
|
-
"rid": () =>
|
|
21582
|
-
"status": () =>
|
|
21595
|
+
"description": () => undefined,
|
|
21596
|
+
"displayName": () => undefined,
|
|
21597
|
+
"modifiedEntities": () => undefined,
|
|
21598
|
+
"parameters": () => undefined,
|
|
21599
|
+
"rid": () => undefined,
|
|
21600
|
+
"status": () => undefined
|
|
21583
21601
|
})},
|
|
21584
21602
|
osdkMetadata: $osdkMetadata
|
|
21585
21603
|
}
|
|
@@ -21587,8 +21605,8 @@ async function generatePerActionDataFiles({
|
|
|
21587
21605
|
}()}
|
|
21588
21606
|
`));
|
|
21589
21607
|
}));
|
|
21590
|
-
const indexFileRelPath =
|
|
21591
|
-
await fs9.writeFile(
|
|
21608
|
+
const indexFileRelPath = path19__default.join("ontology", "actions.ts");
|
|
21609
|
+
await fs9.writeFile(path19__default.join(rootOutDir, indexFileRelPath), await formatTs(`
|
|
21592
21610
|
${Object.values(enhancedOntology.actionTypes).map((action) => {
|
|
21593
21611
|
const exportConstLine = `export {${action.shortApiName} } from "${action.getImportPathRelTo(indexFileRelPath)}";`;
|
|
21594
21612
|
return exportConstLine;
|
|
@@ -21633,7 +21651,7 @@ function extractReferencedObjectsFromActionParameter(actionParameter) {
|
|
|
21633
21651
|
case "integer":
|
|
21634
21652
|
case "long":
|
|
21635
21653
|
case "timestamp":
|
|
21636
|
-
return
|
|
21654
|
+
return undefined;
|
|
21637
21655
|
}
|
|
21638
21656
|
}
|
|
21639
21657
|
|
|
@@ -21910,9 +21928,9 @@ function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology,
|
|
|
21910
21928
|
}
|
|
21911
21929
|
for (const apiName of Object.keys(parent.properties)) {
|
|
21912
21930
|
if (definition.properties[apiName] != null) {
|
|
21913
|
-
!(0, import_fast_deep_equal.default)(definition.properties[apiName], parent.properties[apiName]) ? process.env.NODE_ENV !== "production" ? process.env.NODE_ENV !== "production" ? invariant(false, `Interface ${definition.apiName} redefines property '${apiName}' from parent '${parent.apiName}' but the properties do not match`) : invariant() : process.env.NODE_ENV !== "production" ? invariant() : invariant() :
|
|
21931
|
+
!(0, import_fast_deep_equal.default)(definition.properties[apiName], parent.properties[apiName]) ? process.env.NODE_ENV !== "production" ? process.env.NODE_ENV !== "production" ? invariant(false, `Interface ${definition.apiName} redefines property '${apiName}' from parent '${parent.apiName}' but the properties do not match`) : invariant() : process.env.NODE_ENV !== "production" ? invariant() : invariant() : undefined;
|
|
21914
21932
|
} else if (mergedProperties[apiName] != null) {
|
|
21915
|
-
!(0, import_fast_deep_equal.default)(mergedProperties[apiName], parent.properties[apiName]) ? process.env.NODE_ENV !== "production" ? process.env.NODE_ENV !== "production" ? invariant(false, `Some interface defines a conflicting property '${apiName}' that does not match property from parent '${parent.apiName}'`) : invariant() : process.env.NODE_ENV !== "production" ? invariant() : invariant() :
|
|
21933
|
+
!(0, import_fast_deep_equal.default)(mergedProperties[apiName], parent.properties[apiName]) ? process.env.NODE_ENV !== "production" ? process.env.NODE_ENV !== "production" ? invariant(false, `Some interface defines a conflicting property '${apiName}' that does not match property from parent '${parent.apiName}'`) : invariant() : process.env.NODE_ENV !== "production" ? invariant() : invariant() : undefined;
|
|
21916
21934
|
}
|
|
21917
21935
|
mergedProperties[apiName] = parent.properties[apiName];
|
|
21918
21936
|
}
|
|
@@ -21995,13 +22013,13 @@ async function generatePerInterfaceDataFiles({
|
|
|
21995
22013
|
importExt,
|
|
21996
22014
|
forInternalUse
|
|
21997
22015
|
}) {
|
|
21998
|
-
const interfacesDir =
|
|
22016
|
+
const interfacesDir = path19__default.join(outDir, "ontology", "interfaces");
|
|
21999
22017
|
await fs9.mkdir(interfacesDir, {
|
|
22000
22018
|
recursive: true
|
|
22001
22019
|
});
|
|
22002
22020
|
for (const obj of Object.values(ontology.interfaceTypes)) {
|
|
22003
22021
|
if (obj instanceof ForeignType) continue;
|
|
22004
|
-
await fs9.writeFile(
|
|
22022
|
+
await fs9.writeFile(path19__default.join(interfacesDir, `${obj.shortApiName}.ts`), await formatTs(`
|
|
22005
22023
|
import type { PropertyDef as $PropertyDef } from "${forInternalUse ? "@osdk/api" : "@osdk/client"}";
|
|
22006
22024
|
import { $osdkMetadata } from "../../OntologyMetadata${importExt}";
|
|
22007
22025
|
${__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(obj, ontology, true, forInternalUse)}
|
|
@@ -22022,13 +22040,13 @@ async function generatePerObjectDataFiles(ctx) {
|
|
|
22022
22040
|
ontology,
|
|
22023
22041
|
importExt
|
|
22024
22042
|
} = ctx;
|
|
22025
|
-
await fs9.mkdir(
|
|
22043
|
+
await fs9.mkdir(path19__default.join(outDir, "ontology", "objects"), {
|
|
22026
22044
|
recursive: true
|
|
22027
22045
|
});
|
|
22028
22046
|
for (const obj of Object.values(ontology.objectTypes)) {
|
|
22029
22047
|
if (obj instanceof ForeignType) continue;
|
|
22030
|
-
const relPath =
|
|
22031
|
-
const outFilePath =
|
|
22048
|
+
const relPath = path19__default.join(".", "ontology", `objects`, `${obj.shortApiName}.ts`);
|
|
22049
|
+
const outFilePath = path19__default.join(outDir, relPath);
|
|
22032
22050
|
await fs9.writeFile(outFilePath, await formatTs(`
|
|
22033
22051
|
import type { PropertyDef as $PropertyDef } from "${ctx.forInternalUse ? "@osdk/api" : "@osdk/client"}";
|
|
22034
22052
|
import { $osdkMetadata } from "../../OntologyMetadata${importExt}";
|
|
@@ -22036,7 +22054,7 @@ async function generatePerObjectDataFiles(ctx) {
|
|
|
22036
22054
|
${wireObjectTypeV2ToSdkObjectConstV2(obj.raw, ctx, relPath)}
|
|
22037
22055
|
`));
|
|
22038
22056
|
}
|
|
22039
|
-
await fs9.writeFile(
|
|
22057
|
+
await fs9.writeFile(path19__default.join(outDir, "ontology", "objects.ts"), await formatTs(`
|
|
22040
22058
|
${Object.values(ctx.ontology.objectTypes).filter((o) => o instanceof EnhancedObjectType).map((objType) => `export {${objType.shortApiName}} from "./objects/${objType.shortApiName}${importExt}";`).join("\n")}
|
|
22041
22059
|
${Object.keys(ontology.objectTypes).length === 0 ? "export {};" : ""}
|
|
22042
22060
|
`));
|
|
@@ -22072,6 +22090,10 @@ function getObjectTypesFromQueryDataType(dataType, types) {
|
|
|
22072
22090
|
getObjectTypesFromQueryDataType(type2, types);
|
|
22073
22091
|
}
|
|
22074
22092
|
return;
|
|
22093
|
+
case "entrySet":
|
|
22094
|
+
getObjectTypesFromQueryDataType(dataType.keyType, types);
|
|
22095
|
+
getObjectTypesFromQueryDataType(dataType.valueType, types);
|
|
22096
|
+
return;
|
|
22075
22097
|
case "attachment":
|
|
22076
22098
|
case "boolean":
|
|
22077
22099
|
case "date":
|
|
@@ -22084,6 +22106,7 @@ function getObjectTypesFromQueryDataType(dataType, types) {
|
|
|
22084
22106
|
case "threeDimensionalAggregation":
|
|
22085
22107
|
case "timestamp":
|
|
22086
22108
|
case "twoDimensionalAggregation":
|
|
22109
|
+
case "entrySet":
|
|
22087
22110
|
case "unsupported":
|
|
22088
22111
|
return;
|
|
22089
22112
|
default:
|
|
@@ -22111,8 +22134,8 @@ async function generatePerQueryDataFilesV2({
|
|
|
22111
22134
|
importExt = "",
|
|
22112
22135
|
forInternalUse = false
|
|
22113
22136
|
}) {
|
|
22114
|
-
const relOutDir =
|
|
22115
|
-
const outDir =
|
|
22137
|
+
const relOutDir = path19__default.join(".", "ontology", "queries");
|
|
22138
|
+
const outDir = path19__default.join(rootOutDir, "ontology", "queries");
|
|
22116
22139
|
await fs9.mkdir(outDir, {
|
|
22117
22140
|
recursive: true
|
|
22118
22141
|
});
|
|
@@ -22125,15 +22148,15 @@ async function generatePerQueryDataFilesV2({
|
|
|
22125
22148
|
`));
|
|
22126
22149
|
}
|
|
22127
22150
|
async function generateV2QueryFile(fs9, outDir, relOutDir, query, importExt, ontology, forInternalUse) {
|
|
22128
|
-
const relFilePath =
|
|
22151
|
+
const relFilePath = path19__default.join(relOutDir, `${query.shortApiName}.ts`);
|
|
22129
22152
|
const objectTypes = getObjectTypeApiNamesFromQuery(query);
|
|
22130
22153
|
const objectTypeObjects = new Set(objectTypes.map((o) => ontology.requireObjectType(o)));
|
|
22131
22154
|
const importObjects = getObjectImports(objectTypeObjects, "", relFilePath, true);
|
|
22132
22155
|
const baseProps = deleteUndefineds(wireQueryTypeV2ToSdkQueryDefinitionNoParams(query.raw));
|
|
22133
22156
|
const outputBase = deleteUndefineds(wireQueryDataTypeToQueryDataTypeDefinition(query.output));
|
|
22134
22157
|
objectTypes.length > 0 ? objectTypes.map((apiNameObj) => `"${apiNameObj}"`).join("|") : "never";
|
|
22135
|
-
await fs9.writeFile(
|
|
22136
|
-
import type { QueryDefinition
|
|
22158
|
+
await fs9.writeFile(path19__default.join(outDir, `${query.shortApiName}.ts`), await formatTs(`
|
|
22159
|
+
import type { ObjectSpecifier, QueryDefinition, QueryParam, QueryResult, VersionBound} from "${forInternalUse ? "@osdk/api" : "@osdk/client"}";
|
|
22137
22160
|
import type { $ExpectedClientVersion } from "../../OntologyMetadata${importExt}";
|
|
22138
22161
|
import { $osdkMetadata} from "../../OntologyMetadata${importExt}";
|
|
22139
22162
|
${importObjects}
|
|
@@ -22185,9 +22208,9 @@ async function generateV2QueryFile(fs9, outDir, relOutDir, query, importExt, ont
|
|
|
22185
22208
|
signature: ${query.shortApiName}.Signature;
|
|
22186
22209
|
},
|
|
22187
22210
|
${stringify(baseProps, {
|
|
22188
|
-
"description": () =>
|
|
22189
|
-
"displayName": () =>
|
|
22190
|
-
"rid": () =>
|
|
22211
|
+
"description": () => undefined,
|
|
22212
|
+
"displayName": () => undefined,
|
|
22213
|
+
"rid": () => undefined
|
|
22191
22214
|
})},
|
|
22192
22215
|
osdkMetadata: typeof $osdkMetadata;
|
|
22193
22216
|
}
|
|
@@ -22195,9 +22218,9 @@ async function generateV2QueryFile(fs9, outDir, relOutDir, query, importExt, ont
|
|
|
22195
22218
|
|
|
22196
22219
|
export const ${query.shortApiName}: ${query.definitionIdentifier} = {
|
|
22197
22220
|
${stringify(baseProps, {
|
|
22198
|
-
"description": () =>
|
|
22199
|
-
"displayName": () =>
|
|
22200
|
-
"rid": () =>
|
|
22221
|
+
"description": () => undefined,
|
|
22222
|
+
"displayName": () => undefined,
|
|
22223
|
+
"rid": () => undefined
|
|
22201
22224
|
})},
|
|
22202
22225
|
osdkMetadata: $osdkMetadata
|
|
22203
22226
|
};
|
|
@@ -22237,7 +22260,7 @@ function queryParamJsDoc(param, {
|
|
|
22237
22260
|
`;
|
|
22238
22261
|
return ret;
|
|
22239
22262
|
}
|
|
22240
|
-
function getQueryParamType(enhancedOntology, input, type2) {
|
|
22263
|
+
function getQueryParamType(enhancedOntology, input, type2, isMapKey = false) {
|
|
22241
22264
|
let inner = `unknown /* ${input.type} */`;
|
|
22242
22265
|
switch (input.type) {
|
|
22243
22266
|
case "date":
|
|
@@ -22271,6 +22294,10 @@ function getQueryParamType(enhancedOntology, input, type2) {
|
|
|
22271
22294
|
"${input.threeDimensionalAggregation.valueType.valueType}">`;
|
|
22272
22295
|
break;
|
|
22273
22296
|
case "object":
|
|
22297
|
+
if (isMapKey) {
|
|
22298
|
+
inner = `ObjectSpecifier<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;
|
|
22299
|
+
break;
|
|
22300
|
+
}
|
|
22274
22301
|
inner = `Query${type2}.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;
|
|
22275
22302
|
break;
|
|
22276
22303
|
case "objectSet":
|
|
@@ -22282,6 +22309,8 @@ function getQueryParamType(enhancedOntology, input, type2) {
|
|
|
22282
22309
|
case "union":
|
|
22283
22310
|
inner = input.union.map((u) => getQueryParamType(enhancedOntology, u, type2)).join(" | ");
|
|
22284
22311
|
break;
|
|
22312
|
+
case "map":
|
|
22313
|
+
inner = `Record<${getQueryParamType(enhancedOntology, input.keyType, type2, true)}, ${getQueryParamType(enhancedOntology, input.valueType, type2)}>`;
|
|
22285
22314
|
}
|
|
22286
22315
|
if (input.multiplicity && type2 === "Param") {
|
|
22287
22316
|
return `ReadonlyArray<${inner}>`;
|
|
@@ -22300,7 +22329,7 @@ async function generateRootIndexTsFile({
|
|
|
22300
22329
|
ontologyApiNamespace,
|
|
22301
22330
|
ontology
|
|
22302
22331
|
}) {
|
|
22303
|
-
await fs9.writeFile(
|
|
22332
|
+
await fs9.writeFile(path19__default.join(outDir, "index.ts"), await formatTs(`export {${helper(ontology.actionTypes)}} from "./ontology/actions${importExt}";
|
|
22304
22333
|
export * as $Actions from "./ontology/actions${importExt}";
|
|
22305
22334
|
export {${helper(ontology.interfaceTypes)}} from "./ontology/interfaces${importExt}";
|
|
22306
22335
|
export * as $Interfaces from "./ontology/interfaces${importExt}";
|
|
@@ -22354,24 +22383,24 @@ async function generateClientSdkPackage(packageName, packageVersion, sdkVersion,
|
|
|
22354
22383
|
throw new Error("This generator version does not support generating v1 sdks");
|
|
22355
22384
|
}
|
|
22356
22385
|
for (const packageType of ["module", "commonjs"]) {
|
|
22357
|
-
const outDir =
|
|
22386
|
+
const outDir = path19.join(baseOutDir, "dist", packageType);
|
|
22358
22387
|
await generateClientSdkVersionTwoPointZero(ontology, `typescript-sdk/${packageVersion} osdk-cli/${cliVersion}`, minimalFs, outDir, packageType, externalObjects, externalInterfaces);
|
|
22359
22388
|
await fs8.promises.mkdir(outDir, {
|
|
22360
22389
|
recursive: true
|
|
22361
22390
|
});
|
|
22362
|
-
await writeJson(minimalFs,
|
|
22391
|
+
await writeJson(minimalFs, path19.join(outDir, "package.json"), {
|
|
22363
22392
|
type: packageType
|
|
22364
22393
|
});
|
|
22365
|
-
await writeJson(minimalFs,
|
|
22394
|
+
await writeJson(minimalFs, path19.join(outDir, `tsconfig.json`), {
|
|
22366
22395
|
compilerOptions: getTsCompilerOptions(packageType)
|
|
22367
22396
|
});
|
|
22368
22397
|
}
|
|
22369
|
-
await writeJson(minimalFs,
|
|
22370
|
-
await minimalFs.mkdir(
|
|
22398
|
+
await writeJson(minimalFs, path19.join(baseOutDir, "package.json"), getPackageJsonContents(packageName, packageVersion, dependencyVersions));
|
|
22399
|
+
await minimalFs.mkdir(path19.join(baseOutDir, "ontology"), {
|
|
22371
22400
|
recursive: true
|
|
22372
22401
|
});
|
|
22373
|
-
await minimalFs.writeFile(
|
|
22374
|
-
await minimalFs.writeFile(
|
|
22402
|
+
await minimalFs.writeFile(path19.join(baseOutDir, "ontology", "objects.js"), `module.exports = require("../../dist/module/ontology/objects")`);
|
|
22403
|
+
await minimalFs.writeFile(path19.join(baseOutDir, "ontology", "objects.d.ts"), `export * from "../dist/module/ontology/objects"`);
|
|
22375
22404
|
}
|
|
22376
22405
|
function getTsCompilerOptions(packageType) {
|
|
22377
22406
|
const commonTsconfig = {
|
|
@@ -22450,7 +22479,7 @@ function getPackageJsonContents(name, version, dependencyVersions) {
|
|
|
22450
22479
|
};
|
|
22451
22480
|
}
|
|
22452
22481
|
async function writeJson(minimalFs, filePath, body) {
|
|
22453
|
-
return void await minimalFs.writeFile(filePath, JSON.stringify(body,
|
|
22482
|
+
return void await minimalFs.writeFile(filePath, JSON.stringify(body, undefined, 2) + "\n");
|
|
22454
22483
|
}
|
|
22455
22484
|
|
|
22456
22485
|
// ../shared.client.impl/build/esm/index.js
|
|
@@ -22485,7 +22514,7 @@ function createSharedClientContext(baseUrl, tokenProvider, userAgent, fetchFn =
|
|
|
22485
22514
|
|
|
22486
22515
|
// ../cli.cmd.typescript/build/esm/generate/handleGenerate.mjs
|
|
22487
22516
|
var import_fast_deep_equal2 = __toESM(require_fast_deep_equal(), 1);
|
|
22488
|
-
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.26.0-beta.
|
|
22517
|
+
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.26.0-beta.8"}`;
|
|
22489
22518
|
async function handleGenerate(args) {
|
|
22490
22519
|
let success = false;
|
|
22491
22520
|
if (args.ontologyPath) {
|
|
@@ -22621,7 +22650,7 @@ async function generateClientSdk(ontology, args) {
|
|
|
22621
22650
|
}
|
|
22622
22651
|
return true;
|
|
22623
22652
|
}
|
|
22624
|
-
await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.26.0-beta.
|
|
22653
|
+
await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.26.0-beta.8", args.externalObjects, args.externalInterfaces);
|
|
22625
22654
|
return true;
|
|
22626
22655
|
} catch (e) {
|
|
22627
22656
|
consola.error("OSDK generation failed", e.message, e.stack);
|
|
@@ -22648,15 +22677,15 @@ async function getDependencyVersions() {
|
|
|
22648
22677
|
typescriptVersion,
|
|
22649
22678
|
tslibVersion,
|
|
22650
22679
|
areTheTypesWrongVersion,
|
|
22651
|
-
osdkApiVersion: `^${"2.2.0-beta.
|
|
22652
|
-
osdkClientVersion: `^${"2.2.0-beta.
|
|
22680
|
+
osdkApiVersion: `^${"2.2.0-beta.8"}`,
|
|
22681
|
+
osdkClientVersion: `^${"2.2.0-beta.8"}`,
|
|
22653
22682
|
osdkLegacyClientVersion
|
|
22654
22683
|
};
|
|
22655
22684
|
}
|
|
22656
22685
|
var cachedOurPackageJsonPath;
|
|
22657
22686
|
async function getOurPackageJsonPath() {
|
|
22658
22687
|
if (cachedOurPackageJsonPath) return cachedOurPackageJsonPath;
|
|
22659
|
-
const __dir =
|
|
22688
|
+
const __dir = path19.dirname(fileURLToPath$1(import.meta.url));
|
|
22660
22689
|
const ourPackageJsonPath = await findUp("package.json", {
|
|
22661
22690
|
cwd: __dir
|
|
22662
22691
|
});
|
|
@@ -22688,5 +22717,5 @@ function createNormalFs() {
|
|
|
22688
22717
|
}
|
|
22689
22718
|
|
|
22690
22719
|
export { getDependencyVersions, handleGenerate, updateVersionsIfTheyExist };
|
|
22691
|
-
//# sourceMappingURL=handleGenerate-
|
|
22692
|
-
//# sourceMappingURL=handleGenerate-
|
|
22720
|
+
//# sourceMappingURL=handleGenerate-3SPVQBRK.js.map
|
|
22721
|
+
//# sourceMappingURL=handleGenerate-3SPVQBRK.js.map
|