@sanity/cli 5.9.0-next.8 → 6.0.0-alpha.11
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/LICENSE +1 -1
- package/README.md +3212 -2
- package/bin/run.cmd +3 -0
- package/bin/run.js +33 -0
- package/codemods/deskRename.js +115 -96
- package/codemods/partsTypeDirective.js +7 -7
- package/codemods/reactIconsV3.js +78 -51
- package/dist/SanityHelp.js +43 -0
- package/dist/SanityHelp.js.map +1 -0
- package/dist/actions/auth/authServer.js +153 -0
- package/dist/actions/auth/authServer.js.map +1 -0
- package/dist/actions/auth/getProviderName.js +15 -0
- package/dist/actions/auth/getProviderName.js.map +1 -0
- package/dist/actions/auth/login/getProvider.js +54 -0
- package/dist/actions/auth/login/getProvider.js.map +1 -0
- package/dist/actions/auth/login/getSSOProvider.js +30 -0
- package/dist/actions/auth/login/getSSOProvider.js.map +1 -0
- package/dist/actions/auth/login/login.js +101 -0
- package/dist/actions/auth/login/login.js.map +1 -0
- package/dist/actions/auth/login/promptProviders.js +23 -0
- package/dist/actions/auth/login/promptProviders.js.map +1 -0
- package/dist/actions/auth/login/samlProviderToLoginProvider.js +15 -0
- package/dist/actions/auth/login/samlProviderToLoginProvider.js.map +1 -0
- package/dist/actions/auth/types.js +7 -0
- package/dist/actions/auth/types.js.map +1 -0
- package/dist/actions/backup/archiveDir.js +43 -0
- package/dist/actions/backup/archiveDir.js.map +1 -0
- package/dist/actions/backup/assertDatasetExist.js +16 -0
- package/dist/actions/backup/assertDatasetExist.js.map +1 -0
- package/dist/actions/backup/backupDownloadDebug.js +4 -0
- package/dist/actions/backup/backupDownloadDebug.js.map +1 -0
- package/dist/actions/backup/cleanupTmpDir.js +19 -0
- package/dist/actions/backup/cleanupTmpDir.js.map +1 -0
- package/dist/actions/backup/constants.js +3 -0
- package/dist/actions/backup/constants.js.map +1 -0
- package/dist/actions/backup/downloadAsset.js +54 -0
- package/dist/actions/backup/downloadAsset.js.map +1 -0
- package/dist/actions/backup/downloadDocument.js +32 -0
- package/dist/actions/backup/downloadDocument.js.map +1 -0
- package/dist/actions/backup/fetchNextBackupPage.js +48 -0
- package/dist/actions/backup/fetchNextBackupPage.js.map +1 -0
- package/dist/actions/backup/progressSpinner.js +40 -0
- package/dist/actions/backup/progressSpinner.js.map +1 -0
- package/dist/actions/build/buildApp.js +159 -0
- package/dist/actions/build/buildApp.js.map +1 -0
- package/dist/actions/build/buildDebug.js +4 -0
- package/dist/actions/build/buildDebug.js.map +1 -0
- package/dist/actions/build/buildStaticFiles.js +82 -0
- package/dist/actions/build/buildStaticFiles.js.map +1 -0
- package/dist/actions/build/buildStudio.js +202 -0
- package/dist/actions/build/buildStudio.js.map +1 -0
- package/dist/actions/build/buildVendorDependencies.js +179 -0
- package/dist/actions/build/buildVendorDependencies.js.map +1 -0
- package/dist/actions/build/checkRequiredDependencies.js +122 -0
- package/dist/actions/build/checkRequiredDependencies.js.map +1 -0
- package/dist/actions/build/checkStudioDependencyVersions.js +154 -0
- package/dist/actions/build/checkStudioDependencyVersions.js.map +1 -0
- package/dist/actions/build/createExternalFromImportMap.js +11 -0
- package/dist/actions/build/createExternalFromImportMap.js.map +1 -0
- package/dist/actions/build/decorateIndexWithAutoGeneratedWarning.js +13 -0
- package/dist/actions/build/decorateIndexWithAutoGeneratedWarning.js.map +1 -0
- package/dist/actions/build/decorateIndexWithBridgeScript.js +17 -0
- package/dist/actions/build/decorateIndexWithBridgeScript.js.map +1 -0
- package/dist/actions/build/determineBasePath.js +20 -0
- package/dist/actions/build/determineBasePath.js.map +1 -0
- package/dist/actions/build/generateWebManifest.js +27 -0
- package/dist/actions/build/generateWebManifest.js.map +1 -0
- package/dist/actions/build/getAppEnvVars.js +9 -0
- package/dist/actions/build/getAppEnvVars.js.map +1 -0
- package/dist/actions/build/getAutoUpdatesImportMap.js +57 -0
- package/dist/actions/build/getAutoUpdatesImportMap.js.map +1 -0
- package/dist/actions/build/getEntryModule.js +46 -0
- package/dist/actions/build/getEntryModule.js.map +1 -0
- package/dist/actions/build/getPossibleDocumentComponentLocations.js +11 -0
- package/dist/actions/build/getPossibleDocumentComponentLocations.js.map +1 -0
- package/dist/actions/build/getStudioEnvVars.js +9 -0
- package/dist/actions/build/getStudioEnvVars.js.map +1 -0
- package/dist/actions/build/getStudioEnvironmentVariables.js +58 -0
- package/dist/actions/build/getStudioEnvironmentVariables.js.map +1 -0
- package/dist/actions/build/getViteConfig.js +180 -0
- package/dist/actions/build/getViteConfig.js.map +1 -0
- package/dist/actions/build/normalizeBasePath.js +9 -0
- package/dist/actions/build/normalizeBasePath.js.map +1 -0
- package/dist/actions/build/renderDocument.js +54 -0
- package/dist/actions/build/renderDocument.js.map +1 -0
- package/dist/actions/build/renderDocument.worker.js +9 -0
- package/dist/actions/build/renderDocument.worker.js.map +1 -0
- package/dist/actions/build/renderDocumentWorker/addTimestampImportMapScriptToHtml.js +59 -0
- package/dist/actions/build/renderDocumentWorker/addTimestampImportMapScriptToHtml.js.map +1 -0
- package/dist/actions/build/renderDocumentWorker/components/BasicDocument.js +61 -0
- package/dist/actions/build/renderDocumentWorker/components/BasicDocument.js.map +1 -0
- package/dist/actions/build/renderDocumentWorker/components/DefaultDocument.js +165 -0
- package/dist/actions/build/renderDocumentWorker/components/DefaultDocument.js.map +1 -0
- package/dist/actions/build/renderDocumentWorker/components/Favicons.js +28 -0
- package/dist/actions/build/renderDocumentWorker/components/Favicons.js.map +1 -0
- package/dist/actions/build/renderDocumentWorker/components/GlobalErrorHandler.js +177 -0
- package/dist/actions/build/renderDocumentWorker/components/GlobalErrorHandler.js.map +1 -0
- package/dist/actions/build/renderDocumentWorker/components/NoJavascript.js +51 -0
- package/dist/actions/build/renderDocumentWorker/components/NoJavascript.js.map +1 -0
- package/dist/actions/build/renderDocumentWorker/getDocumentComponent.js +41 -0
- package/dist/actions/build/renderDocumentWorker/getDocumentComponent.js.map +1 -0
- package/dist/actions/build/renderDocumentWorker/getDocumentHtml.js +55 -0
- package/dist/actions/build/renderDocumentWorker/getDocumentHtml.js.map +1 -0
- package/dist/actions/build/renderDocumentWorker/renderDocumentWorker.js +31 -0
- package/dist/actions/build/renderDocumentWorker/renderDocumentWorker.js.map +1 -0
- package/dist/actions/build/renderDocumentWorker/tryLoadDocumentComponent.js +30 -0
- package/dist/actions/build/renderDocumentWorker/tryLoadDocumentComponent.js.map +1 -0
- package/dist/actions/build/renderDocumentWorker/types.js +5 -0
- package/dist/actions/build/renderDocumentWorker/types.js.map +1 -0
- package/dist/actions/build/shouldAutoUpdate.js +35 -0
- package/dist/actions/build/shouldAutoUpdate.js.map +1 -0
- package/dist/actions/build/types.js +3 -0
- package/dist/actions/build/types.js.map +1 -0
- package/dist/actions/build/writeFavicons.js +26 -0
- package/dist/actions/build/writeFavicons.js.map +1 -0
- package/dist/actions/build/writeSanityRuntime.js +61 -0
- package/dist/actions/build/writeSanityRuntime.js.map +1 -0
- package/dist/actions/build/writeWebManifest.js +12 -0
- package/dist/actions/build/writeWebManifest.js.map +1 -0
- package/dist/actions/codemods/deskRename.js +18 -0
- package/dist/actions/codemods/deskRename.js.map +1 -0
- package/dist/actions/codemods/index.js +10 -0
- package/dist/actions/codemods/index.js.map +1 -0
- package/dist/actions/codemods/partsTypeDirective.js +27 -0
- package/dist/actions/codemods/partsTypeDirective.js.map +1 -0
- package/dist/actions/codemods/reactIconsV3.js +30 -0
- package/dist/actions/codemods/reactIconsV3.js.map +1 -0
- package/dist/actions/codemods/types.js +3 -0
- package/dist/actions/codemods/types.js.map +1 -0
- package/dist/actions/cors/filterAndValidateOrigin.js +38 -0
- package/dist/actions/cors/filterAndValidateOrigin.js.map +1 -0
- package/dist/actions/dataset/create.js +46 -0
- package/dist/actions/dataset/create.js.map +1 -0
- package/dist/actions/dataset/determineDatasetAclMode.js +36 -0
- package/dist/actions/dataset/determineDatasetAclMode.js.map +1 -0
- package/dist/actions/dataset/processAliasName.js +20 -0
- package/dist/actions/dataset/processAliasName.js.map +1 -0
- package/dist/actions/dataset/validateDatasetAliasName.js +28 -0
- package/dist/actions/dataset/validateDatasetAliasName.js.map +1 -0
- package/dist/actions/dataset/validateDatasetName.js +39 -0
- package/dist/actions/dataset/validateDatasetName.js.map +1 -0
- package/dist/actions/debug/gatherDebugInfo.js +104 -0
- package/dist/actions/debug/gatherDebugInfo.js.map +1 -0
- package/dist/actions/debug/getGlobalConfigLocation.js +7 -0
- package/dist/actions/debug/getGlobalConfigLocation.js.map +1 -0
- package/dist/actions/debug/types.js +3 -0
- package/dist/actions/debug/types.js.map +1 -0
- package/dist/actions/deploy/checkDir.js +31 -0
- package/dist/actions/deploy/checkDir.js.map +1 -0
- package/dist/actions/deploy/createStudioUserApplication.js +59 -0
- package/dist/actions/deploy/createStudioUserApplication.js.map +1 -0
- package/dist/actions/deploy/createUserApplicationForApp.js +56 -0
- package/dist/actions/deploy/createUserApplicationForApp.js.map +1 -0
- package/dist/actions/deploy/deployApp.js +162 -0
- package/dist/actions/deploy/deployApp.js.map +1 -0
- package/dist/actions/deploy/deployDebug.js +4 -0
- package/dist/actions/deploy/deployDebug.js.map +1 -0
- package/dist/actions/deploy/deployStudio.js +134 -0
- package/dist/actions/deploy/deployStudio.js.map +1 -0
- package/dist/actions/deploy/findUserApplicationForApp.js +110 -0
- package/dist/actions/deploy/findUserApplicationForApp.js.map +1 -0
- package/dist/actions/deploy/findUserApplicationForStudio.js +143 -0
- package/dist/actions/deploy/findUserApplicationForStudio.js.map +1 -0
- package/dist/actions/deploy/types.js +3 -0
- package/dist/actions/deploy/types.js.map +1 -0
- package/dist/actions/dev/devAction.js +7 -0
- package/dist/actions/dev/devAction.js.map +1 -0
- package/dist/actions/dev/devDebug.js +4 -0
- package/dist/actions/dev/devDebug.js.map +1 -0
- package/dist/actions/dev/getCoreAppUrl.js +10 -0
- package/dist/actions/dev/getCoreAppUrl.js.map +1 -0
- package/dist/actions/dev/getDevServerConfig.js +28 -0
- package/dist/actions/dev/getDevServerConfig.js.map +1 -0
- package/dist/actions/dev/startAppDevServer.js +57 -0
- package/dist/actions/dev/startAppDevServer.js.map +1 -0
- package/dist/actions/dev/startStudioDevServer.js +154 -0
- package/dist/actions/dev/startStudioDevServer.js.map +1 -0
- package/dist/actions/dev/types.js +3 -0
- package/dist/actions/dev/types.js.map +1 -0
- package/dist/actions/docs/normalizeDocsPath.js +15 -0
- package/dist/actions/docs/normalizeDocsPath.js.map +1 -0
- package/dist/actions/documents/constants.js +3 -0
- package/dist/actions/documents/constants.js.map +1 -0
- package/dist/actions/documents/editor.js +26 -0
- package/dist/actions/documents/editor.js.map +1 -0
- package/dist/actions/documents/types.js +3 -0
- package/dist/actions/documents/types.js.map +1 -0
- package/dist/actions/documents/validate.js +60 -0
- package/dist/actions/documents/validate.js.map +1 -0
- package/dist/actions/documents/validateDocuments.worker.js +251 -0
- package/dist/actions/documents/validateDocuments.worker.js.map +1 -0
- package/dist/actions/documents/validation/reporters/index.js +10 -0
- package/dist/actions/documents/validation/reporters/index.js.map +1 -0
- package/dist/actions/documents/validation/reporters/jsonReporter.js +25 -0
- package/dist/actions/documents/validation/reporters/jsonReporter.js.map +1 -0
- package/dist/actions/documents/validation/reporters/ndjsonReporter.js +18 -0
- package/dist/actions/documents/validation/reporters/ndjsonReporter.js.map +1 -0
- package/dist/actions/documents/validation/reporters/prettyReporter/formatDocumentValidation.js +62 -0
- package/dist/actions/documents/validation/reporters/prettyReporter/formatDocumentValidation.js.map +1 -0
- package/dist/actions/documents/validation/reporters/prettyReporter/index.js +3 -0
- package/dist/actions/documents/validation/reporters/prettyReporter/index.js.map +1 -0
- package/dist/actions/documents/validation/reporters/prettyReporter/prettyReporter.js +92 -0
- package/dist/actions/documents/validation/reporters/prettyReporter/prettyReporter.js.map +1 -0
- package/dist/actions/documents/validation/reporters/prettyReporter/util.js +45 -0
- package/dist/actions/documents/validation/reporters/prettyReporter/util.js.map +1 -0
- package/dist/actions/exec/configClient.worker.js +9 -0
- package/dist/actions/exec/configClient.worker.js.map +1 -0
- package/dist/actions/exec/execScript.js +77 -0
- package/dist/actions/exec/execScript.js.map +1 -0
- package/dist/actions/exec/registerBrowserEnv.worker.js +17 -0
- package/dist/actions/exec/registerBrowserEnv.worker.js.map +1 -0
- package/dist/actions/graphql/SchemaError.js +37 -0
- package/dist/actions/graphql/SchemaError.js.map +1 -0
- package/dist/actions/graphql/extractFromSanitySchema.js +659 -0
- package/dist/actions/graphql/extractFromSanitySchema.js.map +1 -0
- package/dist/actions/graphql/gen1/generateTypeFilters.js +226 -0
- package/dist/actions/graphql/gen1/generateTypeFilters.js.map +1 -0
- package/dist/actions/graphql/gen1/generateTypeQueries.js +85 -0
- package/dist/actions/graphql/gen1/generateTypeQueries.js.map +1 -0
- package/dist/actions/graphql/gen1/index.js +19 -0
- package/dist/actions/graphql/gen1/index.js.map +1 -0
- package/dist/actions/graphql/gen2/filters/booleanFilters.js +26 -0
- package/dist/actions/graphql/gen2/filters/booleanFilters.js.map +1 -0
- package/dist/actions/graphql/gen2/filters/dateFilters.js +46 -0
- package/dist/actions/graphql/gen2/filters/dateFilters.js.map +1 -0
- package/dist/actions/graphql/gen2/filters/dateTimeFilters.js +46 -0
- package/dist/actions/graphql/gen2/filters/dateTimeFilters.js.map +1 -0
- package/dist/actions/graphql/gen2/filters/documentFilters.js +21 -0
- package/dist/actions/graphql/gen2/filters/documentFilters.js.map +1 -0
- package/dist/actions/graphql/gen2/filters/floatFilters.js +46 -0
- package/dist/actions/graphql/gen2/filters/floatFilters.js.map +1 -0
- package/dist/actions/graphql/gen2/filters/idFilters.js +44 -0
- package/dist/actions/graphql/gen2/filters/idFilters.js.map +1 -0
- package/dist/actions/graphql/gen2/filters/integerFilters.js +46 -0
- package/dist/actions/graphql/gen2/filters/integerFilters.js.map +1 -0
- package/dist/actions/graphql/gen2/filters/stringFilters.js +49 -0
- package/dist/actions/graphql/gen2/filters/stringFilters.js.map +1 -0
- package/dist/actions/graphql/gen2/generateTypeFilters.js +85 -0
- package/dist/actions/graphql/gen2/generateTypeFilters.js.map +1 -0
- package/dist/actions/graphql/gen2/generateTypeQueries.js +107 -0
- package/dist/actions/graphql/gen2/generateTypeQueries.js.map +1 -0
- package/dist/actions/graphql/gen2/generateTypeSortings.js +70 -0
- package/dist/actions/graphql/gen2/generateTypeSortings.js.map +1 -0
- package/dist/actions/graphql/gen2/index.js +22 -0
- package/dist/actions/graphql/gen2/index.js.map +1 -0
- package/dist/actions/graphql/gen3/filters/documentFilters.js +21 -0
- package/dist/actions/graphql/gen3/filters/documentFilters.js.map +1 -0
- package/dist/actions/graphql/gen3/generateTypeFilters.js +101 -0
- package/dist/actions/graphql/gen3/generateTypeFilters.js.map +1 -0
- package/dist/actions/graphql/gen3/generateTypeQueries.js +104 -0
- package/dist/actions/graphql/gen3/generateTypeQueries.js.map +1 -0
- package/dist/actions/graphql/gen3/generateTypeSortings.js +70 -0
- package/dist/actions/graphql/gen3/generateTypeSortings.js.map +1 -0
- package/dist/actions/graphql/gen3/index.js +31 -0
- package/dist/actions/graphql/gen3/index.js.map +1 -0
- package/dist/actions/graphql/gen3/utils.js +12 -0
- package/dist/actions/graphql/gen3/utils.js.map +1 -0
- package/dist/actions/graphql/getGraphQLAPIs.js +65 -0
- package/dist/actions/graphql/getGraphQLAPIs.js.map +1 -0
- package/dist/actions/graphql/getGraphQLAPIs.worker.js +126 -0
- package/dist/actions/graphql/getGraphQLAPIs.worker.js.map +1 -0
- package/dist/actions/graphql/graphqlDebug.js +4 -0
- package/dist/actions/graphql/graphqlDebug.js.map +1 -0
- package/dist/actions/graphql/helpUrls.js +3 -0
- package/dist/actions/graphql/helpUrls.js.map +1 -0
- package/dist/actions/graphql/helpers.js +11 -0
- package/dist/actions/graphql/helpers.js.map +1 -0
- package/dist/actions/graphql/resolveApiGeneration.js +43 -0
- package/dist/actions/graphql/resolveApiGeneration.js.map +1 -0
- package/dist/actions/graphql/types.js +3 -0
- package/dist/actions/graphql/types.js.map +1 -0
- package/dist/actions/hook/constants.js +3 -0
- package/dist/actions/hook/constants.js.map +1 -0
- package/dist/actions/hook/formatFailure.js +29 -0
- package/dist/actions/hook/formatFailure.js.map +1 -0
- package/dist/actions/hook/types.js +3 -0
- package/dist/actions/hook/types.js.map +1 -0
- package/dist/actions/init/bootstrapLocalTemplate.js +137 -0
- package/dist/actions/init/bootstrapLocalTemplate.js.map +1 -0
- package/dist/actions/init/bootstrapRemoteTemplate.js +109 -0
- package/dist/actions/init/bootstrapRemoteTemplate.js.map +1 -0
- package/dist/actions/init/bootstrapTemplate.js +32 -0
- package/dist/actions/init/bootstrapTemplate.js.map +1 -0
- package/dist/actions/init/checkNextJsReactCompatibility.js +21 -0
- package/dist/actions/init/checkNextJsReactCompatibility.js.map +1 -0
- package/dist/actions/init/constants.js +3 -0
- package/dist/actions/init/constants.js.map +1 -0
- package/dist/actions/init/countNestedFolders.js +6 -0
- package/dist/actions/init/countNestedFolders.js.map +1 -0
- package/dist/actions/init/createAppCliConfig.js +19 -0
- package/dist/actions/init/createAppCliConfig.js.map +1 -0
- package/dist/actions/init/createCliConfig.js +27 -0
- package/dist/actions/init/createCliConfig.js.map +1 -0
- package/dist/actions/init/createPackageManifest.js +86 -0
- package/dist/actions/init/createPackageManifest.js.map +1 -0
- package/dist/actions/init/createStudioConfig.js +41 -0
- package/dist/actions/init/createStudioConfig.js.map +1 -0
- package/dist/actions/init/determineAppTemplate.js +16 -0
- package/dist/actions/init/determineAppTemplate.js.map +1 -0
- package/dist/actions/init/env/createOrAppendEnvVars.js +25 -0
- package/dist/actions/init/env/createOrAppendEnvVars.js.map +1 -0
- package/dist/actions/init/env/parseAndUpdateEnvVars.js +42 -0
- package/dist/actions/init/env/parseAndUpdateEnvVars.js.map +1 -0
- package/dist/actions/init/env/writeEnvVarsToFile.js +49 -0
- package/dist/actions/init/env/writeEnvVarsToFile.js.map +1 -0
- package/dist/actions/init/fetchPostInitPrompt.js +30 -0
- package/dist/actions/init/fetchPostInitPrompt.js.map +1 -0
- package/dist/actions/init/git.js +65 -0
- package/dist/actions/init/git.js.map +1 -0
- package/dist/actions/init/processTemplate.js +56 -0
- package/dist/actions/init/processTemplate.js.map +1 -0
- package/dist/actions/init/remoteTemplate.js +211 -0
- package/dist/actions/init/remoteTemplate.js.map +1 -0
- package/dist/actions/init/resolvePackageManager.js +20 -0
- package/dist/actions/init/resolvePackageManager.js.map +1 -0
- package/dist/actions/init/templates/appQuickstart.js +28 -0
- package/dist/actions/init/templates/appQuickstart.js.map +1 -0
- package/dist/actions/init/templates/appSanityUi.js +30 -0
- package/dist/actions/init/templates/appSanityUi.js.map +1 -0
- package/dist/actions/init/templates/blog.js +4 -0
- package/dist/actions/init/templates/blog.js.map +1 -0
- package/dist/actions/init/templates/clean.js +4 -0
- package/dist/actions/init/templates/clean.js.map +1 -0
- package/dist/actions/init/templates/getStarted.js +35 -0
- package/dist/actions/init/templates/getStarted.js.map +1 -0
- package/dist/actions/init/templates/index.js +23 -0
- package/dist/actions/init/templates/index.js.map +1 -0
- package/dist/actions/init/templates/moviedb.js +34 -0
- package/dist/actions/init/templates/moviedb.js.map +1 -0
- package/dist/actions/init/templates/nextjs/index.js +213 -0
- package/dist/actions/init/templates/nextjs/index.js.map +1 -0
- package/dist/actions/init/templates/nextjs/schemaTypes/blog.js +247 -0
- package/dist/actions/init/templates/nextjs/schemaTypes/blog.js.map +1 -0
- package/dist/actions/init/templates/quickstart.js +4 -0
- package/dist/actions/init/templates/quickstart.js.map +1 -0
- package/dist/actions/init/templates/shopify.js +77 -0
- package/dist/actions/init/templates/shopify.js.map +1 -0
- package/dist/actions/init/templates/shopifyOnline.js +49 -0
- package/dist/actions/init/templates/shopifyOnline.js.map +1 -0
- package/dist/actions/init/types.js +3 -0
- package/dist/actions/init/types.js.map +1 -0
- package/dist/actions/init/updateInitialTemplateMetadata.js +17 -0
- package/dist/actions/init/updateInitialTemplateMetadata.js.map +1 -0
- package/dist/actions/manifest/SchemaIcon.js +21 -0
- package/dist/actions/manifest/SchemaIcon.js.map +1 -0
- package/dist/actions/manifest/extractAppManifest.js +51 -0
- package/dist/actions/manifest/extractAppManifest.js.map +1 -0
- package/dist/actions/manifest/extractManifest.js +93 -0
- package/dist/actions/manifest/extractManifest.js.map +1 -0
- package/dist/actions/manifest/extractWorkspaceManifest.js +406 -0
- package/dist/actions/manifest/extractWorkspaceManifest.js.map +1 -0
- package/dist/actions/manifest/purifyConfig.js +307 -0
- package/dist/actions/manifest/purifyConfig.js.map +1 -0
- package/dist/actions/manifest/schemaTypeHelpers.js +110 -0
- package/dist/actions/manifest/schemaTypeHelpers.js.map +1 -0
- package/dist/actions/manifest/types.js +5 -0
- package/dist/actions/manifest/types.js.map +1 -0
- package/dist/actions/mcp/detectAvailableEditors.js +75 -0
- package/dist/actions/mcp/detectAvailableEditors.js.map +1 -0
- package/dist/actions/mcp/editorConfigs.js +147 -0
- package/dist/actions/mcp/editorConfigs.js.map +1 -0
- package/dist/actions/mcp/promptForMCPSetup.js +24 -0
- package/dist/actions/mcp/promptForMCPSetup.js.map +1 -0
- package/dist/actions/mcp/setupMCP.js +88 -0
- package/dist/actions/mcp/setupMCP.js.map +1 -0
- package/dist/actions/mcp/types.js +3 -0
- package/dist/actions/mcp/types.js.map +1 -0
- package/dist/actions/mcp/writeMCPConfig.js +41 -0
- package/dist/actions/mcp/writeMCPConfig.js.map +1 -0
- package/dist/actions/media/__tests__/createMockClient.js +32 -0
- package/dist/actions/media/__tests__/createMockClient.js.map +1 -0
- package/dist/actions/media/getMediaLibraryConfig.js +5 -0
- package/dist/actions/media/getMediaLibraryConfig.js.map +1 -0
- package/dist/actions/media/importAspects.js +112 -0
- package/dist/actions/media/importAspects.js.map +1 -0
- package/dist/actions/media/importMedia.js +213 -0
- package/dist/actions/media/importMedia.js.map +1 -0
- package/dist/actions/media/importMediaDebug.js +4 -0
- package/dist/actions/media/importMediaDebug.js.map +1 -0
- package/dist/actions/organizations/getOrganization.js +67 -0
- package/dist/actions/organizations/getOrganization.js.map +1 -0
- package/dist/actions/organizations/getOrganizationChoices.js +23 -0
- package/dist/actions/organizations/getOrganizationChoices.js.map +1 -0
- package/dist/actions/organizations/getOrganizationsWithAttachGrantInfo.js +9 -0
- package/dist/actions/organizations/getOrganizationsWithAttachGrantInfo.js.map +1 -0
- package/dist/actions/organizations/hasProjectAttachGrant.js +24 -0
- package/dist/actions/organizations/hasProjectAttachGrant.js.map +1 -0
- package/dist/actions/organizations/validateOrganizationName.js +10 -0
- package/dist/actions/organizations/validateOrganizationName.js.map +1 -0
- package/dist/actions/preview/getPreviewServerConfig.js +16 -0
- package/dist/actions/preview/getPreviewServerConfig.js.map +1 -0
- package/dist/actions/preview/previewAction.js +20 -0
- package/dist/actions/preview/previewAction.js.map +1 -0
- package/dist/actions/preview/types.js +3 -0
- package/dist/actions/preview/types.js.map +1 -0
- package/dist/actions/projects/getManageUrl.js +7 -0
- package/dist/actions/projects/getManageUrl.js.map +1 -0
- package/dist/actions/projects/validateProjectName.js +11 -0
- package/dist/actions/projects/validateProjectName.js.map +1 -0
- package/dist/actions/schema/deleteSchemaAction.js +101 -0
- package/dist/actions/schema/deleteSchemaAction.js.map +1 -0
- package/dist/actions/schema/deploySchemas.js +98 -0
- package/dist/actions/schema/deploySchemas.js.map +1 -0
- package/dist/actions/schema/extractSanitySchema.worker.js +38 -0
- package/dist/actions/schema/extractSanitySchema.worker.js.map +1 -0
- package/dist/actions/schema/extractSchema.js +77 -0
- package/dist/actions/schema/extractSchema.js.map +1 -0
- package/dist/actions/schema/formatSchemaValidation.js +74 -0
- package/dist/actions/schema/formatSchemaValidation.js.map +1 -0
- package/dist/actions/schema/listSchemas.js +119 -0
- package/dist/actions/schema/listSchemas.js.map +1 -0
- package/dist/actions/schema/metafile.js +51 -0
- package/dist/actions/schema/metafile.js.map +1 -0
- package/dist/actions/schema/schemaStoreTypes.js +19 -0
- package/dist/actions/schema/schemaStoreTypes.js.map +1 -0
- package/dist/actions/schema/types.js +9 -0
- package/dist/actions/schema/types.js.map +1 -0
- package/dist/actions/schema/utils/debug.js +6 -0
- package/dist/actions/schema/utils/debug.js.map +1 -0
- package/dist/actions/schema/utils/extractValidationFromSchemaError.js +12 -0
- package/dist/actions/schema/utils/extractValidationFromSchemaError.js.map +1 -0
- package/dist/actions/schema/utils/manifestExtractor.js +33 -0
- package/dist/actions/schema/utils/manifestExtractor.js.map +1 -0
- package/dist/actions/schema/utils/manifestReader.js +71 -0
- package/dist/actions/schema/utils/manifestReader.js.map +1 -0
- package/dist/actions/schema/utils/schemaStoreOutStrings.js +11 -0
- package/dist/actions/schema/utils/schemaStoreOutStrings.js.map +1 -0
- package/dist/actions/schema/utils/schemaStoreValidation.js +108 -0
- package/dist/actions/schema/utils/schemaStoreValidation.js.map +1 -0
- package/dist/actions/schema/utils/uniqByProjectIdDataset.js +9 -0
- package/dist/actions/schema/utils/uniqByProjectIdDataset.js.map +1 -0
- package/dist/actions/schema/utils/workspaceSchemaId.js +23 -0
- package/dist/actions/schema/utils/workspaceSchemaId.js.map +1 -0
- package/dist/actions/schema/validateAction.js +71 -0
- package/dist/actions/schema/validateAction.js.map +1 -0
- package/dist/actions/schema/validateSchema.worker.js +124 -0
- package/dist/actions/schema/validateSchema.worker.js.map +1 -0
- package/dist/actions/telemetry/getLearnMoreMessage.js +15 -0
- package/dist/actions/telemetry/getLearnMoreMessage.js.map +1 -0
- package/dist/actions/telemetry/getStatusDisplay.js +26 -0
- package/dist/actions/telemetry/getStatusDisplay.js.map +1 -0
- package/dist/actions/telemetry/getStatusMessage.js +36 -0
- package/dist/actions/telemetry/getStatusMessage.js.map +1 -0
- package/dist/actions/telemetry/resolveConsent.js +48 -0
- package/dist/actions/telemetry/resolveConsent.js.map +1 -0
- package/dist/actions/telemetry/setConsent.js +83 -0
- package/dist/actions/telemetry/setConsent.js.map +1 -0
- package/dist/actions/telemetry/telemetryDebug.js +4 -0
- package/dist/actions/telemetry/telemetryDebug.js.map +1 -0
- package/dist/actions/telemetry/telemetryDisclosure.js +33 -0
- package/dist/actions/telemetry/telemetryDisclosure.js.map +1 -0
- package/dist/actions/telemetry/telemetryLearnMoreMessage.js +15 -0
- package/dist/actions/telemetry/telemetryLearnMoreMessage.js.map +1 -0
- package/dist/actions/tokens/constants.js +5 -0
- package/dist/actions/tokens/constants.js.map +1 -0
- package/dist/actions/tokens/types.js +3 -0
- package/dist/actions/tokens/types.js.map +1 -0
- package/dist/actions/tokens/validateRole.js +23 -0
- package/dist/actions/tokens/validateRole.js.map +1 -0
- package/dist/actions/undeploy/getStudioOrAppUserApplication.js +36 -0
- package/dist/actions/undeploy/getStudioOrAppUserApplication.js.map +1 -0
- package/dist/actions/users/getMembersForProject.js +47 -0
- package/dist/actions/users/getMembersForProject.js.map +1 -0
- package/dist/actions/users/getPendingInvitations.js +15 -0
- package/dist/actions/users/getPendingInvitations.js.map +1 -0
- package/dist/actions/users/types.js +3 -0
- package/dist/actions/users/types.js.map +1 -0
- package/dist/actions/users/usersDebug.js +4 -0
- package/dist/actions/users/usersDebug.js.map +1 -0
- package/dist/actions/users/validateEmail.js +14 -0
- package/dist/actions/users/validateEmail.js.map +1 -0
- package/dist/actions/versions/buildPackageArray.js +44 -0
- package/dist/actions/versions/buildPackageArray.js.map +1 -0
- package/dist/actions/versions/filterSanityModules.js +20 -0
- package/dist/actions/versions/filterSanityModules.js.map +1 -0
- package/dist/actions/versions/findSanityModulesVersions.js +47 -0
- package/dist/actions/versions/findSanityModulesVersions.js.map +1 -0
- package/dist/actions/versions/getFormatters.js +30 -0
- package/dist/actions/versions/getFormatters.js.map +1 -0
- package/dist/actions/versions/tryFindLatestVersion.js +21 -0
- package/dist/actions/versions/tryFindLatestVersion.js.map +1 -0
- package/dist/actions/versions/types.js +5 -0
- package/dist/actions/versions/types.js.map +1 -0
- package/dist/actions/versions/versionsDebug.js +4 -0
- package/dist/actions/versions/versionsDebug.js.map +1 -0
- package/dist/commands/backup/disable.js +94 -0
- package/dist/commands/backup/disable.js.map +1 -0
- package/dist/commands/backup/download.js +291 -0
- package/dist/commands/backup/download.js.map +1 -0
- package/dist/commands/backup/enable.js +99 -0
- package/dist/commands/backup/enable.js.map +1 -0
- package/dist/commands/backup/list.js +187 -0
- package/dist/commands/backup/list.js.map +1 -0
- package/dist/commands/build.js +82 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/codemod.js +141 -0
- package/dist/commands/codemod.js.map +1 -0
- package/dist/commands/cors/add.js +154 -0
- package/dist/commands/cors/add.js.map +1 -0
- package/dist/commands/cors/delete.js +90 -0
- package/dist/commands/cors/delete.js.map +1 -0
- package/dist/commands/cors/list.js +40 -0
- package/dist/commands/cors/list.js.map +1 -0
- package/dist/commands/dataset/alias/create.js +118 -0
- package/dist/commands/dataset/alias/create.js.map +1 -0
- package/dist/commands/dataset/alias/delete.js +88 -0
- package/dist/commands/dataset/alias/delete.js.map +1 -0
- package/dist/commands/dataset/alias/link.js +137 -0
- package/dist/commands/dataset/alias/link.js.map +1 -0
- package/dist/commands/dataset/alias/unlink.js +98 -0
- package/dist/commands/dataset/alias/unlink.js.map +1 -0
- package/dist/commands/dataset/copy.js +369 -0
- package/dist/commands/dataset/copy.js.map +1 -0
- package/dist/commands/dataset/create.js +106 -0
- package/dist/commands/dataset/create.js.map +1 -0
- package/dist/commands/dataset/delete.js +104 -0
- package/dist/commands/dataset/delete.js.map +1 -0
- package/dist/commands/dataset/export.js +271 -0
- package/dist/commands/dataset/export.js.map +1 -0
- package/dist/commands/dataset/import.js +3 -0
- package/dist/commands/dataset/import.js.map +1 -0
- package/dist/commands/dataset/list.js +50 -0
- package/dist/commands/dataset/list.js.map +1 -0
- package/dist/commands/dataset/visibility/get.js +55 -0
- package/dist/commands/dataset/visibility/get.js.map +1 -0
- package/dist/commands/dataset/visibility/set.js +88 -0
- package/dist/commands/dataset/visibility/set.js.map +1 -0
- package/dist/commands/debug.js +93 -0
- package/dist/commands/debug.js.map +1 -0
- package/dist/commands/deploy.js +115 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/dev.js +65 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/docs/browse.js +15 -0
- package/dist/commands/docs/browse.js.map +1 -0
- package/dist/commands/docs/read.js +81 -0
- package/dist/commands/docs/read.js.map +1 -0
- package/dist/commands/docs/search.js +111 -0
- package/dist/commands/docs/search.js.map +1 -0
- package/dist/commands/documents/create.js +338 -0
- package/dist/commands/documents/create.js.map +1 -0
- package/dist/commands/documents/delete.js +104 -0
- package/dist/commands/documents/delete.js.map +1 -0
- package/dist/commands/documents/get.js +85 -0
- package/dist/commands/documents/get.js.map +1 -0
- package/dist/commands/documents/query.js +105 -0
- package/dist/commands/documents/query.js.map +1 -0
- package/dist/commands/documents/validate.js +142 -0
- package/dist/commands/documents/validate.js.map +1 -0
- package/dist/commands/exec.js +54 -0
- package/dist/commands/exec.js.map +1 -0
- package/dist/commands/graphql/deploy.js +429 -0
- package/dist/commands/graphql/deploy.js.map +1 -0
- package/dist/commands/graphql/list.js +53 -0
- package/dist/commands/graphql/list.js.map +1 -0
- package/dist/commands/graphql/undeploy.js +143 -0
- package/dist/commands/graphql/undeploy.js.map +1 -0
- package/dist/commands/hook/attempt.js +66 -0
- package/dist/commands/hook/attempt.js.map +1 -0
- package/dist/commands/hook/create.js +46 -0
- package/dist/commands/hook/create.js.map +1 -0
- package/dist/commands/hook/delete.js +86 -0
- package/dist/commands/hook/delete.js.map +1 -0
- package/dist/commands/hook/list.js +46 -0
- package/dist/commands/hook/list.js.map +1 -0
- package/dist/commands/hook/logs.js +184 -0
- package/dist/commands/hook/logs.js.map +1 -0
- package/dist/commands/init.js +1389 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/install.js +43 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/learn.js +15 -0
- package/dist/commands/learn.js.map +1 -0
- package/dist/commands/login.js +50 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.js +37 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/manage.js +29 -0
- package/dist/commands/manage.js.map +1 -0
- package/dist/commands/manifest/extract.js +43 -0
- package/dist/commands/manifest/extract.js.map +1 -0
- package/dist/commands/mcp/configure.js +28 -0
- package/dist/commands/mcp/configure.js.map +1 -0
- package/dist/commands/media/create-aspect.js +88 -0
- package/dist/commands/media/create-aspect.js.map +1 -0
- package/dist/commands/media/delete-aspect.js +85 -0
- package/dist/commands/media/delete-aspect.js.map +1 -0
- package/dist/commands/media/deploy-aspect.js +151 -0
- package/dist/commands/media/deploy-aspect.js.map +1 -0
- package/dist/commands/media/export.js +210 -0
- package/dist/commands/media/export.js.map +1 -0
- package/dist/commands/media/import.js +160 -0
- package/dist/commands/media/import.js.map +1 -0
- package/dist/commands/openapi/get.js +83 -0
- package/dist/commands/openapi/get.js.map +1 -0
- package/dist/commands/openapi/list.js +80 -0
- package/dist/commands/openapi/list.js.map +1 -0
- package/dist/commands/preview.js +60 -0
- package/dist/commands/preview.js.map +1 -0
- package/dist/commands/projects/create.js +181 -0
- package/dist/commands/projects/create.js.map +1 -0
- package/dist/commands/projects/list.js +76 -0
- package/dist/commands/projects/list.js.map +1 -0
- package/dist/commands/schema/delete.js +91 -0
- package/dist/commands/schema/delete.js.map +1 -0
- package/dist/commands/schema/deploy.js +98 -0
- package/dist/commands/schema/deploy.js.map +1 -0
- package/dist/commands/schema/extract.js +46 -0
- package/dist/commands/schema/extract.js.map +1 -0
- package/dist/commands/schema/list.js +104 -0
- package/dist/commands/schema/list.js.map +1 -0
- package/dist/commands/schema/validate.js +73 -0
- package/dist/commands/schema/validate.js.map +1 -0
- package/dist/commands/telemetry/disable.js +33 -0
- package/dist/commands/telemetry/disable.js.map +1 -0
- package/dist/commands/telemetry/enable.js +33 -0
- package/dist/commands/telemetry/enable.js.map +1 -0
- package/dist/commands/telemetry/status.js +25 -0
- package/dist/commands/telemetry/status.js.map +1 -0
- package/dist/commands/tokens/add.js +135 -0
- package/dist/commands/tokens/add.js.map +1 -0
- package/dist/commands/tokens/delete.js +107 -0
- package/dist/commands/tokens/delete.js.map +1 -0
- package/dist/commands/tokens/list.js +92 -0
- package/dist/commands/tokens/list.js.map +1 -0
- package/dist/commands/undeploy.js +93 -0
- package/dist/commands/undeploy.js.map +1 -0
- package/dist/commands/users/invite.js +100 -0
- package/dist/commands/users/invite.js.map +1 -0
- package/dist/commands/users/list.js +101 -0
- package/dist/commands/users/list.js.map +1 -0
- package/dist/commands/versions.js +27 -0
- package/dist/commands/versions.js.map +1 -0
- package/dist/config/createCliConfig.js +9 -0
- package/dist/config/createCliConfig.js.map +1 -0
- package/dist/config/defineCliConfig.js +5 -0
- package/dist/config/defineCliConfig.js.map +1 -0
- package/dist/hooks/prerun/flushTelemetry.worker.js +22 -0
- package/dist/hooks/prerun/flushTelemetry.worker.js.map +1 -0
- package/dist/hooks/prerun/injectEnvVariables.js +31 -0
- package/dist/hooks/prerun/injectEnvVariables.js.map +1 -0
- package/dist/hooks/prerun/setupTelemetry.js +72 -0
- package/dist/hooks/prerun/setupTelemetry.js.map +1 -0
- package/dist/hooks/prerun/warnings.js +6 -0
- package/dist/hooks/prerun/warnings.js.map +1 -0
- package/dist/index.d.ts +2326 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/init/nextjs.js +56 -0
- package/dist/prompts/init/nextjs.js.map +1 -0
- package/dist/prompts/init/promptForTypescript.js +9 -0
- package/dist/prompts/init/promptForTypescript.js.map +1 -0
- package/dist/prompts/promptForDataset.js +32 -0
- package/dist/prompts/promptForDataset.js.map +1 -0
- package/dist/prompts/promptForDatasetAclMode.js +27 -0
- package/dist/prompts/promptForDatasetAclMode.js.map +1 -0
- package/dist/prompts/promptForDatasetAliasName.js +17 -0
- package/dist/prompts/promptForDatasetAliasName.js.map +1 -0
- package/dist/prompts/promptForDatasetName.js +20 -0
- package/dist/prompts/promptForDatasetName.js.map +1 -0
- package/dist/prompts/promptForDefaultConfig.js +12 -0
- package/dist/prompts/promptForDefaultConfig.js.map +1 -0
- package/dist/prompts/promptForMediaLibrary.js +37 -0
- package/dist/prompts/promptForMediaLibrary.js.map +1 -0
- package/dist/prompts/promptForOrganizationName.js +11 -0
- package/dist/prompts/promptForOrganizationName.js.map +1 -0
- package/dist/prompts/promptForProjectName.js +11 -0
- package/dist/prompts/promptForProjectName.js.map +1 -0
- package/dist/prompts/selectDataset.js +12 -0
- package/dist/prompts/selectDataset.js.map +1 -0
- package/dist/prompts/selectMediaLibrary.js +34 -0
- package/dist/prompts/selectMediaLibrary.js.map +1 -0
- package/dist/server/devServer.js +53 -0
- package/dist/server/devServer.js.map +1 -0
- package/dist/server/gracefulServerDeath.js +12 -0
- package/dist/server/gracefulServerDeath.js.map +1 -0
- package/dist/server/previewServer.js +93 -0
- package/dist/server/previewServer.js.map +1 -0
- package/dist/server/serverDebug.js +4 -0
- package/dist/server/serverDebug.js.map +1 -0
- package/dist/server/vite/plugin-sanity-basepath-redirect.js +25 -0
- package/dist/server/vite/plugin-sanity-basepath-redirect.js.map +1 -0
- package/dist/server/vite/plugin-sanity-build-entries.js +65 -0
- package/dist/server/vite/plugin-sanity-build-entries.js.map +1 -0
- package/dist/server/vite/plugin-sanity-favicons.js +72 -0
- package/dist/server/vite/plugin-sanity-favicons.js.map +1 -0
- package/dist/server/vite/plugin-sanity-runtime-rewrite.js +18 -0
- package/dist/server/vite/plugin-sanity-runtime-rewrite.js.map +1 -0
- package/dist/services/auth.js +13 -0
- package/dist/services/auth.js.map +1 -0
- package/dist/services/backup.js +51 -0
- package/dist/services/backup.js.map +1 -0
- package/dist/services/cors.js +38 -0
- package/dist/services/cors.js.map +1 -0
- package/dist/services/datasetAliases.js +64 -0
- package/dist/services/datasetAliases.js.map +1 -0
- package/dist/services/datasets.js +153 -0
- package/dist/services/datasets.js.map +1 -0
- package/dist/services/docs.js +46 -0
- package/dist/services/docs.js.map +1 -0
- package/dist/services/documents.js +56 -0
- package/dist/services/documents.js.map +1 -0
- package/dist/services/getProjectFeatures.js +16 -0
- package/dist/services/getProjectFeatures.js.map +1 -0
- package/dist/services/getUrlHeaders.js +36 -0
- package/dist/services/getUrlHeaders.js.map +1 -0
- package/dist/services/graphql.js +96 -0
- package/dist/services/graphql.js.map +1 -0
- package/dist/services/hooks.js +59 -0
- package/dist/services/hooks.js.map +1 -0
- package/dist/services/mcp.js +50 -0
- package/dist/services/mcp.js.map +1 -0
- package/dist/services/mediaLibraries.js +74 -0
- package/dist/services/mediaLibraries.js.map +1 -0
- package/dist/services/organizations.js +42 -0
- package/dist/services/organizations.js.map +1 -0
- package/dist/services/plans.js +37 -0
- package/dist/services/plans.js.map +1 -0
- package/dist/services/projects.js +119 -0
- package/dist/services/projects.js.map +1 -0
- package/dist/services/schemas.js +40 -0
- package/dist/services/schemas.js.map +1 -0
- package/dist/services/telemetry.js +80 -0
- package/dist/services/telemetry.js.map +1 -0
- package/dist/services/tokens.js +72 -0
- package/dist/services/tokens.js.map +1 -0
- package/dist/services/user.js +35 -0
- package/dist/services/user.js.map +1 -0
- package/dist/services/userApplications.js +164 -0
- package/dist/services/userApplications.js.map +1 -0
- package/dist/studioDependencies.js +24 -0
- package/dist/studioDependencies.js.map +1 -0
- package/dist/telemetry/build.telemetry.js +13 -0
- package/dist/telemetry/build.telemetry.js.map +1 -0
- package/dist/telemetry/cli.telemetry.js +8 -0
- package/dist/telemetry/cli.telemetry.js.map +1 -0
- package/dist/telemetry/extractSchema.telemetry.js +8 -0
- package/dist/telemetry/extractSchema.telemetry.js.map +1 -0
- package/dist/telemetry/init.telemetry.js +8 -0
- package/dist/telemetry/init.telemetry.js.map +1 -0
- package/dist/telemetry/login.telemetry.js +8 -0
- package/dist/telemetry/login.telemetry.js.map +1 -0
- package/dist/telemetry/mcp.telemetry.js +8 -0
- package/dist/telemetry/mcp.telemetry.js.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/typings/deepSortObject.d.js +2 -0
- package/dist/typings/deepSortObject.d.js.map +1 -0
- package/dist/util/absolutify.js +26 -0
- package/dist/util/absolutify.js.map +1 -0
- package/dist/util/appId.js +58 -0
- package/dist/util/appId.js.map +1 -0
- package/dist/util/canLaunchBrowser.js +14 -0
- package/dist/util/canLaunchBrowser.js.map +1 -0
- package/dist/util/cliClient.js +41 -0
- package/dist/util/cliClient.js.map +1 -0
- package/dist/util/compareDependencyVersions.js +73 -0
- package/dist/util/compareDependencyVersions.js.map +1 -0
- package/dist/util/copy.js +37 -0
- package/dist/util/copy.js.map +1 -0
- package/dist/util/copyDir.js +63 -0
- package/dist/util/copyDir.js.map +1 -0
- package/dist/util/detectRuntime.js +20 -0
- package/dist/util/detectRuntime.js.map +1 -0
- package/dist/util/determineIsApp.js +9 -0
- package/dist/util/determineIsApp.js.map +1 -0
- package/dist/util/dirIsEmptyOrNonExistent.js +18 -0
- package/dist/util/dirIsEmptyOrNonExistent.js.map +1 -0
- package/dist/util/ensureTrailingSlash.js +12 -0
- package/dist/util/ensureTrailingSlash.js.map +1 -0
- package/dist/util/errorMessages.js +6 -0
- package/dist/util/errorMessages.js.map +1 -0
- package/dist/util/extractDocumentsFromNdjsonOrTarball.js +88 -0
- package/dist/util/extractDocumentsFromNdjsonOrTarball.js.map +1 -0
- package/dist/util/findNdjsonEntry.js +21 -0
- package/dist/util/findNdjsonEntry.js.map +1 -0
- package/dist/util/formatSize.js +10 -0
- package/dist/util/formatSize.js.map +1 -0
- package/dist/util/frameworkPort.js +61 -0
- package/dist/util/frameworkPort.js.map +1 -0
- package/dist/util/fsUtils.js +34 -0
- package/dist/util/fsUtils.js.map +1 -0
- package/dist/util/getCliVersion.js +28 -0
- package/dist/util/getCliVersion.js.map +1 -0
- package/dist/util/getErrorMessage.js +19 -0
- package/dist/util/getErrorMessage.js.map +1 -0
- package/dist/util/getLocalPackageVersion.js +32 -0
- package/dist/util/getLocalPackageVersion.js.map +1 -0
- package/dist/util/getProjectDefaults.js +77 -0
- package/dist/util/getProjectDefaults.js.map +1 -0
- package/dist/util/getSanityEnv.js +3 -0
- package/dist/util/getSanityEnv.js.map +1 -0
- package/dist/util/getSharedServerConfig.js +31 -0
- package/dist/util/getSharedServerConfig.js.map +1 -0
- package/dist/util/getWorkspace.js +18 -0
- package/dist/util/getWorkspace.js.map +1 -0
- package/dist/util/humanFileSize.js +12 -0
- package/dist/util/humanFileSize.js.map +1 -0
- package/dist/util/importStudioConfig.js +40 -0
- package/dist/util/importStudioConfig.js.map +1 -0
- package/dist/util/isPathDirName.js +6 -0
- package/dist/util/isPathDirName.js.map +1 -0
- package/dist/util/isSanityDocumentish.js +20 -0
- package/dist/util/isSanityDocumentish.js.map +1 -0
- package/dist/util/loadEnv.js +3 -0
- package/dist/util/loadEnv.js.map +1 -0
- package/dist/util/moduleFormatUtils.js +18 -0
- package/dist/util/moduleFormatUtils.js.map +1 -0
- package/dist/util/packageManager/installPackages.js +87 -0
- package/dist/util/packageManager/installPackages.js.map +1 -0
- package/dist/util/packageManager/packageManagerChoice.js +181 -0
- package/dist/util/packageManager/packageManagerChoice.js.map +1 -0
- package/dist/util/packageManager/upgradePackages.js +69 -0
- package/dist/util/packageManager/upgradePackages.js.map +1 -0
- package/dist/util/parseArguments.js +42 -0
- package/dist/util/parseArguments.js.map +1 -0
- package/dist/util/pluralize.js +11 -0
- package/dist/util/pluralize.js.map +1 -0
- package/dist/util/readModuleVersion.js +15 -0
- package/dist/util/readModuleVersion.js.map +1 -0
- package/dist/util/readPackageJson.js +44 -0
- package/dist/util/readPackageJson.js.map +1 -0
- package/dist/util/readPackageManifest.js +46 -0
- package/dist/util/readPackageManifest.js.map +1 -0
- package/dist/util/readdirRecursive.js +24 -0
- package/dist/util/readdirRecursive.js.map +1 -0
- package/dist/util/resolveLatestVersions.js +21 -0
- package/dist/util/resolveLatestVersions.js.map +1 -0
- package/dist/util/toInt.js +9 -0
- package/dist/util/toInt.js.map +1 -0
- package/dist/util/trimHashFromVersion.js +8 -0
- package/dist/util/trimHashFromVersion.js.map +1 -0
- package/dist/util/uniqBy.js +14 -0
- package/dist/util/uniqBy.js.map +1 -0
- package/dist/util/validation/validateDocumentsUtils.js +33 -0
- package/dist/util/validation/validateDocumentsUtils.js.map +1 -0
- package/dist/util/warnAboutMissingAppId.js +15 -0
- package/dist/util/warnAboutMissingAppId.js.map +1 -0
- package/dist/util/warnOnNonProductionEnvironment.js +18 -0
- package/dist/util/warnOnNonProductionEnvironment.js.map +1 -0
- package/dist/util/workerChannels.js +172 -0
- package/dist/util/workerChannels.js.map +1 -0
- package/oclif.config.js +21 -0
- package/oclif.manifest.json +4154 -0
- package/package.json +138 -98
- package/templates/app-quickstart/src/App.css +3 -1
- package/templates/app-quickstart/src/App.tsx +1 -1
- package/templates/app-sanity-ui/src/App.tsx +2 -2
- package/templates/app-sanity-ui/src/ExampleComponent.tsx +2 -1
- package/templates/get-started/plugins/sanity-plugin-tutorial/GetStartedTutorial.tsx +3 -3
- package/templates/get-started/plugins/sanity-plugin-tutorial/index.ts +2 -2
- package/templates/shopify/components/hotspots/ProductTooltip.tsx +1 -1
- package/templates/shopify/components/icons/Shopify.tsx +0 -2
- package/templates/shopify/components/inputs/CollectionHidden.tsx +0 -1
- package/templates/shopify/components/media/ColorTheme.tsx +1 -1
- package/templates/shopify/constants.ts +4 -4
- package/templates/shopify/plugins/customDocumentActions/index.ts +2 -2
- package/templates/shopify/plugins/customDocumentActions/shopifyDelete.tsx +1 -1
- package/templates/shopify/schemaTypes/documents/collection.tsx +1 -2
- package/templates/shopify/schemaTypes/documents/page.ts +1 -1
- package/templates/shopify/schemaTypes/documents/product.tsx +1 -1
- package/templates/shopify/schemaTypes/documents/productVariant.tsx +2 -3
- package/templates/shopify/schemaTypes/objects/customProductOption/customProductOptionColorObjectType.tsx +0 -1
- package/templates/shopify/schemaTypes/objects/hotspot/productHotspotsType.tsx +1 -3
- package/templates/shopify/schemaTypes/objects/module/collectionReferenceType.tsx +0 -1
- package/templates/shopify/schemaTypes/objects/shopify/placeholderStringType.ts +2 -3
- package/templates/shopify/schemaTypes/objects/shopify/productWithVariantType.tsx +1 -1
- package/templates/shopify/schemaTypes/objects/shopify/shopifyCollectionType.ts +1 -2
- package/templates/shopify/schemaTypes/objects/shopify/shopifyProductType.ts +1 -2
- package/templates/shopify/schemaTypes/portableText/portableTextType.tsx +7 -7
- package/templates/shopify/schemaTypes/singletons/homeType.ts +8 -8
- package/templates/shopify/structure/collectionStructure.ts +4 -1
- package/templates/shopify/structure/colorThemeStructure.ts +1 -1
- package/templates/shopify/structure/homeStructure.ts +2 -2
- package/templates/shopify/structure/index.ts +1 -1
- package/templates/shopify/structure/pageStructure.ts +2 -2
- package/templates/shopify/structure/productStructure.ts +7 -7
- package/templates/shopify/structure/settingStructure.ts +1 -1
- package/templates/shopify/utils/defineStructure.ts +1 -1
- package/templates/shopify-online-storefront/plugins/shopifyDocumentActions/index.ts +1 -1
- package/templates/shopify-online-storefront/plugins/shopifyDocumentActions/shopifyDelete.tsx +1 -1
- package/templates/shopify-online-storefront/structure/collectionStructure.ts +4 -1
- package/templates/shopify-online-storefront/structure/productStructure.ts +4 -4
- package/templates/shopify-online-storefront/utils/defineStructure.ts +1 -1
- package/bin/dev.js +0 -30
- package/bin/sanity +0 -14
- package/lib/_chunks-cjs/cli.js +0 -70870
- package/lib/_chunks-cjs/cli.js.map +0 -1
- package/lib/_chunks-cjs/cliWorker.js +0 -19
- package/lib/_chunks-cjs/cliWorker.js.map +0 -1
- package/lib/_chunks-cjs/generateAction.js +0 -128
- package/lib/_chunks-cjs/generateAction.js.map +0 -1
- package/lib/_chunks-cjs/getCliConfig.js +0 -89
- package/lib/_chunks-cjs/getCliConfig.js.map +0 -1
- package/lib/_chunks-cjs/index.js +0 -31
- package/lib/_chunks-cjs/index.js.map +0 -1
- package/lib/_chunks-cjs/journeyConfig.js +0 -113
- package/lib/_chunks-cjs/journeyConfig.js.map +0 -1
- package/lib/_chunks-cjs/loadEnv.js +0 -347
- package/lib/_chunks-cjs/loadEnv.js.map +0 -1
- package/lib/_chunks-dts/types.d.ts +0 -432
- package/lib/cli.d.ts +0 -7
- package/lib/cli.js +0 -10
- package/lib/cli.js.map +0 -1
- package/lib/index.d.ts +0 -44
- package/lib/index.js +0 -46
- package/lib/index.js.map +0 -1
- package/lib/run.d.ts +0 -1
- package/lib/run.js +0 -8
- package/lib/run.js.map +0 -1
- package/lib/workers/getAndWriteJourneySchema.d.ts +0 -1
- package/lib/workers/getAndWriteJourneySchema.js +0 -4
- package/lib/workers/getAndWriteJourneySchema.js.map +0 -1
- package/lib/workers/getCliConfig.d.ts +0 -1
- package/lib/workers/getCliConfig.js +0 -10
- package/lib/workers/getCliConfig.js.map +0 -1
- package/lib/workers/typegenGenerate.d.ts +0 -18
- package/lib/workers/typegenGenerate.js +0 -47
- package/lib/workers/typegenGenerate.js.map +0 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2326 @@
|
|
|
1
|
+
import {CliConfig} from '@sanity/cli-core'
|
|
2
|
+
import {loadEnv} from 'vite'
|
|
3
|
+
import {NodePath} from '@babel/core'
|
|
4
|
+
import {NodePath as NodePath_2} from '@babel/traverse'
|
|
5
|
+
import {SanityClient} from '@sanity/client'
|
|
6
|
+
import {Scope} from '@babel/traverse'
|
|
7
|
+
import * as t from '@babel/types'
|
|
8
|
+
import {UserViteConfig} from '@sanity/cli-core'
|
|
9
|
+
import {z} from 'zod'
|
|
10
|
+
|
|
11
|
+
declare type AliasingEffect =
|
|
12
|
+
| {
|
|
13
|
+
kind: 'Freeze'
|
|
14
|
+
value: Place
|
|
15
|
+
reason: ValueReason
|
|
16
|
+
}
|
|
17
|
+
| {
|
|
18
|
+
kind: 'Mutate'
|
|
19
|
+
value: Place
|
|
20
|
+
reason?: MutationReason | null
|
|
21
|
+
}
|
|
22
|
+
| {
|
|
23
|
+
kind: 'MutateConditionally'
|
|
24
|
+
value: Place
|
|
25
|
+
}
|
|
26
|
+
| {
|
|
27
|
+
kind: 'MutateTransitive'
|
|
28
|
+
value: Place
|
|
29
|
+
}
|
|
30
|
+
| {
|
|
31
|
+
kind: 'MutateTransitiveConditionally'
|
|
32
|
+
value: Place
|
|
33
|
+
}
|
|
34
|
+
| {
|
|
35
|
+
kind: 'Capture'
|
|
36
|
+
from: Place
|
|
37
|
+
into: Place
|
|
38
|
+
}
|
|
39
|
+
| {
|
|
40
|
+
kind: 'Alias'
|
|
41
|
+
from: Place
|
|
42
|
+
into: Place
|
|
43
|
+
}
|
|
44
|
+
| {
|
|
45
|
+
kind: 'MaybeAlias'
|
|
46
|
+
from: Place
|
|
47
|
+
into: Place
|
|
48
|
+
}
|
|
49
|
+
| {
|
|
50
|
+
kind: 'Assign'
|
|
51
|
+
from: Place
|
|
52
|
+
into: Place
|
|
53
|
+
}
|
|
54
|
+
| {
|
|
55
|
+
kind: 'Create'
|
|
56
|
+
into: Place
|
|
57
|
+
value: ValueKind
|
|
58
|
+
reason: ValueReason
|
|
59
|
+
}
|
|
60
|
+
| {
|
|
61
|
+
kind: 'CreateFrom'
|
|
62
|
+
from: Place
|
|
63
|
+
into: Place
|
|
64
|
+
}
|
|
65
|
+
| {
|
|
66
|
+
kind: 'ImmutableCapture'
|
|
67
|
+
from: Place
|
|
68
|
+
into: Place
|
|
69
|
+
}
|
|
70
|
+
| {
|
|
71
|
+
kind: 'Apply'
|
|
72
|
+
receiver: Place
|
|
73
|
+
function: Place
|
|
74
|
+
mutatesFunction: boolean
|
|
75
|
+
args: Array<Place | SpreadPattern | Hole>
|
|
76
|
+
into: Place
|
|
77
|
+
signature: FunctionSignature | null
|
|
78
|
+
loc: SourceLocation
|
|
79
|
+
}
|
|
80
|
+
| {
|
|
81
|
+
kind: 'CreateFunction'
|
|
82
|
+
captures: Array<Place>
|
|
83
|
+
function: FunctionExpression | ObjectMethod
|
|
84
|
+
into: Place
|
|
85
|
+
}
|
|
86
|
+
| {
|
|
87
|
+
kind: 'MutateFrozen'
|
|
88
|
+
place: Place
|
|
89
|
+
error: CompilerDiagnostic
|
|
90
|
+
}
|
|
91
|
+
| {
|
|
92
|
+
kind: 'MutateGlobal'
|
|
93
|
+
place: Place
|
|
94
|
+
error: CompilerDiagnostic
|
|
95
|
+
}
|
|
96
|
+
| {
|
|
97
|
+
kind: 'Impure'
|
|
98
|
+
place: Place
|
|
99
|
+
error: CompilerDiagnostic
|
|
100
|
+
}
|
|
101
|
+
| {
|
|
102
|
+
kind: 'Render'
|
|
103
|
+
place: Place
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
declare type AliasingSignature = {
|
|
107
|
+
receiver: IdentifierId
|
|
108
|
+
params: Array<IdentifierId>
|
|
109
|
+
rest: IdentifierId | null
|
|
110
|
+
returns: IdentifierId
|
|
111
|
+
effects: Array<AliasingEffect>
|
|
112
|
+
temporaries: Array<Place>
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
declare type ArrayExpression = {
|
|
116
|
+
kind: 'ArrayExpression'
|
|
117
|
+
elements: Array<Place | SpreadPattern | Hole>
|
|
118
|
+
loc: SourceLocation
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
declare type ArrayPattern = {
|
|
122
|
+
kind: 'ArrayPattern'
|
|
123
|
+
items: Array<Place | SpreadPattern | Hole>
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
declare type AutoDepsDecorationsEvent = {
|
|
127
|
+
kind: 'AutoDepsDecorations'
|
|
128
|
+
fnLoc: t.SourceLocation
|
|
129
|
+
decorations: Array<t.SourceLocation>
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
declare type AutoDepsEligibleEvent = {
|
|
133
|
+
kind: 'AutoDepsEligible'
|
|
134
|
+
fnLoc: t.SourceLocation
|
|
135
|
+
depArrayLoc: t.SourceLocation
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare type BabelFn =
|
|
139
|
+
| NodePath<t.FunctionDeclaration>
|
|
140
|
+
| NodePath<t.FunctionExpression>
|
|
141
|
+
| NodePath<t.ArrowFunctionExpression>
|
|
142
|
+
|
|
143
|
+
declare type BasicBlock = {
|
|
144
|
+
kind: BlockKind
|
|
145
|
+
id: BlockId
|
|
146
|
+
instructions: Array<Instruction>
|
|
147
|
+
terminal: Terminal
|
|
148
|
+
preds: Set<BlockId>
|
|
149
|
+
phis: Set<Phi>
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
declare type BlockId = number & {
|
|
153
|
+
[opaqueBlockId]: 'BlockId'
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
declare type BlockKind = 'block' | 'value' | 'loop' | 'sequence' | 'catch'
|
|
157
|
+
|
|
158
|
+
declare type BranchTerminal = {
|
|
159
|
+
kind: 'branch'
|
|
160
|
+
test: Place
|
|
161
|
+
consequent: BlockId
|
|
162
|
+
alternate: BlockId
|
|
163
|
+
id: InstructionId
|
|
164
|
+
loc: SourceLocation
|
|
165
|
+
fallthrough: BlockId
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
declare type BuiltinTag = {
|
|
169
|
+
kind: 'BuiltinTag'
|
|
170
|
+
name: string
|
|
171
|
+
loc: SourceLocation
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
declare type BuiltInType = PrimitiveType | FunctionType | ObjectType
|
|
175
|
+
|
|
176
|
+
declare type CallExpression = {
|
|
177
|
+
kind: 'CallExpression'
|
|
178
|
+
callee: Place
|
|
179
|
+
args: Array<Place | SpreadPattern>
|
|
180
|
+
loc: SourceLocation
|
|
181
|
+
typeArguments?: Array<t.FlowType>
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
declare type Case = {
|
|
185
|
+
test: Place | null
|
|
186
|
+
block: BlockId
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
declare type CliClientGetter = ((options?: CliClientOptions) => SanityClient) & {
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated This is only for INTERNAL use, and should not be relied upon outside of official Sanity modules
|
|
192
|
+
* @returns A token to use when constructing a client without a `token` explicitly defined, or undefined
|
|
193
|
+
* @internal
|
|
194
|
+
*/
|
|
195
|
+
__internal__getToken: () => string | undefined
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @public
|
|
200
|
+
*/
|
|
201
|
+
export declare interface CliClientOptions {
|
|
202
|
+
apiVersion?: string
|
|
203
|
+
cwd?: string
|
|
204
|
+
dataset?: string
|
|
205
|
+
projectId?: string
|
|
206
|
+
token?: string
|
|
207
|
+
useCdn?: boolean
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
declare type CodegenFunction = {
|
|
211
|
+
type: 'CodegenFunction'
|
|
212
|
+
id: t.Identifier | null
|
|
213
|
+
nameHint: string | null
|
|
214
|
+
params: t.FunctionDeclaration['params']
|
|
215
|
+
body: t.BlockStatement
|
|
216
|
+
generator: boolean
|
|
217
|
+
async: boolean
|
|
218
|
+
loc: SourceLocation
|
|
219
|
+
memoSlotsUsed: number
|
|
220
|
+
memoBlocks: number
|
|
221
|
+
memoValues: number
|
|
222
|
+
prunedMemoBlocks: number
|
|
223
|
+
prunedMemoValues: number
|
|
224
|
+
outlined: Array<{
|
|
225
|
+
fn: CodegenFunction
|
|
226
|
+
type: ReactFunctionType | null
|
|
227
|
+
}>
|
|
228
|
+
hasInferredEffect: boolean
|
|
229
|
+
inferredEffectLocations: Set<SourceLocation>
|
|
230
|
+
hasFireRewrite: boolean
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
declare type CompilationMode = z.infer<typeof CompilationModeSchema>
|
|
234
|
+
|
|
235
|
+
declare const CompilationModeSchema: z.ZodEnum<{
|
|
236
|
+
syntax: 'syntax'
|
|
237
|
+
infer: 'infer'
|
|
238
|
+
annotation: 'annotation'
|
|
239
|
+
all: 'all'
|
|
240
|
+
}>
|
|
241
|
+
|
|
242
|
+
declare type CompileDiagnosticEvent = {
|
|
243
|
+
kind: 'CompileDiagnostic'
|
|
244
|
+
fnLoc: t.SourceLocation | null
|
|
245
|
+
detail: Omit<Omit<CompilerErrorDetailOptions, 'severity'>, 'suggestions'>
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
declare type CompileErrorEvent = {
|
|
249
|
+
kind: 'CompileError'
|
|
250
|
+
fnLoc: t.SourceLocation | null
|
|
251
|
+
detail: CompilerErrorDetail | CompilerDiagnostic
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
declare class CompilerDiagnostic {
|
|
255
|
+
options: CompilerDiagnosticOptions
|
|
256
|
+
constructor(options: CompilerDiagnosticOptions)
|
|
257
|
+
static create(options: Omit<CompilerDiagnosticOptions, 'details'>): CompilerDiagnostic
|
|
258
|
+
get reason(): CompilerDiagnosticOptions['reason']
|
|
259
|
+
get description(): CompilerDiagnosticOptions['description']
|
|
260
|
+
get severity(): ErrorSeverity
|
|
261
|
+
get suggestions(): CompilerDiagnosticOptions['suggestions']
|
|
262
|
+
get category(): ErrorCategory
|
|
263
|
+
withDetails(...details: Array<CompilerDiagnosticDetail>): CompilerDiagnostic
|
|
264
|
+
primaryLocation(): SourceLocation | null
|
|
265
|
+
printErrorMessage(source: string, options: PrintErrorMessageOptions): string
|
|
266
|
+
toString(): string
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
declare type CompilerDiagnosticDetail =
|
|
270
|
+
| {
|
|
271
|
+
kind: 'error'
|
|
272
|
+
loc: SourceLocation | null
|
|
273
|
+
message: string | null
|
|
274
|
+
}
|
|
275
|
+
| {
|
|
276
|
+
kind: 'hint'
|
|
277
|
+
message: string
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
declare type CompilerDiagnosticOptions = {
|
|
281
|
+
category: ErrorCategory
|
|
282
|
+
reason: string
|
|
283
|
+
description: string | null
|
|
284
|
+
details: Array<CompilerDiagnosticDetail>
|
|
285
|
+
suggestions?: Array<CompilerSuggestion> | null | undefined
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
declare class CompilerError extends Error {
|
|
289
|
+
details: Array<CompilerErrorDetail | CompilerDiagnostic>
|
|
290
|
+
disabledDetails: Array<CompilerErrorDetail | CompilerDiagnostic>
|
|
291
|
+
printedMessage: string | null
|
|
292
|
+
static invariant(
|
|
293
|
+
condition: unknown,
|
|
294
|
+
options: Omit<CompilerDiagnosticOptions, 'category'>,
|
|
295
|
+
): asserts condition
|
|
296
|
+
static throwDiagnostic(options: CompilerDiagnosticOptions): never
|
|
297
|
+
static throwTodo(options: Omit<CompilerErrorDetailOptions, 'category'>): never
|
|
298
|
+
static throwInvalidJS(options: Omit<CompilerErrorDetailOptions, 'category'>): never
|
|
299
|
+
static throwInvalidReact(options: CompilerErrorDetailOptions): never
|
|
300
|
+
static throwInvalidConfig(options: Omit<CompilerErrorDetailOptions, 'category'>): never
|
|
301
|
+
static throw(options: CompilerErrorDetailOptions): never
|
|
302
|
+
constructor(...args: Array<any>)
|
|
303
|
+
get message(): string
|
|
304
|
+
set message(_message: string)
|
|
305
|
+
toString(): string
|
|
306
|
+
withPrintedMessage(source: string, options: PrintErrorMessageOptions): CompilerError
|
|
307
|
+
printErrorMessage(source: string, options: PrintErrorMessageOptions): string
|
|
308
|
+
merge(other: CompilerError): void
|
|
309
|
+
pushDiagnostic(diagnostic: CompilerDiagnostic): void
|
|
310
|
+
push(options: CompilerErrorDetailOptions): CompilerErrorDetail
|
|
311
|
+
pushErrorDetail(detail: CompilerErrorDetail): CompilerErrorDetail
|
|
312
|
+
hasAnyErrors(): boolean
|
|
313
|
+
asResult(): Result<void, CompilerError>
|
|
314
|
+
hasErrors(): boolean
|
|
315
|
+
hasWarning(): boolean
|
|
316
|
+
hasHints(): boolean
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
declare class CompilerErrorDetail {
|
|
320
|
+
options: CompilerErrorDetailOptions
|
|
321
|
+
constructor(options: CompilerErrorDetailOptions)
|
|
322
|
+
get reason(): CompilerErrorDetailOptions['reason']
|
|
323
|
+
get description(): CompilerErrorDetailOptions['description']
|
|
324
|
+
get severity(): ErrorSeverity
|
|
325
|
+
get loc(): CompilerErrorDetailOptions['loc']
|
|
326
|
+
get suggestions(): CompilerErrorDetailOptions['suggestions']
|
|
327
|
+
get category(): ErrorCategory
|
|
328
|
+
primaryLocation(): SourceLocation | null
|
|
329
|
+
printErrorMessage(source: string, options: PrintErrorMessageOptions): string
|
|
330
|
+
toString(): string
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
declare type CompilerErrorDetailOptions = {
|
|
334
|
+
category: ErrorCategory
|
|
335
|
+
reason: string
|
|
336
|
+
description?: string | null | undefined
|
|
337
|
+
loc: SourceLocation | null
|
|
338
|
+
suggestions?: Array<CompilerSuggestion> | null | undefined
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
declare type CompilerMode = 'all_features' | 'no_inferred_memo'
|
|
342
|
+
|
|
343
|
+
declare type CompilerPipelineValue =
|
|
344
|
+
| {
|
|
345
|
+
kind: 'ast'
|
|
346
|
+
name: string
|
|
347
|
+
value: CodegenFunction
|
|
348
|
+
}
|
|
349
|
+
| {
|
|
350
|
+
kind: 'hir'
|
|
351
|
+
name: string
|
|
352
|
+
value: HIRFunction
|
|
353
|
+
}
|
|
354
|
+
| {
|
|
355
|
+
kind: 'reactive'
|
|
356
|
+
name: string
|
|
357
|
+
value: ReactiveFunction
|
|
358
|
+
}
|
|
359
|
+
| {
|
|
360
|
+
kind: 'debug'
|
|
361
|
+
name: string
|
|
362
|
+
value: string
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
declare type CompilerReactTarget = z.infer<typeof CompilerReactTargetSchema>
|
|
366
|
+
|
|
367
|
+
declare const CompilerReactTargetSchema: z.ZodUnion<
|
|
368
|
+
readonly [
|
|
369
|
+
z.ZodLiteral<'17'>,
|
|
370
|
+
z.ZodLiteral<'18'>,
|
|
371
|
+
z.ZodLiteral<'19'>,
|
|
372
|
+
z.ZodObject<
|
|
373
|
+
{
|
|
374
|
+
kind: z.ZodLiteral<'donotuse_meta_internal'>
|
|
375
|
+
runtimeModule: z.ZodDefault<z.ZodString>
|
|
376
|
+
},
|
|
377
|
+
z.core.$strip
|
|
378
|
+
>,
|
|
379
|
+
]
|
|
380
|
+
>
|
|
381
|
+
|
|
382
|
+
declare type CompilerSuggestion =
|
|
383
|
+
| {
|
|
384
|
+
op:
|
|
385
|
+
| CompilerSuggestionOperation.InsertAfter
|
|
386
|
+
| CompilerSuggestionOperation.InsertBefore
|
|
387
|
+
| CompilerSuggestionOperation.Replace
|
|
388
|
+
range: [number, number]
|
|
389
|
+
description: string
|
|
390
|
+
text: string
|
|
391
|
+
}
|
|
392
|
+
| {
|
|
393
|
+
op: CompilerSuggestionOperation.Remove
|
|
394
|
+
range: [number, number]
|
|
395
|
+
description: string
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
declare enum CompilerSuggestionOperation {
|
|
399
|
+
InsertBefore = 0,
|
|
400
|
+
InsertAfter = 1,
|
|
401
|
+
Remove = 2,
|
|
402
|
+
Replace = 3,
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
declare type CompileSkipEvent = {
|
|
406
|
+
kind: 'CompileSkip'
|
|
407
|
+
fnLoc: t.SourceLocation | null
|
|
408
|
+
reason: string
|
|
409
|
+
loc: t.SourceLocation | null
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
declare type CompileSuccessEvent = {
|
|
413
|
+
kind: 'CompileSuccess'
|
|
414
|
+
fnLoc: t.SourceLocation | null
|
|
415
|
+
fnName: string | null
|
|
416
|
+
memoSlots: number
|
|
417
|
+
memoBlocks: number
|
|
418
|
+
memoValues: number
|
|
419
|
+
prunedMemoBlocks: number
|
|
420
|
+
prunedMemoValues: number
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
declare type ComponentType<T> = {
|
|
424
|
+
kind: 'Component'
|
|
425
|
+
props: Map<string, T>
|
|
426
|
+
children: null | T
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
declare type ConcreteType<T> =
|
|
430
|
+
| {
|
|
431
|
+
kind: 'Enum'
|
|
432
|
+
}
|
|
433
|
+
| {
|
|
434
|
+
kind: 'Mixed'
|
|
435
|
+
}
|
|
436
|
+
| {
|
|
437
|
+
kind: 'Number'
|
|
438
|
+
}
|
|
439
|
+
| {
|
|
440
|
+
kind: 'String'
|
|
441
|
+
}
|
|
442
|
+
| {
|
|
443
|
+
kind: 'Boolean'
|
|
444
|
+
}
|
|
445
|
+
| {
|
|
446
|
+
kind: 'Void'
|
|
447
|
+
}
|
|
448
|
+
| {
|
|
449
|
+
kind: 'Nullable'
|
|
450
|
+
type: T
|
|
451
|
+
}
|
|
452
|
+
| {
|
|
453
|
+
kind: 'Array'
|
|
454
|
+
element: T
|
|
455
|
+
}
|
|
456
|
+
| {
|
|
457
|
+
kind: 'Set'
|
|
458
|
+
element: T
|
|
459
|
+
}
|
|
460
|
+
| {
|
|
461
|
+
kind: 'Map'
|
|
462
|
+
key: T
|
|
463
|
+
value: T
|
|
464
|
+
}
|
|
465
|
+
| {
|
|
466
|
+
kind: 'Function'
|
|
467
|
+
typeParameters: null | Array<TypeParameter<T>>
|
|
468
|
+
params: Array<T>
|
|
469
|
+
returnType: T
|
|
470
|
+
}
|
|
471
|
+
| ComponentType<T>
|
|
472
|
+
| {
|
|
473
|
+
kind: 'Generic'
|
|
474
|
+
id: TypeParameterId
|
|
475
|
+
bound: T
|
|
476
|
+
}
|
|
477
|
+
| {
|
|
478
|
+
kind: 'Object'
|
|
479
|
+
id: NominalId
|
|
480
|
+
members: Map<string, ResolvedType>
|
|
481
|
+
}
|
|
482
|
+
| {
|
|
483
|
+
kind: 'Tuple'
|
|
484
|
+
id: NominalId
|
|
485
|
+
members: Array<T>
|
|
486
|
+
}
|
|
487
|
+
| {
|
|
488
|
+
kind: 'Structural'
|
|
489
|
+
id: LinearId
|
|
490
|
+
}
|
|
491
|
+
| {
|
|
492
|
+
kind: 'Union'
|
|
493
|
+
members: Array<T>
|
|
494
|
+
}
|
|
495
|
+
| {
|
|
496
|
+
kind: 'Instance'
|
|
497
|
+
name: string
|
|
498
|
+
members: Map<string, ResolvedType>
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* @deprecated Use `defineCliConfig` instead
|
|
503
|
+
* @public
|
|
504
|
+
*/
|
|
505
|
+
export declare function createCliConfig(config: CliConfig): {
|
|
506
|
+
api?:
|
|
507
|
+
| {
|
|
508
|
+
dataset?: string | undefined
|
|
509
|
+
projectId?: string | undefined
|
|
510
|
+
}
|
|
511
|
+
| undefined
|
|
512
|
+
app?:
|
|
513
|
+
| {
|
|
514
|
+
entry?: string | undefined
|
|
515
|
+
icon?: string | undefined
|
|
516
|
+
id?: string | undefined
|
|
517
|
+
organizationId?: string | undefined
|
|
518
|
+
title?: string | undefined
|
|
519
|
+
}
|
|
520
|
+
| undefined
|
|
521
|
+
autoUpdates?: boolean | undefined
|
|
522
|
+
deployment?:
|
|
523
|
+
| {
|
|
524
|
+
appId?: string | undefined
|
|
525
|
+
autoUpdates?: boolean | undefined
|
|
526
|
+
}
|
|
527
|
+
| undefined
|
|
528
|
+
graphql?:
|
|
529
|
+
| {
|
|
530
|
+
filterSuffix?: string | undefined
|
|
531
|
+
generation?: 'gen1' | 'gen2' | 'gen3' | undefined
|
|
532
|
+
id?: string | undefined
|
|
533
|
+
nonNullDocumentFields?: boolean | undefined
|
|
534
|
+
playground?: boolean | undefined
|
|
535
|
+
source?: string | undefined
|
|
536
|
+
tag?: string | undefined
|
|
537
|
+
workspace?: string | undefined
|
|
538
|
+
}[]
|
|
539
|
+
| undefined
|
|
540
|
+
mediaLibrary?:
|
|
541
|
+
| {
|
|
542
|
+
aspectsPath?: string | undefined
|
|
543
|
+
}
|
|
544
|
+
| undefined
|
|
545
|
+
project?:
|
|
546
|
+
| {
|
|
547
|
+
basePath?: string | undefined
|
|
548
|
+
}
|
|
549
|
+
| undefined
|
|
550
|
+
reactCompiler?:
|
|
551
|
+
| Partial<{
|
|
552
|
+
environment: Partial<EnvironmentConfig>
|
|
553
|
+
logger: Logger | null
|
|
554
|
+
gating: ExternalFunction | null
|
|
555
|
+
dynamicGating: {
|
|
556
|
+
source: string
|
|
557
|
+
} | null
|
|
558
|
+
panicThreshold: 'none' | 'all_errors' | 'critical_errors'
|
|
559
|
+
noEmit: boolean
|
|
560
|
+
compilationMode: 'syntax' | 'infer' | 'annotation' | 'all'
|
|
561
|
+
eslintSuppressionRules: Array<string> | null | undefined
|
|
562
|
+
flowSuppressions: boolean
|
|
563
|
+
ignoreUseNoForget: boolean
|
|
564
|
+
customOptOutDirectives: string[] | null
|
|
565
|
+
sources: Array<string> | ((filename: string) => boolean) | null
|
|
566
|
+
enableReanimatedCheck: boolean
|
|
567
|
+
target:
|
|
568
|
+
| '17'
|
|
569
|
+
| '18'
|
|
570
|
+
| '19'
|
|
571
|
+
| {
|
|
572
|
+
kind: 'donotuse_meta_internal'
|
|
573
|
+
runtimeModule: string
|
|
574
|
+
}
|
|
575
|
+
}>
|
|
576
|
+
| undefined
|
|
577
|
+
reactStrictMode?: boolean | undefined
|
|
578
|
+
server?:
|
|
579
|
+
| {
|
|
580
|
+
hostname?: string | undefined
|
|
581
|
+
port?: number | undefined
|
|
582
|
+
}
|
|
583
|
+
| undefined
|
|
584
|
+
studioHost?: string | undefined
|
|
585
|
+
vite?: UserViteConfig | undefined
|
|
586
|
+
typegen?:
|
|
587
|
+
| {
|
|
588
|
+
formatGeneratedCode: boolean
|
|
589
|
+
generates: string
|
|
590
|
+
overloadClientMethods: boolean
|
|
591
|
+
path: string | string[]
|
|
592
|
+
schema: string
|
|
593
|
+
}
|
|
594
|
+
| undefined
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
declare type CustomOptOutDirective = z.infer<typeof CustomOptOutDirectiveSchema>
|
|
598
|
+
|
|
599
|
+
declare const CustomOptOutDirectiveSchema: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>
|
|
600
|
+
|
|
601
|
+
declare type DeclarationId = number & {
|
|
602
|
+
[opageDeclarationId]: 'DeclarationId'
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/** @beta */
|
|
606
|
+
export declare function defineCliConfig(config: CliConfig): CliConfig
|
|
607
|
+
|
|
608
|
+
declare type DependencyPath = Array<DependencyPathEntry>
|
|
609
|
+
|
|
610
|
+
declare type DependencyPathEntry = {
|
|
611
|
+
property: PropertyLiteral
|
|
612
|
+
optional: boolean
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
declare type Destructure = {
|
|
616
|
+
kind: 'Destructure'
|
|
617
|
+
lvalue: LValuePattern
|
|
618
|
+
value: Place
|
|
619
|
+
loc: SourceLocation
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
declare type DoWhileTerminal = {
|
|
623
|
+
kind: 'do-while'
|
|
624
|
+
loop: BlockId
|
|
625
|
+
test: BlockId
|
|
626
|
+
fallthrough: BlockId
|
|
627
|
+
id: InstructionId
|
|
628
|
+
loc: SourceLocation
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
declare type DynamicGatingOptions = z.infer<typeof DynamicGatingOptionsSchema>
|
|
632
|
+
|
|
633
|
+
declare const DynamicGatingOptionsSchema: z.ZodObject<
|
|
634
|
+
{
|
|
635
|
+
source: z.ZodString
|
|
636
|
+
},
|
|
637
|
+
z.core.$strip
|
|
638
|
+
>
|
|
639
|
+
|
|
640
|
+
declare enum Effect {
|
|
641
|
+
Unknown = '<unknown>',
|
|
642
|
+
Freeze = 'freeze',
|
|
643
|
+
Read = 'read',
|
|
644
|
+
Capture = 'capture',
|
|
645
|
+
ConditionallyMutateIterator = 'mutate-iterator?',
|
|
646
|
+
ConditionallyMutate = 'mutate?',
|
|
647
|
+
Mutate = 'mutate',
|
|
648
|
+
Store = 'store',
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
declare class Environment {
|
|
652
|
+
#private
|
|
653
|
+
logger: Logger | null
|
|
654
|
+
filename: string | null
|
|
655
|
+
code: string | null
|
|
656
|
+
config: EnvironmentConfig
|
|
657
|
+
fnType: ReactFunctionType
|
|
658
|
+
compilerMode: CompilerMode
|
|
659
|
+
programContext: ProgramContext
|
|
660
|
+
hasFireRewrite: boolean
|
|
661
|
+
hasInferredEffect: boolean
|
|
662
|
+
inferredEffectLocations: Set<SourceLocation>
|
|
663
|
+
parentFunction: NodePath_2<t.Function>
|
|
664
|
+
constructor(
|
|
665
|
+
scope: Scope,
|
|
666
|
+
fnType: ReactFunctionType,
|
|
667
|
+
compilerMode: CompilerMode,
|
|
668
|
+
config: EnvironmentConfig,
|
|
669
|
+
contextIdentifiers: Set<t.Identifier>,
|
|
670
|
+
parentFunction: NodePath_2<t.Function>,
|
|
671
|
+
logger: Logger | null,
|
|
672
|
+
filename: string | null,
|
|
673
|
+
code: string | null,
|
|
674
|
+
programContext: ProgramContext,
|
|
675
|
+
)
|
|
676
|
+
get typeContext(): FlowTypeEnv
|
|
677
|
+
get isInferredMemoEnabled(): boolean
|
|
678
|
+
get nextIdentifierId(): IdentifierId
|
|
679
|
+
get nextBlockId(): BlockId
|
|
680
|
+
get nextScopeId(): ScopeId
|
|
681
|
+
get scope(): Scope
|
|
682
|
+
logErrors(errors: Result<void, CompilerError>): void
|
|
683
|
+
isContextIdentifier(node: t.Identifier): boolean
|
|
684
|
+
isHoistedIdentifier(node: t.Identifier): boolean
|
|
685
|
+
generateGloballyUniqueIdentifierName(name: string | null): ValidatedIdentifier
|
|
686
|
+
outlineFunction(fn: HIRFunction, type: ReactFunctionType | null): void
|
|
687
|
+
getOutlinedFunctions(): Array<{
|
|
688
|
+
fn: HIRFunction
|
|
689
|
+
type: ReactFunctionType | null
|
|
690
|
+
}>
|
|
691
|
+
getGlobalDeclaration(binding: NonLocalBinding, loc: SourceLocation): Global_2 | null
|
|
692
|
+
static knownReactModules: ReadonlyArray<string>
|
|
693
|
+
getFallthroughPropertyType(receiver: Type, _property: Type): BuiltInType | PolyType | null
|
|
694
|
+
getPropertyType(receiver: Type, property: string | number): BuiltInType | PolyType | null
|
|
695
|
+
getFunctionSignature(type: FunctionType): FunctionSignature | null
|
|
696
|
+
addHoistedIdentifier(node: t.Identifier): void
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
declare type EnvironmentConfig = z.infer<typeof EnvironmentConfigSchema>
|
|
700
|
+
|
|
701
|
+
declare const EnvironmentConfigSchema: z.ZodObject<
|
|
702
|
+
{
|
|
703
|
+
customHooks: z.ZodDefault<
|
|
704
|
+
z.ZodMap<
|
|
705
|
+
z.ZodString,
|
|
706
|
+
z.ZodObject<
|
|
707
|
+
{
|
|
708
|
+
effectKind: z.ZodEnum<typeof Effect>
|
|
709
|
+
valueKind: z.ZodEnum<typeof ValueKind>
|
|
710
|
+
noAlias: z.ZodDefault<z.ZodBoolean>
|
|
711
|
+
transitiveMixedData: z.ZodDefault<z.ZodBoolean>
|
|
712
|
+
},
|
|
713
|
+
z.core.$strip
|
|
714
|
+
>
|
|
715
|
+
>
|
|
716
|
+
>
|
|
717
|
+
moduleTypeProvider: z.ZodDefault<z.ZodNullable<z.ZodAny>>
|
|
718
|
+
customMacros: z.ZodDefault<
|
|
719
|
+
z.ZodNullable<
|
|
720
|
+
z.ZodArray<
|
|
721
|
+
z.ZodUnion<
|
|
722
|
+
readonly [
|
|
723
|
+
z.ZodString,
|
|
724
|
+
z.ZodTuple<
|
|
725
|
+
[
|
|
726
|
+
z.ZodString,
|
|
727
|
+
z.ZodArray<
|
|
728
|
+
z.ZodUnion<
|
|
729
|
+
readonly [
|
|
730
|
+
z.ZodObject<
|
|
731
|
+
{
|
|
732
|
+
type: z.ZodLiteral<'wildcard'>
|
|
733
|
+
},
|
|
734
|
+
z.core.$strip
|
|
735
|
+
>,
|
|
736
|
+
z.ZodObject<
|
|
737
|
+
{
|
|
738
|
+
type: z.ZodLiteral<'name'>
|
|
739
|
+
name: z.ZodString
|
|
740
|
+
},
|
|
741
|
+
z.core.$strip
|
|
742
|
+
>,
|
|
743
|
+
]
|
|
744
|
+
>
|
|
745
|
+
>,
|
|
746
|
+
],
|
|
747
|
+
null
|
|
748
|
+
>,
|
|
749
|
+
]
|
|
750
|
+
>
|
|
751
|
+
>
|
|
752
|
+
>
|
|
753
|
+
>
|
|
754
|
+
enableResetCacheOnSourceFileChanges: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>
|
|
755
|
+
enablePreserveExistingMemoizationGuarantees: z.ZodDefault<z.ZodBoolean>
|
|
756
|
+
validatePreserveExistingMemoizationGuarantees: z.ZodDefault<z.ZodBoolean>
|
|
757
|
+
enablePreserveExistingManualUseMemo: z.ZodDefault<z.ZodBoolean>
|
|
758
|
+
enableForest: z.ZodDefault<z.ZodBoolean>
|
|
759
|
+
enableUseTypeAnnotations: z.ZodDefault<z.ZodBoolean>
|
|
760
|
+
flowTypeProvider: z.ZodDefault<z.ZodNullable<z.ZodAny>>
|
|
761
|
+
enableOptionalDependencies: z.ZodDefault<z.ZodBoolean>
|
|
762
|
+
enableFire: z.ZodDefault<z.ZodBoolean>
|
|
763
|
+
enableNameAnonymousFunctions: z.ZodDefault<z.ZodBoolean>
|
|
764
|
+
inferEffectDependencies: z.ZodDefault<
|
|
765
|
+
z.ZodNullable<
|
|
766
|
+
z.ZodArray<
|
|
767
|
+
z.ZodObject<
|
|
768
|
+
{
|
|
769
|
+
function: z.ZodObject<
|
|
770
|
+
{
|
|
771
|
+
source: z.ZodString
|
|
772
|
+
importSpecifierName: z.ZodString
|
|
773
|
+
},
|
|
774
|
+
z.core.$strip
|
|
775
|
+
>
|
|
776
|
+
autodepsIndex: z.ZodNumber
|
|
777
|
+
},
|
|
778
|
+
z.core.$strip
|
|
779
|
+
>
|
|
780
|
+
>
|
|
781
|
+
>
|
|
782
|
+
>
|
|
783
|
+
inlineJsxTransform: z.ZodDefault<
|
|
784
|
+
z.ZodNullable<
|
|
785
|
+
z.ZodObject<
|
|
786
|
+
{
|
|
787
|
+
elementSymbol: z.ZodUnion<
|
|
788
|
+
readonly [z.ZodLiteral<'react.element'>, z.ZodLiteral<'react.transitional.element'>]
|
|
789
|
+
>
|
|
790
|
+
globalDevVar: z.ZodString
|
|
791
|
+
},
|
|
792
|
+
z.core.$strip
|
|
793
|
+
>
|
|
794
|
+
>
|
|
795
|
+
>
|
|
796
|
+
validateHooksUsage: z.ZodDefault<z.ZodBoolean>
|
|
797
|
+
validateRefAccessDuringRender: z.ZodDefault<z.ZodBoolean>
|
|
798
|
+
validateNoSetStateInRender: z.ZodDefault<z.ZodBoolean>
|
|
799
|
+
validateNoSetStateInEffects: z.ZodDefault<z.ZodBoolean>
|
|
800
|
+
validateNoDerivedComputationsInEffects: z.ZodDefault<z.ZodBoolean>
|
|
801
|
+
validateNoJSXInTryStatements: z.ZodDefault<z.ZodBoolean>
|
|
802
|
+
validateStaticComponents: z.ZodDefault<z.ZodBoolean>
|
|
803
|
+
validateMemoizedEffectDependencies: z.ZodDefault<z.ZodBoolean>
|
|
804
|
+
validateNoCapitalizedCalls: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>
|
|
805
|
+
validateBlocklistedImports: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>
|
|
806
|
+
validateNoImpureFunctionsInRender: z.ZodDefault<z.ZodBoolean>
|
|
807
|
+
validateNoFreezingKnownMutableFunctions: z.ZodDefault<z.ZodBoolean>
|
|
808
|
+
enableAssumeHooksFollowRulesOfReact: z.ZodDefault<z.ZodBoolean>
|
|
809
|
+
enableTransitivelyFreezeFunctionExpressions: z.ZodDefault<z.ZodBoolean>
|
|
810
|
+
enableEmitFreeze: z.ZodDefault<
|
|
811
|
+
z.ZodNullable<
|
|
812
|
+
z.ZodObject<
|
|
813
|
+
{
|
|
814
|
+
source: z.ZodString
|
|
815
|
+
importSpecifierName: z.ZodString
|
|
816
|
+
},
|
|
817
|
+
z.core.$strip
|
|
818
|
+
>
|
|
819
|
+
>
|
|
820
|
+
>
|
|
821
|
+
enableEmitHookGuards: z.ZodDefault<
|
|
822
|
+
z.ZodNullable<
|
|
823
|
+
z.ZodObject<
|
|
824
|
+
{
|
|
825
|
+
source: z.ZodString
|
|
826
|
+
importSpecifierName: z.ZodString
|
|
827
|
+
},
|
|
828
|
+
z.core.$strip
|
|
829
|
+
>
|
|
830
|
+
>
|
|
831
|
+
>
|
|
832
|
+
enableInstructionReordering: z.ZodDefault<z.ZodBoolean>
|
|
833
|
+
enableFunctionOutlining: z.ZodDefault<z.ZodBoolean>
|
|
834
|
+
enableJsxOutlining: z.ZodDefault<z.ZodBoolean>
|
|
835
|
+
enableEmitInstrumentForget: z.ZodDefault<
|
|
836
|
+
z.ZodNullable<
|
|
837
|
+
z.ZodObject<
|
|
838
|
+
{
|
|
839
|
+
fn: z.ZodObject<
|
|
840
|
+
{
|
|
841
|
+
source: z.ZodString
|
|
842
|
+
importSpecifierName: z.ZodString
|
|
843
|
+
},
|
|
844
|
+
z.core.$strip
|
|
845
|
+
>
|
|
846
|
+
gating: z.ZodNullable<
|
|
847
|
+
z.ZodObject<
|
|
848
|
+
{
|
|
849
|
+
source: z.ZodString
|
|
850
|
+
importSpecifierName: z.ZodString
|
|
851
|
+
},
|
|
852
|
+
z.core.$strip
|
|
853
|
+
>
|
|
854
|
+
>
|
|
855
|
+
globalGating: z.ZodNullable<z.ZodString>
|
|
856
|
+
},
|
|
857
|
+
z.core.$strip
|
|
858
|
+
>
|
|
859
|
+
>
|
|
860
|
+
>
|
|
861
|
+
assertValidMutableRanges: z.ZodDefault<z.ZodBoolean>
|
|
862
|
+
enableChangeVariableCodegen: z.ZodDefault<z.ZodBoolean>
|
|
863
|
+
enableMemoizationComments: z.ZodDefault<z.ZodBoolean>
|
|
864
|
+
throwUnknownException__testonly: z.ZodDefault<z.ZodBoolean>
|
|
865
|
+
enableTreatFunctionDepsAsConditional: z.ZodDefault<z.ZodBoolean>
|
|
866
|
+
disableMemoizationForDebugging: z.ZodDefault<z.ZodBoolean>
|
|
867
|
+
enableChangeDetectionForDebugging: z.ZodDefault<
|
|
868
|
+
z.ZodNullable<
|
|
869
|
+
z.ZodObject<
|
|
870
|
+
{
|
|
871
|
+
source: z.ZodString
|
|
872
|
+
importSpecifierName: z.ZodString
|
|
873
|
+
},
|
|
874
|
+
z.core.$strip
|
|
875
|
+
>
|
|
876
|
+
>
|
|
877
|
+
>
|
|
878
|
+
enableCustomTypeDefinitionForReanimated: z.ZodDefault<z.ZodBoolean>
|
|
879
|
+
hookPattern: z.ZodDefault<z.ZodNullable<z.ZodString>>
|
|
880
|
+
enableTreatRefLikeIdentifiersAsRefs: z.ZodDefault<z.ZodBoolean>
|
|
881
|
+
enableTreatSetIdentifiersAsStateSetters: z.ZodDefault<z.ZodBoolean>
|
|
882
|
+
lowerContextAccess: z.ZodDefault<
|
|
883
|
+
z.ZodNullable<
|
|
884
|
+
z.ZodObject<
|
|
885
|
+
{
|
|
886
|
+
source: z.ZodString
|
|
887
|
+
importSpecifierName: z.ZodString
|
|
888
|
+
},
|
|
889
|
+
z.core.$strip
|
|
890
|
+
>
|
|
891
|
+
>
|
|
892
|
+
>
|
|
893
|
+
validateNoVoidUseMemo: z.ZodDefault<z.ZodBoolean>
|
|
894
|
+
validateNoDynamicallyCreatedComponentsOrHooks: z.ZodDefault<z.ZodBoolean>
|
|
895
|
+
enableAllowSetStateFromRefsInEffects: z.ZodDefault<z.ZodBoolean>
|
|
896
|
+
},
|
|
897
|
+
z.core.$strip
|
|
898
|
+
>
|
|
899
|
+
|
|
900
|
+
declare class ErrImpl<E> implements Result<never, E> {
|
|
901
|
+
#private
|
|
902
|
+
constructor(val: E)
|
|
903
|
+
map<U>(_fn: (val: never) => U): Result<U, E>
|
|
904
|
+
mapErr<F>(fn: (val: E) => F): Result<never, F>
|
|
905
|
+
mapOr<U>(fallback: U, _fn: (val: never) => U): U
|
|
906
|
+
mapOrElse<U>(fallback: () => U, _fn: (val: never) => U): U
|
|
907
|
+
andThen<U>(_fn: (val: never) => Result<U, E>): Result<U, E>
|
|
908
|
+
and<U>(_res: Result<U, E>): Result<U, E>
|
|
909
|
+
or(res: Result<never, E>): Result<never, E>
|
|
910
|
+
orElse<F>(fn: (val: E) => ErrImpl<F>): Result<never, F>
|
|
911
|
+
isOk(): this is OkImpl<never>
|
|
912
|
+
isErr(): this is ErrImpl<E>
|
|
913
|
+
expect(msg: string): never
|
|
914
|
+
expectErr(_msg: string): E
|
|
915
|
+
unwrap(): never
|
|
916
|
+
unwrapOr<T>(fallback: T): T
|
|
917
|
+
unwrapOrElse<T>(fallback: (val: E) => T): T
|
|
918
|
+
unwrapErr(): E
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
declare enum ErrorCategory {
|
|
922
|
+
Hooks = 'Hooks',
|
|
923
|
+
CapitalizedCalls = 'CapitalizedCalls',
|
|
924
|
+
StaticComponents = 'StaticComponents',
|
|
925
|
+
UseMemo = 'UseMemo',
|
|
926
|
+
Factories = 'Factories',
|
|
927
|
+
PreserveManualMemo = 'PreserveManualMemo',
|
|
928
|
+
IncompatibleLibrary = 'IncompatibleLibrary',
|
|
929
|
+
Immutability = 'Immutability',
|
|
930
|
+
Globals = 'Globals',
|
|
931
|
+
Refs = 'Refs',
|
|
932
|
+
EffectDependencies = 'EffectDependencies',
|
|
933
|
+
EffectSetState = 'EffectSetState',
|
|
934
|
+
EffectDerivationsOfState = 'EffectDerivationsOfState',
|
|
935
|
+
ErrorBoundaries = 'ErrorBoundaries',
|
|
936
|
+
Purity = 'Purity',
|
|
937
|
+
RenderSetState = 'RenderSetState',
|
|
938
|
+
Invariant = 'Invariant',
|
|
939
|
+
Todo = 'Todo',
|
|
940
|
+
Syntax = 'Syntax',
|
|
941
|
+
UnsupportedSyntax = 'UnsupportedSyntax',
|
|
942
|
+
Config = 'Config',
|
|
943
|
+
Gating = 'Gating',
|
|
944
|
+
Suppression = 'Suppression',
|
|
945
|
+
AutomaticEffectDependencies = 'AutomaticEffectDependencies',
|
|
946
|
+
Fire = 'Fire',
|
|
947
|
+
FBT = 'FBT',
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
declare enum ErrorSeverity {
|
|
951
|
+
Error = 'Error',
|
|
952
|
+
Warning = 'Warning',
|
|
953
|
+
Hint = 'Hint',
|
|
954
|
+
Off = 'Off',
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
declare type ExternalFunction = z.infer<typeof ExternalFunctionSchema>
|
|
958
|
+
|
|
959
|
+
declare const ExternalFunctionSchema: z.ZodObject<
|
|
960
|
+
{
|
|
961
|
+
source: z.ZodString
|
|
962
|
+
importSpecifierName: z.ZodString
|
|
963
|
+
},
|
|
964
|
+
z.core.$strip
|
|
965
|
+
>
|
|
966
|
+
|
|
967
|
+
declare type FinishMemoize = {
|
|
968
|
+
kind: 'FinishMemoize'
|
|
969
|
+
manualMemoId: number
|
|
970
|
+
decl: Place
|
|
971
|
+
pruned?: true
|
|
972
|
+
loc: SourceLocation
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
declare class FlowTypeEnv implements ITypeEnv {
|
|
976
|
+
#private
|
|
977
|
+
moduleEnv: Map<string, ResolvedType>
|
|
978
|
+
init(env: Environment, source: string): void
|
|
979
|
+
setType(identifier: Identifier, type: ResolvedType): void
|
|
980
|
+
getType(identifier: Identifier): ResolvedType
|
|
981
|
+
getTypeOrNull(identifier: Identifier): ResolvedType | null
|
|
982
|
+
getTypeByLoc(loc: SourceLocation): ResolvedType | null
|
|
983
|
+
nextNominalId(): NominalId
|
|
984
|
+
nextTypeParameterId(): TypeParameterId
|
|
985
|
+
addBinding(bindingIdentifier: t.Identifier, type: ResolvedType): void
|
|
986
|
+
resolveBinding(bindingIdentifier: t.Identifier): ResolvedType | null
|
|
987
|
+
pushGeneric(name: string, generic: TypeParameter<ResolvedType>): void
|
|
988
|
+
popGeneric(name: string): void
|
|
989
|
+
getGeneric(name: string): null | TypeParameter<ResolvedType>
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
declare type ForInTerminal = {
|
|
993
|
+
kind: 'for-in'
|
|
994
|
+
loc: SourceLocation
|
|
995
|
+
init: BlockId
|
|
996
|
+
loop: BlockId
|
|
997
|
+
fallthrough: BlockId
|
|
998
|
+
id: InstructionId
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
declare type ForOfTerminal = {
|
|
1002
|
+
kind: 'for-of'
|
|
1003
|
+
loc: SourceLocation
|
|
1004
|
+
init: BlockId
|
|
1005
|
+
test: BlockId
|
|
1006
|
+
loop: BlockId
|
|
1007
|
+
fallthrough: BlockId
|
|
1008
|
+
id: InstructionId
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
declare type ForTerminal = {
|
|
1012
|
+
kind: 'for'
|
|
1013
|
+
loc: SourceLocation
|
|
1014
|
+
init: BlockId
|
|
1015
|
+
test: BlockId
|
|
1016
|
+
update: BlockId | null
|
|
1017
|
+
loop: BlockId
|
|
1018
|
+
fallthrough: BlockId
|
|
1019
|
+
id: InstructionId
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
declare type FunctionExpression = {
|
|
1023
|
+
kind: 'FunctionExpression'
|
|
1024
|
+
name: ValidIdentifierName | null
|
|
1025
|
+
nameHint: string | null
|
|
1026
|
+
loweredFunc: LoweredFunction
|
|
1027
|
+
type: 'ArrowFunctionExpression' | 'FunctionExpression' | 'FunctionDeclaration'
|
|
1028
|
+
loc: SourceLocation
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
declare type FunctionSignature = {
|
|
1032
|
+
positionalParams: Array<Effect>
|
|
1033
|
+
restParam: Effect | null
|
|
1034
|
+
returnType: BuiltInType | PolyType
|
|
1035
|
+
returnValueKind: ValueKind
|
|
1036
|
+
returnValueReason?: ValueReason
|
|
1037
|
+
calleeEffect: Effect
|
|
1038
|
+
hookKind: HookKind | null
|
|
1039
|
+
noAlias?: boolean
|
|
1040
|
+
mutableOnlyIfOperandsAreMutable?: boolean
|
|
1041
|
+
impure?: boolean
|
|
1042
|
+
knownIncompatible?: string | null | undefined
|
|
1043
|
+
canonicalName?: string
|
|
1044
|
+
aliasing?: AliasingSignature | null | undefined
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
declare type FunctionType = {
|
|
1048
|
+
kind: 'Function'
|
|
1049
|
+
shapeId: string | null
|
|
1050
|
+
return: Type
|
|
1051
|
+
isConstructor: boolean
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
declare const GeneratedSource: unique symbol
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* @public
|
|
1058
|
+
*
|
|
1059
|
+
* @param options - The options to use for the client.
|
|
1060
|
+
* @returns A configured Sanity API client.
|
|
1061
|
+
*/
|
|
1062
|
+
export declare const getCliClient: CliClientGetter
|
|
1063
|
+
|
|
1064
|
+
declare type Global_2 = BuiltInType | PolyType
|
|
1065
|
+
|
|
1066
|
+
declare type GotoTerminal = {
|
|
1067
|
+
kind: 'goto'
|
|
1068
|
+
block: BlockId
|
|
1069
|
+
variant: GotoVariant
|
|
1070
|
+
id: InstructionId
|
|
1071
|
+
loc: SourceLocation
|
|
1072
|
+
fallthrough?: never
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
declare enum GotoVariant {
|
|
1076
|
+
Break = 'Break',
|
|
1077
|
+
Continue = 'Continue',
|
|
1078
|
+
Try = 'Try',
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
declare type HIR = {
|
|
1082
|
+
entry: BlockId
|
|
1083
|
+
blocks: Map<BlockId, BasicBlock>
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
declare type HIRFunction = {
|
|
1087
|
+
loc: SourceLocation
|
|
1088
|
+
id: ValidIdentifierName | null
|
|
1089
|
+
nameHint: string | null
|
|
1090
|
+
fnType: ReactFunctionType
|
|
1091
|
+
env: Environment
|
|
1092
|
+
params: Array<Place | SpreadPattern>
|
|
1093
|
+
returnTypeAnnotation: t.FlowType | t.TSType | null
|
|
1094
|
+
returns: Place
|
|
1095
|
+
context: Array<Place>
|
|
1096
|
+
body: HIR
|
|
1097
|
+
generator: boolean
|
|
1098
|
+
async: boolean
|
|
1099
|
+
directives: Array<string>
|
|
1100
|
+
aliasingEffects: Array<AliasingEffect> | null
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
declare type Hole = {
|
|
1104
|
+
kind: 'Hole'
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
declare type HookKind =
|
|
1108
|
+
| 'useContext'
|
|
1109
|
+
| 'useState'
|
|
1110
|
+
| 'useActionState'
|
|
1111
|
+
| 'useReducer'
|
|
1112
|
+
| 'useRef'
|
|
1113
|
+
| 'useEffect'
|
|
1114
|
+
| 'useLayoutEffect'
|
|
1115
|
+
| 'useInsertionEffect'
|
|
1116
|
+
| 'useMemo'
|
|
1117
|
+
| 'useCallback'
|
|
1118
|
+
| 'useTransition'
|
|
1119
|
+
| 'useImperativeHandle'
|
|
1120
|
+
| 'useEffectEvent'
|
|
1121
|
+
| 'Custom'
|
|
1122
|
+
|
|
1123
|
+
declare type Identifier = {
|
|
1124
|
+
id: IdentifierId
|
|
1125
|
+
declarationId: DeclarationId
|
|
1126
|
+
name: IdentifierName | null
|
|
1127
|
+
mutableRange: MutableRange
|
|
1128
|
+
scope: ReactiveScope | null
|
|
1129
|
+
type: Type
|
|
1130
|
+
loc: SourceLocation
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
declare type IdentifierId = number & {
|
|
1134
|
+
[opaqueIdentifierId]: 'IdentifierId'
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
declare type IdentifierName = ValidatedIdentifier | PromotedIdentifier
|
|
1138
|
+
|
|
1139
|
+
declare type IfTerminal = {
|
|
1140
|
+
kind: 'if'
|
|
1141
|
+
test: Place
|
|
1142
|
+
consequent: BlockId
|
|
1143
|
+
alternate: BlockId
|
|
1144
|
+
fallthrough: BlockId
|
|
1145
|
+
id: InstructionId
|
|
1146
|
+
loc: SourceLocation
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
declare type Instruction = {
|
|
1150
|
+
id: InstructionId
|
|
1151
|
+
lvalue: Place
|
|
1152
|
+
value: InstructionValue
|
|
1153
|
+
loc: SourceLocation
|
|
1154
|
+
effects: Array<AliasingEffect> | null
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
declare type InstructionId = number & {
|
|
1158
|
+
[opaqueInstructionId]: 'IdentifierId'
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
declare enum InstructionKind {
|
|
1162
|
+
Const = 'Const',
|
|
1163
|
+
Let = 'Let',
|
|
1164
|
+
Reassign = 'Reassign',
|
|
1165
|
+
Catch = 'Catch',
|
|
1166
|
+
HoistedConst = 'HoistedConst',
|
|
1167
|
+
HoistedLet = 'HoistedLet',
|
|
1168
|
+
HoistedFunction = 'HoistedFunction',
|
|
1169
|
+
Function = 'Function',
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
declare type InstructionValue =
|
|
1173
|
+
| LoadLocal
|
|
1174
|
+
| LoadContext
|
|
1175
|
+
| {
|
|
1176
|
+
kind: 'DeclareLocal'
|
|
1177
|
+
lvalue: LValue
|
|
1178
|
+
type: t.FlowType | t.TSType | null
|
|
1179
|
+
loc: SourceLocation
|
|
1180
|
+
}
|
|
1181
|
+
| {
|
|
1182
|
+
kind: 'DeclareContext'
|
|
1183
|
+
lvalue: {
|
|
1184
|
+
kind:
|
|
1185
|
+
| InstructionKind.Let
|
|
1186
|
+
| InstructionKind.HoistedConst
|
|
1187
|
+
| InstructionKind.HoistedLet
|
|
1188
|
+
| InstructionKind.HoistedFunction
|
|
1189
|
+
place: Place
|
|
1190
|
+
}
|
|
1191
|
+
loc: SourceLocation
|
|
1192
|
+
}
|
|
1193
|
+
| StoreLocal
|
|
1194
|
+
| {
|
|
1195
|
+
kind: 'StoreContext'
|
|
1196
|
+
lvalue: {
|
|
1197
|
+
kind:
|
|
1198
|
+
| InstructionKind.Reassign
|
|
1199
|
+
| InstructionKind.Const
|
|
1200
|
+
| InstructionKind.Let
|
|
1201
|
+
| InstructionKind.Function
|
|
1202
|
+
place: Place
|
|
1203
|
+
}
|
|
1204
|
+
value: Place
|
|
1205
|
+
loc: SourceLocation
|
|
1206
|
+
}
|
|
1207
|
+
| Destructure
|
|
1208
|
+
| {
|
|
1209
|
+
kind: 'Primitive'
|
|
1210
|
+
value: number | boolean | string | null | undefined
|
|
1211
|
+
loc: SourceLocation
|
|
1212
|
+
}
|
|
1213
|
+
| JSXText
|
|
1214
|
+
| {
|
|
1215
|
+
kind: 'BinaryExpression'
|
|
1216
|
+
operator: Exclude<t.BinaryExpression['operator'], '|>'>
|
|
1217
|
+
left: Place
|
|
1218
|
+
right: Place
|
|
1219
|
+
loc: SourceLocation
|
|
1220
|
+
}
|
|
1221
|
+
| NewExpression
|
|
1222
|
+
| CallExpression
|
|
1223
|
+
| MethodCall
|
|
1224
|
+
| {
|
|
1225
|
+
kind: 'UnaryExpression'
|
|
1226
|
+
operator: Exclude<t.UnaryExpression['operator'], 'throw' | 'delete'>
|
|
1227
|
+
value: Place
|
|
1228
|
+
loc: SourceLocation
|
|
1229
|
+
}
|
|
1230
|
+
| ({
|
|
1231
|
+
kind: 'TypeCastExpression'
|
|
1232
|
+
value: Place
|
|
1233
|
+
type: Type
|
|
1234
|
+
loc: SourceLocation
|
|
1235
|
+
} & (
|
|
1236
|
+
| {
|
|
1237
|
+
typeAnnotation: t.FlowType
|
|
1238
|
+
typeAnnotationKind: 'cast'
|
|
1239
|
+
}
|
|
1240
|
+
| {
|
|
1241
|
+
typeAnnotation: t.TSType
|
|
1242
|
+
typeAnnotationKind: 'as' | 'satisfies'
|
|
1243
|
+
}
|
|
1244
|
+
))
|
|
1245
|
+
| JsxExpression
|
|
1246
|
+
| {
|
|
1247
|
+
kind: 'ObjectExpression'
|
|
1248
|
+
properties: Array<ObjectProperty | SpreadPattern>
|
|
1249
|
+
loc: SourceLocation
|
|
1250
|
+
}
|
|
1251
|
+
| ObjectMethod
|
|
1252
|
+
| ArrayExpression
|
|
1253
|
+
| {
|
|
1254
|
+
kind: 'JsxFragment'
|
|
1255
|
+
children: Array<Place>
|
|
1256
|
+
loc: SourceLocation
|
|
1257
|
+
}
|
|
1258
|
+
| {
|
|
1259
|
+
kind: 'RegExpLiteral'
|
|
1260
|
+
pattern: string
|
|
1261
|
+
flags: string
|
|
1262
|
+
loc: SourceLocation
|
|
1263
|
+
}
|
|
1264
|
+
| {
|
|
1265
|
+
kind: 'MetaProperty'
|
|
1266
|
+
meta: string
|
|
1267
|
+
property: string
|
|
1268
|
+
loc: SourceLocation
|
|
1269
|
+
}
|
|
1270
|
+
| {
|
|
1271
|
+
kind: 'PropertyStore'
|
|
1272
|
+
object: Place
|
|
1273
|
+
property: PropertyLiteral
|
|
1274
|
+
value: Place
|
|
1275
|
+
loc: SourceLocation
|
|
1276
|
+
}
|
|
1277
|
+
| PropertyLoad
|
|
1278
|
+
| {
|
|
1279
|
+
kind: 'PropertyDelete'
|
|
1280
|
+
object: Place
|
|
1281
|
+
property: PropertyLiteral
|
|
1282
|
+
loc: SourceLocation
|
|
1283
|
+
}
|
|
1284
|
+
| {
|
|
1285
|
+
kind: 'ComputedStore'
|
|
1286
|
+
object: Place
|
|
1287
|
+
property: Place
|
|
1288
|
+
value: Place
|
|
1289
|
+
loc: SourceLocation
|
|
1290
|
+
}
|
|
1291
|
+
| {
|
|
1292
|
+
kind: 'ComputedLoad'
|
|
1293
|
+
object: Place
|
|
1294
|
+
property: Place
|
|
1295
|
+
loc: SourceLocation
|
|
1296
|
+
}
|
|
1297
|
+
| {
|
|
1298
|
+
kind: 'ComputedDelete'
|
|
1299
|
+
object: Place
|
|
1300
|
+
property: Place
|
|
1301
|
+
loc: SourceLocation
|
|
1302
|
+
}
|
|
1303
|
+
| LoadGlobal
|
|
1304
|
+
| StoreGlobal
|
|
1305
|
+
| FunctionExpression
|
|
1306
|
+
| {
|
|
1307
|
+
kind: 'TaggedTemplateExpression'
|
|
1308
|
+
tag: Place
|
|
1309
|
+
value: {
|
|
1310
|
+
raw: string
|
|
1311
|
+
cooked?: string
|
|
1312
|
+
}
|
|
1313
|
+
loc: SourceLocation
|
|
1314
|
+
}
|
|
1315
|
+
| {
|
|
1316
|
+
kind: 'TemplateLiteral'
|
|
1317
|
+
subexprs: Array<Place>
|
|
1318
|
+
quasis: Array<{
|
|
1319
|
+
raw: string
|
|
1320
|
+
cooked?: string
|
|
1321
|
+
}>
|
|
1322
|
+
loc: SourceLocation
|
|
1323
|
+
}
|
|
1324
|
+
| {
|
|
1325
|
+
kind: 'Await'
|
|
1326
|
+
value: Place
|
|
1327
|
+
loc: SourceLocation
|
|
1328
|
+
}
|
|
1329
|
+
| {
|
|
1330
|
+
kind: 'GetIterator'
|
|
1331
|
+
collection: Place
|
|
1332
|
+
loc: SourceLocation
|
|
1333
|
+
}
|
|
1334
|
+
| {
|
|
1335
|
+
kind: 'IteratorNext'
|
|
1336
|
+
iterator: Place
|
|
1337
|
+
collection: Place
|
|
1338
|
+
loc: SourceLocation
|
|
1339
|
+
}
|
|
1340
|
+
| {
|
|
1341
|
+
kind: 'NextPropertyOf'
|
|
1342
|
+
value: Place
|
|
1343
|
+
loc: SourceLocation
|
|
1344
|
+
}
|
|
1345
|
+
| {
|
|
1346
|
+
kind: 'PrefixUpdate'
|
|
1347
|
+
lvalue: Place
|
|
1348
|
+
operation: t.UpdateExpression['operator']
|
|
1349
|
+
value: Place
|
|
1350
|
+
loc: SourceLocation
|
|
1351
|
+
}
|
|
1352
|
+
| {
|
|
1353
|
+
kind: 'PostfixUpdate'
|
|
1354
|
+
lvalue: Place
|
|
1355
|
+
operation: t.UpdateExpression['operator']
|
|
1356
|
+
value: Place
|
|
1357
|
+
loc: SourceLocation
|
|
1358
|
+
}
|
|
1359
|
+
| {
|
|
1360
|
+
kind: 'Debugger'
|
|
1361
|
+
loc: SourceLocation
|
|
1362
|
+
}
|
|
1363
|
+
| StartMemoize
|
|
1364
|
+
| FinishMemoize
|
|
1365
|
+
| {
|
|
1366
|
+
kind: 'UnsupportedNode'
|
|
1367
|
+
node: t.Node
|
|
1368
|
+
loc: SourceLocation
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
declare interface ITypeEnv {
|
|
1372
|
+
popGeneric(name: string): void
|
|
1373
|
+
getGeneric(name: string): null | TypeParameter<ResolvedType>
|
|
1374
|
+
pushGeneric(
|
|
1375
|
+
name: string,
|
|
1376
|
+
binding: {
|
|
1377
|
+
name: string
|
|
1378
|
+
id: TypeParameterId
|
|
1379
|
+
bound: ResolvedType
|
|
1380
|
+
},
|
|
1381
|
+
): void
|
|
1382
|
+
getType(id: Identifier): ResolvedType
|
|
1383
|
+
getTypeOrNull(id: Identifier): ResolvedType | null
|
|
1384
|
+
setType(id: Identifier, type: ResolvedType): void
|
|
1385
|
+
nextNominalId(): NominalId
|
|
1386
|
+
nextTypeParameterId(): TypeParameterId
|
|
1387
|
+
moduleEnv: Map<string, ResolvedType>
|
|
1388
|
+
addBinding(bindingIdentifier: t.Identifier, type: ResolvedType): void
|
|
1389
|
+
resolveBinding(bindingIdentifier: t.Identifier): ResolvedType | null
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
declare type JsxAttribute =
|
|
1393
|
+
| {
|
|
1394
|
+
kind: 'JsxSpreadAttribute'
|
|
1395
|
+
argument: Place
|
|
1396
|
+
}
|
|
1397
|
+
| {
|
|
1398
|
+
kind: 'JsxAttribute'
|
|
1399
|
+
name: string
|
|
1400
|
+
place: Place
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
declare type JsxExpression = {
|
|
1404
|
+
kind: 'JsxExpression'
|
|
1405
|
+
tag: Place | BuiltinTag
|
|
1406
|
+
props: Array<JsxAttribute>
|
|
1407
|
+
children: Array<Place> | null
|
|
1408
|
+
loc: SourceLocation
|
|
1409
|
+
openingLoc: SourceLocation
|
|
1410
|
+
closingLoc: SourceLocation
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
declare type JSXText = {
|
|
1414
|
+
kind: 'JSXText'
|
|
1415
|
+
value: string
|
|
1416
|
+
loc: SourceLocation
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
declare type LabelTerminal = {
|
|
1420
|
+
kind: 'label'
|
|
1421
|
+
block: BlockId
|
|
1422
|
+
fallthrough: BlockId
|
|
1423
|
+
id: InstructionId
|
|
1424
|
+
loc: SourceLocation
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
declare type LinearId = number & {
|
|
1428
|
+
[opaqueLinearId]: 'LinearId'
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
declare type LoadContext = {
|
|
1432
|
+
kind: 'LoadContext'
|
|
1433
|
+
place: Place
|
|
1434
|
+
loc: SourceLocation
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
export {loadEnv}
|
|
1438
|
+
|
|
1439
|
+
declare type LoadGlobal = {
|
|
1440
|
+
kind: 'LoadGlobal'
|
|
1441
|
+
binding: NonLocalBinding
|
|
1442
|
+
loc: SourceLocation
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
declare type LoadLocal = {
|
|
1446
|
+
kind: 'LoadLocal'
|
|
1447
|
+
place: Place
|
|
1448
|
+
loc: SourceLocation
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
declare type Logger = {
|
|
1452
|
+
logEvent: (filename: string | null, event: LoggerEvent) => void
|
|
1453
|
+
debugLogIRs?: (value: CompilerPipelineValue) => void
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
declare type LoggerEvent =
|
|
1457
|
+
| CompileSuccessEvent
|
|
1458
|
+
| CompileErrorEvent
|
|
1459
|
+
| CompileDiagnosticEvent
|
|
1460
|
+
| CompileSkipEvent
|
|
1461
|
+
| PipelineErrorEvent
|
|
1462
|
+
| TimingEvent
|
|
1463
|
+
| AutoDepsDecorationsEvent
|
|
1464
|
+
| AutoDepsEligibleEvent
|
|
1465
|
+
|
|
1466
|
+
declare type LogicalTerminal = {
|
|
1467
|
+
kind: 'logical'
|
|
1468
|
+
operator: t.LogicalExpression['operator']
|
|
1469
|
+
test: BlockId
|
|
1470
|
+
fallthrough: BlockId
|
|
1471
|
+
id: InstructionId
|
|
1472
|
+
loc: SourceLocation
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
declare type LoweredFunction = {
|
|
1476
|
+
func: HIRFunction
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
declare type LValue = {
|
|
1480
|
+
place: Place
|
|
1481
|
+
kind: InstructionKind
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
declare type LValuePattern = {
|
|
1485
|
+
pattern: Pattern
|
|
1486
|
+
kind: InstructionKind
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
declare type ManualMemoDependency = {
|
|
1490
|
+
root:
|
|
1491
|
+
| {
|
|
1492
|
+
kind: 'NamedLocal'
|
|
1493
|
+
value: Place
|
|
1494
|
+
}
|
|
1495
|
+
| {
|
|
1496
|
+
kind: 'Global'
|
|
1497
|
+
identifierName: string
|
|
1498
|
+
}
|
|
1499
|
+
path: DependencyPath
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
declare type MaybeThrowTerminal = {
|
|
1503
|
+
kind: 'maybe-throw'
|
|
1504
|
+
continuation: BlockId
|
|
1505
|
+
handler: BlockId
|
|
1506
|
+
id: InstructionId
|
|
1507
|
+
loc: SourceLocation
|
|
1508
|
+
fallthrough?: never
|
|
1509
|
+
effects: Array<AliasingEffect> | null
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
declare type MethodCall = {
|
|
1513
|
+
kind: 'MethodCall'
|
|
1514
|
+
receiver: Place
|
|
1515
|
+
property: Place
|
|
1516
|
+
args: Array<Place | SpreadPattern>
|
|
1517
|
+
loc: SourceLocation
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
declare type MutableRange = {
|
|
1521
|
+
start: InstructionId
|
|
1522
|
+
end: InstructionId
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
declare type MutationReason = {
|
|
1526
|
+
kind: 'AssignCurrentProperty'
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
declare type NewExpression = {
|
|
1530
|
+
kind: 'NewExpression'
|
|
1531
|
+
callee: Place
|
|
1532
|
+
args: Array<Place | SpreadPattern>
|
|
1533
|
+
loc: SourceLocation
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
declare type NominalId = number & {
|
|
1537
|
+
[opaqueNominalId]: 'NominalId'
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
declare type NonLocalBinding =
|
|
1541
|
+
| {
|
|
1542
|
+
kind: 'ImportDefault'
|
|
1543
|
+
name: string
|
|
1544
|
+
module: string
|
|
1545
|
+
}
|
|
1546
|
+
| {
|
|
1547
|
+
kind: 'ImportNamespace'
|
|
1548
|
+
name: string
|
|
1549
|
+
module: string
|
|
1550
|
+
}
|
|
1551
|
+
| NonLocalImportSpecifier
|
|
1552
|
+
| {
|
|
1553
|
+
kind: 'ModuleLocal'
|
|
1554
|
+
name: string
|
|
1555
|
+
}
|
|
1556
|
+
| {
|
|
1557
|
+
kind: 'Global'
|
|
1558
|
+
name: string
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
declare type NonLocalImportSpecifier = {
|
|
1562
|
+
kind: 'ImportSpecifier'
|
|
1563
|
+
name: string
|
|
1564
|
+
module: string
|
|
1565
|
+
imported: string
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
declare type ObjectMethod$1 = {
|
|
1569
|
+
kind: 'ObjectMethod'
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
declare type ObjectMethod = {
|
|
1573
|
+
kind: 'ObjectMethod'
|
|
1574
|
+
loc: SourceLocation
|
|
1575
|
+
loweredFunc: LoweredFunction
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
declare type ObjectPattern = {
|
|
1579
|
+
kind: 'ObjectPattern'
|
|
1580
|
+
properties: Array<ObjectProperty | SpreadPattern>
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
declare type ObjectProperty = {
|
|
1584
|
+
kind: 'ObjectProperty'
|
|
1585
|
+
key: ObjectPropertyKey
|
|
1586
|
+
type: 'property' | 'method'
|
|
1587
|
+
place: Place
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
declare type ObjectPropertyKey =
|
|
1591
|
+
| {
|
|
1592
|
+
kind: 'string'
|
|
1593
|
+
name: string
|
|
1594
|
+
}
|
|
1595
|
+
| {
|
|
1596
|
+
kind: 'identifier'
|
|
1597
|
+
name: string
|
|
1598
|
+
}
|
|
1599
|
+
| {
|
|
1600
|
+
kind: 'computed'
|
|
1601
|
+
name: Place
|
|
1602
|
+
}
|
|
1603
|
+
| {
|
|
1604
|
+
kind: 'number'
|
|
1605
|
+
name: number
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
declare type ObjectType = {
|
|
1609
|
+
kind: 'Object'
|
|
1610
|
+
shapeId: string | null
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
declare class OkImpl<T> implements Result<T, never> {
|
|
1614
|
+
#private
|
|
1615
|
+
constructor(val: T)
|
|
1616
|
+
map<U>(fn: (val: T) => U): Result<U, never>
|
|
1617
|
+
mapErr<F>(_fn: (val: never) => F): Result<T, F>
|
|
1618
|
+
mapOr<U>(_fallback: U, fn: (val: T) => U): U
|
|
1619
|
+
mapOrElse<U>(_fallback: () => U, fn: (val: T) => U): U
|
|
1620
|
+
andThen<U>(fn: (val: T) => Result<U, never>): Result<U, never>
|
|
1621
|
+
and<U>(res: Result<U, never>): Result<U, never>
|
|
1622
|
+
or(_res: Result<T, never>): Result<T, never>
|
|
1623
|
+
orElse<F>(_fn: (val: never) => Result<T, F>): Result<T, F>
|
|
1624
|
+
isOk(): this is OkImpl<T>
|
|
1625
|
+
isErr(): this is ErrImpl<never>
|
|
1626
|
+
expect(_msg: string): T
|
|
1627
|
+
expectErr(msg: string): never
|
|
1628
|
+
unwrap(): T
|
|
1629
|
+
unwrapOr(_fallback: T): T
|
|
1630
|
+
unwrapOrElse(_fallback: (val: never) => T): T
|
|
1631
|
+
unwrapErr(): never
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
declare const opageDeclarationId: unique symbol
|
|
1635
|
+
|
|
1636
|
+
declare const opaqueBlockId: unique symbol
|
|
1637
|
+
|
|
1638
|
+
declare const opaqueIdentifierId: unique symbol
|
|
1639
|
+
|
|
1640
|
+
declare const opaqueInstructionId: unique symbol
|
|
1641
|
+
|
|
1642
|
+
declare const opaqueLinearId: unique symbol
|
|
1643
|
+
|
|
1644
|
+
declare const opaqueNominalId: unique symbol
|
|
1645
|
+
|
|
1646
|
+
declare const opaquePropertyLiteral: unique symbol
|
|
1647
|
+
|
|
1648
|
+
declare const opaqueScopeId: unique symbol
|
|
1649
|
+
|
|
1650
|
+
declare const opaqueTypeId: unique symbol
|
|
1651
|
+
|
|
1652
|
+
declare const opaqueTypeParameterId: unique symbol
|
|
1653
|
+
|
|
1654
|
+
declare const opaqueValidIdentifierName: unique symbol
|
|
1655
|
+
|
|
1656
|
+
declare type OptionalTerminal = {
|
|
1657
|
+
kind: 'optional'
|
|
1658
|
+
optional: boolean
|
|
1659
|
+
test: BlockId
|
|
1660
|
+
fallthrough: BlockId
|
|
1661
|
+
id: InstructionId
|
|
1662
|
+
loc: SourceLocation
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
/**
|
|
1666
|
+
* @public
|
|
1667
|
+
*/
|
|
1668
|
+
export declare interface PackageJson {
|
|
1669
|
+
name: string
|
|
1670
|
+
version: string
|
|
1671
|
+
author?: string
|
|
1672
|
+
dependencies?: Record<string, string>
|
|
1673
|
+
description?: string
|
|
1674
|
+
devDependencies?: Record<string, string>
|
|
1675
|
+
engines?: Record<string, string>
|
|
1676
|
+
license?: string
|
|
1677
|
+
peerDependencies?: Record<string, string>
|
|
1678
|
+
private?: boolean
|
|
1679
|
+
repository?: {
|
|
1680
|
+
type: string
|
|
1681
|
+
url: string
|
|
1682
|
+
}
|
|
1683
|
+
scripts?: Record<string, string>
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
declare type PanicThresholdOptions = z.infer<typeof PanicThresholdOptionsSchema>
|
|
1687
|
+
|
|
1688
|
+
declare const PanicThresholdOptionsSchema: z.ZodEnum<{
|
|
1689
|
+
none: 'none'
|
|
1690
|
+
all_errors: 'all_errors'
|
|
1691
|
+
critical_errors: 'critical_errors'
|
|
1692
|
+
}>
|
|
1693
|
+
|
|
1694
|
+
declare type ParsedPluginOptions = Required<Omit<PluginOptions, 'environment'>> & {
|
|
1695
|
+
environment: EnvironmentConfig
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
declare type Pattern = ArrayPattern | ObjectPattern
|
|
1699
|
+
|
|
1700
|
+
declare type Phi = {
|
|
1701
|
+
kind: 'Phi'
|
|
1702
|
+
place: Place
|
|
1703
|
+
operands: Map<BlockId, Place>
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
declare type PhiType = {
|
|
1707
|
+
kind: 'Phi'
|
|
1708
|
+
operands: Array<Type>
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
declare type PipelineErrorEvent = {
|
|
1712
|
+
kind: 'PipelineError'
|
|
1713
|
+
fnLoc: t.SourceLocation | null
|
|
1714
|
+
data: string
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
declare type Place = {
|
|
1718
|
+
kind: 'Identifier'
|
|
1719
|
+
identifier: Identifier
|
|
1720
|
+
effect: Effect
|
|
1721
|
+
reactive: boolean
|
|
1722
|
+
loc: SourceLocation
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
declare type Platform = 'client' | 'server' | 'shared'
|
|
1726
|
+
|
|
1727
|
+
declare type PluginOptions = Partial<{
|
|
1728
|
+
environment: Partial<EnvironmentConfig>
|
|
1729
|
+
logger: Logger | null
|
|
1730
|
+
gating: ExternalFunction | null
|
|
1731
|
+
dynamicGating: DynamicGatingOptions | null
|
|
1732
|
+
panicThreshold: PanicThresholdOptions
|
|
1733
|
+
noEmit: boolean
|
|
1734
|
+
compilationMode: CompilationMode
|
|
1735
|
+
eslintSuppressionRules: Array<string> | null | undefined
|
|
1736
|
+
flowSuppressions: boolean
|
|
1737
|
+
ignoreUseNoForget: boolean
|
|
1738
|
+
customOptOutDirectives: CustomOptOutDirective
|
|
1739
|
+
sources: Array<string> | ((filename: string) => boolean) | null
|
|
1740
|
+
enableReanimatedCheck: boolean
|
|
1741
|
+
target: CompilerReactTarget
|
|
1742
|
+
}>
|
|
1743
|
+
|
|
1744
|
+
declare type PolyType = {
|
|
1745
|
+
kind: 'Poly'
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
declare type PrimitiveType = {
|
|
1749
|
+
kind: 'Primitive'
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
declare type PrintErrorMessageOptions = {
|
|
1753
|
+
eslint: boolean
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
declare class ProgramContext {
|
|
1757
|
+
scope: Scope
|
|
1758
|
+
opts: ParsedPluginOptions
|
|
1759
|
+
filename: string | null
|
|
1760
|
+
code: string | null
|
|
1761
|
+
reactRuntimeModule: string
|
|
1762
|
+
suppressions: Array<SuppressionRange>
|
|
1763
|
+
hasModuleScopeOptOut: boolean
|
|
1764
|
+
alreadyCompiled: WeakSet<object> | Set<object>
|
|
1765
|
+
knownReferencedNames: Set<string>
|
|
1766
|
+
imports: Map<string, Map<string, NonLocalImportSpecifier>>
|
|
1767
|
+
retryErrors: Array<{
|
|
1768
|
+
fn: BabelFn
|
|
1769
|
+
error: CompilerError
|
|
1770
|
+
}>
|
|
1771
|
+
inferredEffectLocations: Set<t.SourceLocation>
|
|
1772
|
+
constructor({
|
|
1773
|
+
program,
|
|
1774
|
+
suppressions,
|
|
1775
|
+
opts,
|
|
1776
|
+
filename,
|
|
1777
|
+
code,
|
|
1778
|
+
hasModuleScopeOptOut,
|
|
1779
|
+
}: ProgramContextOptions)
|
|
1780
|
+
isHookName(name: string): boolean
|
|
1781
|
+
hasReference(name: string): boolean
|
|
1782
|
+
newUid(name: string): string
|
|
1783
|
+
addMemoCacheImport(): NonLocalImportSpecifier
|
|
1784
|
+
addImportSpecifier(
|
|
1785
|
+
{source: module, importSpecifierName: specifier}: ExternalFunction,
|
|
1786
|
+
nameHint?: string,
|
|
1787
|
+
): NonLocalImportSpecifier
|
|
1788
|
+
addNewReference(name: string): void
|
|
1789
|
+
assertGlobalBinding(name: string, localScope?: Scope): Result<void, CompilerError>
|
|
1790
|
+
logEvent(event: LoggerEvent): void
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
declare type ProgramContextOptions = {
|
|
1794
|
+
program: NodePath<t.Program>
|
|
1795
|
+
suppressions: Array<SuppressionRange>
|
|
1796
|
+
opts: ParsedPluginOptions
|
|
1797
|
+
filename: string | null
|
|
1798
|
+
code: string | null
|
|
1799
|
+
hasModuleScopeOptOut: boolean
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
declare type PromotedIdentifier = {
|
|
1803
|
+
kind: 'promoted'
|
|
1804
|
+
value: string
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
declare type PropertyLiteral = (string | number) & {
|
|
1808
|
+
[opaquePropertyLiteral]: 'PropertyLiteral'
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
declare type PropertyLoad = {
|
|
1812
|
+
kind: 'PropertyLoad'
|
|
1813
|
+
object: Place
|
|
1814
|
+
property: PropertyLiteral
|
|
1815
|
+
loc: SourceLocation
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
declare type PropType = {
|
|
1819
|
+
kind: 'Property'
|
|
1820
|
+
objectType: Type
|
|
1821
|
+
objectName: string
|
|
1822
|
+
propertyName:
|
|
1823
|
+
| {
|
|
1824
|
+
kind: 'literal'
|
|
1825
|
+
value: PropertyLiteral
|
|
1826
|
+
}
|
|
1827
|
+
| {
|
|
1828
|
+
kind: 'computed'
|
|
1829
|
+
value: Type
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
declare type PrunedReactiveScopeBlock = {
|
|
1834
|
+
kind: 'pruned-scope'
|
|
1835
|
+
scope: ReactiveScope
|
|
1836
|
+
instructions: ReactiveBlock
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
declare type PrunedScopeTerminal = {
|
|
1840
|
+
kind: 'pruned-scope'
|
|
1841
|
+
fallthrough: BlockId
|
|
1842
|
+
block: BlockId
|
|
1843
|
+
scope: ReactiveScope
|
|
1844
|
+
id: InstructionId
|
|
1845
|
+
loc: SourceLocation
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
declare type ReactFunctionType = 'Component' | 'Hook' | 'Other'
|
|
1849
|
+
|
|
1850
|
+
declare type ReactiveBlock = Array<ReactiveStatement>
|
|
1851
|
+
|
|
1852
|
+
declare type ReactiveBreakTerminal = {
|
|
1853
|
+
kind: 'break'
|
|
1854
|
+
target: BlockId
|
|
1855
|
+
id: InstructionId
|
|
1856
|
+
targetKind: ReactiveTerminalTargetKind
|
|
1857
|
+
loc: SourceLocation
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
declare type ReactiveContinueTerminal = {
|
|
1861
|
+
kind: 'continue'
|
|
1862
|
+
target: BlockId
|
|
1863
|
+
id: InstructionId
|
|
1864
|
+
targetKind: ReactiveTerminalTargetKind
|
|
1865
|
+
loc: SourceLocation
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
declare type ReactiveDoWhileTerminal = {
|
|
1869
|
+
kind: 'do-while'
|
|
1870
|
+
loop: ReactiveBlock
|
|
1871
|
+
test: ReactiveValue
|
|
1872
|
+
id: InstructionId
|
|
1873
|
+
loc: SourceLocation
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
declare type ReactiveForInTerminal = {
|
|
1877
|
+
kind: 'for-in'
|
|
1878
|
+
init: ReactiveValue
|
|
1879
|
+
loop: ReactiveBlock
|
|
1880
|
+
id: InstructionId
|
|
1881
|
+
loc: SourceLocation
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
declare type ReactiveForOfTerminal = {
|
|
1885
|
+
kind: 'for-of'
|
|
1886
|
+
init: ReactiveValue
|
|
1887
|
+
test: ReactiveValue
|
|
1888
|
+
loop: ReactiveBlock
|
|
1889
|
+
id: InstructionId
|
|
1890
|
+
loc: SourceLocation
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
declare type ReactiveForTerminal = {
|
|
1894
|
+
kind: 'for'
|
|
1895
|
+
init: ReactiveValue
|
|
1896
|
+
test: ReactiveValue
|
|
1897
|
+
update: ReactiveValue | null
|
|
1898
|
+
loop: ReactiveBlock
|
|
1899
|
+
id: InstructionId
|
|
1900
|
+
loc: SourceLocation
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
declare type ReactiveFunction = {
|
|
1904
|
+
loc: SourceLocation
|
|
1905
|
+
id: ValidIdentifierName | null
|
|
1906
|
+
nameHint: string | null
|
|
1907
|
+
params: Array<Place | SpreadPattern>
|
|
1908
|
+
generator: boolean
|
|
1909
|
+
async: boolean
|
|
1910
|
+
body: ReactiveBlock
|
|
1911
|
+
env: Environment
|
|
1912
|
+
directives: Array<string>
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
declare type ReactiveIfTerminal = {
|
|
1916
|
+
kind: 'if'
|
|
1917
|
+
test: Place
|
|
1918
|
+
consequent: ReactiveBlock
|
|
1919
|
+
alternate: ReactiveBlock | null
|
|
1920
|
+
id: InstructionId
|
|
1921
|
+
loc: SourceLocation
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
declare type ReactiveInstruction = {
|
|
1925
|
+
id: InstructionId
|
|
1926
|
+
lvalue: Place | null
|
|
1927
|
+
value: ReactiveValue
|
|
1928
|
+
effects?: Array<AliasingEffect> | null
|
|
1929
|
+
loc: SourceLocation
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
declare type ReactiveInstructionStatement = {
|
|
1933
|
+
kind: 'instruction'
|
|
1934
|
+
instruction: ReactiveInstruction
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
declare type ReactiveLabelTerminal = {
|
|
1938
|
+
kind: 'label'
|
|
1939
|
+
block: ReactiveBlock
|
|
1940
|
+
id: InstructionId
|
|
1941
|
+
loc: SourceLocation
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
declare type ReactiveLogicalValue = {
|
|
1945
|
+
kind: 'LogicalExpression'
|
|
1946
|
+
operator: t.LogicalExpression['operator']
|
|
1947
|
+
left: ReactiveValue
|
|
1948
|
+
right: ReactiveValue
|
|
1949
|
+
loc: SourceLocation
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
declare type ReactiveOptionalCallValue = {
|
|
1953
|
+
kind: 'OptionalExpression'
|
|
1954
|
+
id: InstructionId
|
|
1955
|
+
value: ReactiveValue
|
|
1956
|
+
optional: boolean
|
|
1957
|
+
loc: SourceLocation
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
declare type ReactiveReturnTerminal = {
|
|
1961
|
+
kind: 'return'
|
|
1962
|
+
value: Place
|
|
1963
|
+
id: InstructionId
|
|
1964
|
+
loc: SourceLocation
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
declare type ReactiveScope = {
|
|
1968
|
+
id: ScopeId
|
|
1969
|
+
range: MutableRange
|
|
1970
|
+
dependencies: ReactiveScopeDependencies
|
|
1971
|
+
declarations: Map<IdentifierId, ReactiveScopeDeclaration>
|
|
1972
|
+
reassignments: Set<Identifier>
|
|
1973
|
+
earlyReturnValue: {
|
|
1974
|
+
value: Identifier
|
|
1975
|
+
loc: SourceLocation
|
|
1976
|
+
label: BlockId
|
|
1977
|
+
} | null
|
|
1978
|
+
merged: Set<ScopeId>
|
|
1979
|
+
loc: SourceLocation
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
declare type ReactiveScopeBlock = {
|
|
1983
|
+
kind: 'scope'
|
|
1984
|
+
scope: ReactiveScope
|
|
1985
|
+
instructions: ReactiveBlock
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
declare type ReactiveScopeDeclaration = {
|
|
1989
|
+
identifier: Identifier
|
|
1990
|
+
scope: ReactiveScope
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
declare type ReactiveScopeDependencies = Set<ReactiveScopeDependency>
|
|
1994
|
+
|
|
1995
|
+
declare type ReactiveScopeDependency = {
|
|
1996
|
+
identifier: Identifier
|
|
1997
|
+
reactive: boolean
|
|
1998
|
+
path: DependencyPath
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
declare type ReactiveScopeTerminal = {
|
|
2002
|
+
kind: 'scope'
|
|
2003
|
+
fallthrough: BlockId
|
|
2004
|
+
block: BlockId
|
|
2005
|
+
scope: ReactiveScope
|
|
2006
|
+
id: InstructionId
|
|
2007
|
+
loc: SourceLocation
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
declare type ReactiveSequenceValue = {
|
|
2011
|
+
kind: 'SequenceExpression'
|
|
2012
|
+
instructions: Array<ReactiveInstruction>
|
|
2013
|
+
id: InstructionId
|
|
2014
|
+
value: ReactiveValue
|
|
2015
|
+
loc: SourceLocation
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
declare type ReactiveStatement =
|
|
2019
|
+
| ReactiveInstructionStatement
|
|
2020
|
+
| ReactiveTerminalStatement
|
|
2021
|
+
| ReactiveScopeBlock
|
|
2022
|
+
| PrunedReactiveScopeBlock
|
|
2023
|
+
|
|
2024
|
+
declare type ReactiveSwitchTerminal = {
|
|
2025
|
+
kind: 'switch'
|
|
2026
|
+
test: Place
|
|
2027
|
+
cases: Array<{
|
|
2028
|
+
test: Place | null
|
|
2029
|
+
block: ReactiveBlock | void
|
|
2030
|
+
}>
|
|
2031
|
+
id: InstructionId
|
|
2032
|
+
loc: SourceLocation
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
declare type ReactiveTerminal =
|
|
2036
|
+
| ReactiveBreakTerminal
|
|
2037
|
+
| ReactiveContinueTerminal
|
|
2038
|
+
| ReactiveReturnTerminal
|
|
2039
|
+
| ReactiveThrowTerminal
|
|
2040
|
+
| ReactiveSwitchTerminal
|
|
2041
|
+
| ReactiveDoWhileTerminal
|
|
2042
|
+
| ReactiveWhileTerminal
|
|
2043
|
+
| ReactiveForTerminal
|
|
2044
|
+
| ReactiveForOfTerminal
|
|
2045
|
+
| ReactiveForInTerminal
|
|
2046
|
+
| ReactiveIfTerminal
|
|
2047
|
+
| ReactiveLabelTerminal
|
|
2048
|
+
| ReactiveTryTerminal
|
|
2049
|
+
|
|
2050
|
+
declare type ReactiveTerminalStatement<Tterminal extends ReactiveTerminal = ReactiveTerminal> = {
|
|
2051
|
+
kind: 'terminal'
|
|
2052
|
+
terminal: Tterminal
|
|
2053
|
+
label: {
|
|
2054
|
+
id: BlockId
|
|
2055
|
+
implicit: boolean
|
|
2056
|
+
} | null
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
declare type ReactiveTerminalTargetKind = 'implicit' | 'labeled' | 'unlabeled'
|
|
2060
|
+
|
|
2061
|
+
declare type ReactiveTernaryValue = {
|
|
2062
|
+
kind: 'ConditionalExpression'
|
|
2063
|
+
test: ReactiveValue
|
|
2064
|
+
consequent: ReactiveValue
|
|
2065
|
+
alternate: ReactiveValue
|
|
2066
|
+
loc: SourceLocation
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
declare type ReactiveThrowTerminal = {
|
|
2070
|
+
kind: 'throw'
|
|
2071
|
+
value: Place
|
|
2072
|
+
id: InstructionId
|
|
2073
|
+
loc: SourceLocation
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
declare type ReactiveTryTerminal = {
|
|
2077
|
+
kind: 'try'
|
|
2078
|
+
block: ReactiveBlock
|
|
2079
|
+
handlerBinding: Place | null
|
|
2080
|
+
handler: ReactiveBlock
|
|
2081
|
+
id: InstructionId
|
|
2082
|
+
loc: SourceLocation
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
declare type ReactiveValue =
|
|
2086
|
+
| InstructionValue
|
|
2087
|
+
| ReactiveLogicalValue
|
|
2088
|
+
| ReactiveSequenceValue
|
|
2089
|
+
| ReactiveTernaryValue
|
|
2090
|
+
| ReactiveOptionalCallValue
|
|
2091
|
+
|
|
2092
|
+
declare type ReactiveWhileTerminal = {
|
|
2093
|
+
kind: 'while'
|
|
2094
|
+
test: ReactiveValue
|
|
2095
|
+
loop: ReactiveBlock
|
|
2096
|
+
id: InstructionId
|
|
2097
|
+
loc: SourceLocation
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
declare type ResolvedType = {
|
|
2101
|
+
kind: 'Concrete'
|
|
2102
|
+
type: ConcreteType<ResolvedType>
|
|
2103
|
+
platform: Platform
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
declare interface Result<T, E> {
|
|
2107
|
+
map<U>(fn: (val: T) => U): Result<U, E>
|
|
2108
|
+
mapErr<F>(fn: (val: E) => F): Result<T, F>
|
|
2109
|
+
mapOr<U>(fallback: U, fn: (val: T) => U): U
|
|
2110
|
+
mapOrElse<U>(fallback: () => U, fn: (val: T) => U): U
|
|
2111
|
+
andThen<U>(fn: (val: T) => Result<U, E>): Result<U, E>
|
|
2112
|
+
and<U>(res: Result<U, E>): Result<U, E>
|
|
2113
|
+
or(res: Result<T, E>): Result<T, E>
|
|
2114
|
+
orElse<F>(fn: (val: E) => Result<T, F>): Result<T, F>
|
|
2115
|
+
isOk(): this is OkImpl<T>
|
|
2116
|
+
isErr(): this is ErrImpl<E>
|
|
2117
|
+
expect(msg: string): T
|
|
2118
|
+
expectErr(msg: string): E
|
|
2119
|
+
unwrap(): T
|
|
2120
|
+
unwrapOr(fallback: T): T
|
|
2121
|
+
unwrapOrElse(fallback: (val: E) => T): T
|
|
2122
|
+
unwrapErr(): E
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
declare type ReturnTerminal = {
|
|
2126
|
+
kind: 'return'
|
|
2127
|
+
returnVariant: ReturnVariant
|
|
2128
|
+
loc: SourceLocation
|
|
2129
|
+
value: Place
|
|
2130
|
+
id: InstructionId
|
|
2131
|
+
fallthrough?: never
|
|
2132
|
+
effects: Array<AliasingEffect> | null
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
declare type ReturnVariant = 'Void' | 'Implicit' | 'Explicit'
|
|
2136
|
+
|
|
2137
|
+
declare type ScopeId = number & {
|
|
2138
|
+
[opaqueScopeId]: 'ScopeId'
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
declare type SequenceTerminal = {
|
|
2142
|
+
kind: 'sequence'
|
|
2143
|
+
block: BlockId
|
|
2144
|
+
fallthrough: BlockId
|
|
2145
|
+
id: InstructionId
|
|
2146
|
+
loc: SourceLocation
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
declare type SourceLocation = t.SourceLocation | typeof GeneratedSource
|
|
2150
|
+
|
|
2151
|
+
declare type SpreadPattern = {
|
|
2152
|
+
kind: 'Spread'
|
|
2153
|
+
place: Place
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
declare type StartMemoize = {
|
|
2157
|
+
kind: 'StartMemoize'
|
|
2158
|
+
manualMemoId: number
|
|
2159
|
+
deps: Array<ManualMemoDependency> | null
|
|
2160
|
+
loc: SourceLocation
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
declare type StoreGlobal = {
|
|
2164
|
+
kind: 'StoreGlobal'
|
|
2165
|
+
name: string
|
|
2166
|
+
value: Place
|
|
2167
|
+
loc: SourceLocation
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
declare type StoreLocal = {
|
|
2171
|
+
kind: 'StoreLocal'
|
|
2172
|
+
lvalue: LValue
|
|
2173
|
+
value: Place
|
|
2174
|
+
type: t.FlowType | t.TSType | null
|
|
2175
|
+
loc: SourceLocation
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
declare type SuppressionRange = {
|
|
2179
|
+
disableComment: t.Comment
|
|
2180
|
+
enableComment: t.Comment | null
|
|
2181
|
+
source: SuppressionSource
|
|
2182
|
+
}
|
|
2183
|
+
|
|
2184
|
+
declare type SuppressionSource = 'Eslint' | 'Flow'
|
|
2185
|
+
|
|
2186
|
+
declare type SwitchTerminal = {
|
|
2187
|
+
kind: 'switch'
|
|
2188
|
+
test: Place
|
|
2189
|
+
cases: Array<Case>
|
|
2190
|
+
fallthrough: BlockId
|
|
2191
|
+
id: InstructionId
|
|
2192
|
+
loc: SourceLocation
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
declare type Terminal =
|
|
2196
|
+
| UnsupportedTerminal
|
|
2197
|
+
| UnreachableTerminal
|
|
2198
|
+
| ThrowTerminal
|
|
2199
|
+
| ReturnTerminal
|
|
2200
|
+
| GotoTerminal
|
|
2201
|
+
| IfTerminal
|
|
2202
|
+
| BranchTerminal
|
|
2203
|
+
| SwitchTerminal
|
|
2204
|
+
| ForTerminal
|
|
2205
|
+
| ForOfTerminal
|
|
2206
|
+
| ForInTerminal
|
|
2207
|
+
| DoWhileTerminal
|
|
2208
|
+
| WhileTerminal
|
|
2209
|
+
| LogicalTerminal
|
|
2210
|
+
| TernaryTerminal
|
|
2211
|
+
| OptionalTerminal
|
|
2212
|
+
| LabelTerminal
|
|
2213
|
+
| SequenceTerminal
|
|
2214
|
+
| MaybeThrowTerminal
|
|
2215
|
+
| TryTerminal
|
|
2216
|
+
| ReactiveScopeTerminal
|
|
2217
|
+
| PrunedScopeTerminal
|
|
2218
|
+
|
|
2219
|
+
declare type TernaryTerminal = {
|
|
2220
|
+
kind: 'ternary'
|
|
2221
|
+
test: BlockId
|
|
2222
|
+
fallthrough: BlockId
|
|
2223
|
+
id: InstructionId
|
|
2224
|
+
loc: SourceLocation
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2227
|
+
declare type ThrowTerminal = {
|
|
2228
|
+
kind: 'throw'
|
|
2229
|
+
value: Place
|
|
2230
|
+
id: InstructionId
|
|
2231
|
+
loc: SourceLocation
|
|
2232
|
+
fallthrough?: never
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
declare type TimingEvent = {
|
|
2236
|
+
kind: 'Timing'
|
|
2237
|
+
measurement: PerformanceMeasure
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
declare type TryTerminal = {
|
|
2241
|
+
kind: 'try'
|
|
2242
|
+
block: BlockId
|
|
2243
|
+
handlerBinding: Place | null
|
|
2244
|
+
handler: BlockId
|
|
2245
|
+
fallthrough: BlockId
|
|
2246
|
+
id: InstructionId
|
|
2247
|
+
loc: SourceLocation
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
declare type Type = BuiltInType | PhiType | TypeVar | PolyType | PropType | ObjectMethod$1
|
|
2251
|
+
|
|
2252
|
+
declare type TypeId = number & {
|
|
2253
|
+
[opaqueTypeId]: 'IdentifierId'
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
declare type TypeParameter<T> = {
|
|
2257
|
+
name: string
|
|
2258
|
+
id: TypeParameterId
|
|
2259
|
+
bound: T
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
declare type TypeParameterId = number & {
|
|
2263
|
+
[opaqueTypeParameterId]: 'TypeParameterId'
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
declare type TypeVar = {
|
|
2267
|
+
kind: 'Type'
|
|
2268
|
+
id: TypeId
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
declare type UnreachableTerminal = {
|
|
2272
|
+
kind: 'unreachable'
|
|
2273
|
+
id: InstructionId
|
|
2274
|
+
loc: SourceLocation
|
|
2275
|
+
fallthrough?: never
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
declare type UnsupportedTerminal = {
|
|
2279
|
+
kind: 'unsupported'
|
|
2280
|
+
id: InstructionId
|
|
2281
|
+
loc: SourceLocation
|
|
2282
|
+
fallthrough?: never
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
declare type ValidatedIdentifier = {
|
|
2286
|
+
kind: 'named'
|
|
2287
|
+
value: ValidIdentifierName
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
declare type ValidIdentifierName = string & {
|
|
2291
|
+
[opaqueValidIdentifierName]: 'ValidIdentifierName'
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
declare enum ValueKind {
|
|
2295
|
+
MaybeFrozen = 'maybefrozen',
|
|
2296
|
+
Frozen = 'frozen',
|
|
2297
|
+
Primitive = 'primitive',
|
|
2298
|
+
Global = 'global',
|
|
2299
|
+
Mutable = 'mutable',
|
|
2300
|
+
Context = 'context',
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
declare enum ValueReason {
|
|
2304
|
+
Global = 'global',
|
|
2305
|
+
JsxCaptured = 'jsx-captured',
|
|
2306
|
+
HookCaptured = 'hook-captured',
|
|
2307
|
+
HookReturn = 'hook-return',
|
|
2308
|
+
Effect = 'effect',
|
|
2309
|
+
KnownReturnSignature = 'known-return-signature',
|
|
2310
|
+
Context = 'context',
|
|
2311
|
+
State = 'state',
|
|
2312
|
+
ReducerState = 'reducer-state',
|
|
2313
|
+
ReactiveFunctionArgument = 'reactive-function-argument',
|
|
2314
|
+
Other = 'other',
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
declare type WhileTerminal = {
|
|
2318
|
+
kind: 'while'
|
|
2319
|
+
loc: SourceLocation
|
|
2320
|
+
test: BlockId
|
|
2321
|
+
loop: BlockId
|
|
2322
|
+
fallthrough: BlockId
|
|
2323
|
+
id: InstructionId
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
export {}
|