@optique/core 1.0.0-dev.1510 → 1.0.0-dev.1514
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/facade.cjs +5 -5
- package/dist/facade.js +5 -5
- package/package.json +1 -1
package/dist/facade.cjs
CHANGED
|
@@ -1173,15 +1173,15 @@ function disposeContextsSync(contexts) {
|
|
|
1173
1173
|
*/
|
|
1174
1174
|
async function runWith(parser, programName, contexts, options) {
|
|
1175
1175
|
const args = options?.args ?? [];
|
|
1176
|
-
if (needsEarlyExit(args, options)) {
|
|
1177
|
-
if (parser.$mode === "async") return runParser(parser, programName, args, options);
|
|
1178
|
-
return Promise.resolve(runParser(parser, programName, args, options));
|
|
1179
|
-
}
|
|
1180
1176
|
if (contexts.length === 0) {
|
|
1181
1177
|
if (parser.$mode === "async") return runParser(parser, programName, args, options);
|
|
1182
1178
|
return Promise.resolve(runParser(parser, programName, args, options));
|
|
1183
1179
|
}
|
|
1184
1180
|
try {
|
|
1181
|
+
if (needsEarlyExit(args, options)) {
|
|
1182
|
+
if (parser.$mode === "async") return runParser(parser, programName, args, options);
|
|
1183
|
+
return Promise.resolve(runParser(parser, programName, args, options));
|
|
1184
|
+
}
|
|
1185
1185
|
const ctxOptions = options?.contextOptions;
|
|
1186
1186
|
const { annotations: phase1Annotations, annotationsList: phase1AnnotationsList, hasDynamic: needsTwoPhase } = await collectPhase1Annotations(contexts, ctxOptions);
|
|
1187
1187
|
if (!needsTwoPhase) {
|
|
@@ -1245,9 +1245,9 @@ async function runWith(parser, programName, contexts, options) {
|
|
|
1245
1245
|
function runWithSync(parser, programName, contexts, options) {
|
|
1246
1246
|
if (parser.$mode !== "sync") throw new TypeError("Cannot use an async parser with runWithSync(). Use runWith() or runWithAsync() instead.");
|
|
1247
1247
|
const args = options?.args ?? [];
|
|
1248
|
-
if (needsEarlyExit(args, options)) return runParser(parser, programName, args, options);
|
|
1249
1248
|
if (contexts.length === 0) return runParser(parser, programName, args, options);
|
|
1250
1249
|
try {
|
|
1250
|
+
if (needsEarlyExit(args, options)) return runParser(parser, programName, args, options);
|
|
1251
1251
|
const ctxOptions = options?.contextOptions;
|
|
1252
1252
|
const { annotations: phase1Annotations, annotationsList: phase1AnnotationsList, hasDynamic: needsTwoPhase } = collectPhase1AnnotationsSync(contexts, ctxOptions);
|
|
1253
1253
|
if (!needsTwoPhase) {
|
package/dist/facade.js
CHANGED
|
@@ -1173,15 +1173,15 @@ function disposeContextsSync(contexts) {
|
|
|
1173
1173
|
*/
|
|
1174
1174
|
async function runWith(parser, programName, contexts, options) {
|
|
1175
1175
|
const args = options?.args ?? [];
|
|
1176
|
-
if (needsEarlyExit(args, options)) {
|
|
1177
|
-
if (parser.$mode === "async") return runParser(parser, programName, args, options);
|
|
1178
|
-
return Promise.resolve(runParser(parser, programName, args, options));
|
|
1179
|
-
}
|
|
1180
1176
|
if (contexts.length === 0) {
|
|
1181
1177
|
if (parser.$mode === "async") return runParser(parser, programName, args, options);
|
|
1182
1178
|
return Promise.resolve(runParser(parser, programName, args, options));
|
|
1183
1179
|
}
|
|
1184
1180
|
try {
|
|
1181
|
+
if (needsEarlyExit(args, options)) {
|
|
1182
|
+
if (parser.$mode === "async") return runParser(parser, programName, args, options);
|
|
1183
|
+
return Promise.resolve(runParser(parser, programName, args, options));
|
|
1184
|
+
}
|
|
1185
1185
|
const ctxOptions = options?.contextOptions;
|
|
1186
1186
|
const { annotations: phase1Annotations, annotationsList: phase1AnnotationsList, hasDynamic: needsTwoPhase } = await collectPhase1Annotations(contexts, ctxOptions);
|
|
1187
1187
|
if (!needsTwoPhase) {
|
|
@@ -1245,9 +1245,9 @@ async function runWith(parser, programName, contexts, options) {
|
|
|
1245
1245
|
function runWithSync(parser, programName, contexts, options) {
|
|
1246
1246
|
if (parser.$mode !== "sync") throw new TypeError("Cannot use an async parser with runWithSync(). Use runWith() or runWithAsync() instead.");
|
|
1247
1247
|
const args = options?.args ?? [];
|
|
1248
|
-
if (needsEarlyExit(args, options)) return runParser(parser, programName, args, options);
|
|
1249
1248
|
if (contexts.length === 0) return runParser(parser, programName, args, options);
|
|
1250
1249
|
try {
|
|
1250
|
+
if (needsEarlyExit(args, options)) return runParser(parser, programName, args, options);
|
|
1251
1251
|
const ctxOptions = options?.contextOptions;
|
|
1252
1252
|
const { annotations: phase1Annotations, annotationsList: phase1AnnotationsList, hasDynamic: needsTwoPhase } = collectPhase1AnnotationsSync(contexts, ctxOptions);
|
|
1253
1253
|
if (!needsTwoPhase) {
|