@sanity/cli 6.0.0-alpha.6 → 6.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2907 -109
- package/dist/actions/build/renderDocumentWorker/tryLoadDocumentComponent.js +2 -1
- package/dist/actions/build/renderDocumentWorker/tryLoadDocumentComponent.js.map +1 -1
- package/dist/actions/init/bootstrapLocalTemplate.d.ts +13 -0
- package/dist/actions/init/bootstrapLocalTemplate.js +136 -0
- package/dist/actions/init/bootstrapLocalTemplate.js.map +1 -0
- package/dist/actions/init/bootstrapRemoteTemplate.d.ts +12 -0
- package/dist/actions/init/bootstrapRemoteTemplate.js +109 -0
- package/dist/actions/init/bootstrapRemoteTemplate.js.map +1 -0
- package/dist/actions/init/bootstrapTemplate.d.ts +18 -0
- package/dist/actions/init/bootstrapTemplate.js +32 -0
- package/dist/actions/init/bootstrapTemplate.js.map +1 -0
- package/dist/actions/init/checkNextJsReactCompatibility.d.ts +9 -0
- package/dist/actions/init/checkNextJsReactCompatibility.js +21 -0
- package/dist/actions/init/checkNextJsReactCompatibility.js.map +1 -0
- package/dist/actions/init/countNestedFolders.d.ts +1 -0
- package/dist/actions/init/countNestedFolders.js +6 -0
- package/dist/actions/init/countNestedFolders.js.map +1 -0
- package/dist/actions/init/createAppCliConfig.d.ts +5 -0
- package/dist/actions/init/createAppCliConfig.js +19 -0
- package/dist/actions/init/createAppCliConfig.js.map +1 -0
- package/dist/actions/init/createCliConfig.d.ts +6 -0
- package/dist/actions/init/createCliConfig.js +27 -0
- package/dist/actions/init/createCliConfig.js.map +1 -0
- package/dist/actions/init/createPackageManifest.d.ts +6 -0
- package/dist/actions/init/createPackageManifest.js +86 -0
- package/dist/actions/init/createPackageManifest.js.map +1 -0
- package/dist/actions/init/createStudioConfig.d.ts +13 -0
- package/dist/actions/init/createStudioConfig.js +41 -0
- package/dist/actions/init/createStudioConfig.js.map +1 -0
- package/dist/actions/init/env/createOrAppendEnvVars.d.ts +12 -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.d.ts +9 -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.d.ts +12 -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.d.ts +6 -0
- package/dist/actions/init/fetchPostInitPrompt.js +30 -0
- package/dist/actions/init/fetchPostInitPrompt.js.map +1 -0
- package/dist/actions/init/git.d.ts +1 -0
- package/dist/actions/init/git.js +65 -0
- package/dist/actions/init/git.js.map +1 -0
- package/dist/actions/init/processTemplate.d.ts +7 -0
- package/dist/actions/init/processTemplate.js +56 -0
- package/dist/actions/init/processTemplate.js.map +1 -0
- package/dist/actions/init/remoteTemplate.d.ts +0 -3
- package/dist/actions/init/remoteTemplate.js +2 -40
- package/dist/actions/init/remoteTemplate.js.map +1 -1
- package/dist/actions/init/resolvePackageManager.d.ts +10 -0
- package/dist/actions/init/resolvePackageManager.js +20 -0
- package/dist/actions/init/resolvePackageManager.js.map +1 -0
- package/dist/actions/init/setupMCP.d.ts +21 -0
- package/dist/actions/init/setupMCP.js +258 -0
- package/dist/actions/init/setupMCP.js.map +1 -0
- package/dist/actions/init/templates/appQuickstart.d.ts +3 -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.d.ts +3 -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.d.ts +3 -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.d.ts +3 -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.d.ts +3 -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.d.ts +3 -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.d.ts +3 -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.d.ts +6 -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.d.ts +3 -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.d.ts +3 -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.d.ts +3 -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.d.ts +3 -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.d.ts +15 -0
- package/dist/actions/init/types.js +3 -0
- package/dist/actions/init/types.js.map +1 -0
- package/dist/actions/init/updateInitialTemplateMetadata.d.ts +1 -0
- package/dist/actions/init/updateInitialTemplateMetadata.js +17 -0
- package/dist/actions/init/updateInitialTemplateMetadata.js.map +1 -0
- package/dist/actions/telemetry/resolveConsent.d.ts +1 -9
- package/dist/actions/telemetry/resolveConsent.js +2 -2
- package/dist/actions/telemetry/resolveConsent.js.map +1 -1
- package/dist/actions/telemetry/setConsent.d.ts +1 -4
- package/dist/actions/telemetry/setConsent.js +4 -8
- package/dist/actions/telemetry/setConsent.js.map +1 -1
- package/dist/commands/init.d.ts +24 -14
- package/dist/commands/init.js +544 -26
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/telemetry/disable.js +0 -1
- package/dist/commands/telemetry/disable.js.map +1 -1
- package/dist/commands/telemetry/enable.js +0 -1
- package/dist/commands/telemetry/enable.js.map +1 -1
- package/dist/commands/telemetry/status.js +1 -3
- package/dist/commands/telemetry/status.js.map +1 -1
- package/dist/hooks/prerun/flushTelemetry.worker.d.ts +2 -0
- package/dist/hooks/prerun/flushTelemetry.worker.js +22 -0
- package/dist/hooks/prerun/flushTelemetry.worker.js.map +1 -0
- package/dist/hooks/prerun/setupTelemetry.js +65 -1
- package/dist/hooks/prerun/setupTelemetry.js.map +1 -1
- package/dist/prompts/init/nextjs.d.ts +5 -0
- package/dist/prompts/init/nextjs.js +56 -0
- package/dist/prompts/init/nextjs.js.map +1 -0
- package/dist/prompts/init/promptForTypescript.d.ts +0 -1
- package/dist/prompts/init/promptForTypescript.js +0 -6
- package/dist/prompts/init/promptForTypescript.js.map +1 -1
- package/dist/services/mcp.d.ts +10 -0
- package/dist/services/mcp.js +16 -0
- package/dist/services/mcp.js.map +1 -1
- package/dist/services/projects.d.ts +5 -2
- package/dist/services/projects.js +37 -0
- package/dist/services/projects.js.map +1 -1
- package/dist/services/telemetry.d.ts +2 -0
- package/dist/services/telemetry.js +20 -0
- package/dist/services/telemetry.js.map +1 -0
- package/dist/studioDependencies.d.ts +16 -0
- package/dist/studioDependencies.js +24 -0
- package/dist/studioDependencies.js.map +1 -0
- package/dist/telemetry/cli.telemetry.d.ts +20 -0
- package/dist/telemetry/cli.telemetry.js +8 -0
- package/dist/telemetry/cli.telemetry.js.map +1 -0
- package/dist/telemetry/store/cleanupOldTelemetryFiles.d.ts +5 -0
- package/dist/telemetry/store/cleanupOldTelemetryFiles.js +30 -0
- package/dist/telemetry/store/cleanupOldTelemetryFiles.js.map +1 -0
- package/dist/telemetry/store/createTelemetryStore.d.ts +39 -0
- package/dist/telemetry/store/createTelemetryStore.js +95 -0
- package/dist/telemetry/store/createTelemetryStore.js.map +1 -0
- package/dist/telemetry/store/createTraceId.d.ts +10 -0
- package/dist/telemetry/store/createTraceId.js +10 -0
- package/dist/telemetry/store/createTraceId.js.map +1 -0
- package/dist/telemetry/store/debug.d.ts +5 -0
- package/dist/telemetry/store/debug.js +7 -0
- package/dist/telemetry/store/debug.js.map +1 -0
- package/dist/telemetry/store/findTelemetryFiles.d.ts +13 -0
- package/dist/telemetry/store/findTelemetryFiles.js +34 -0
- package/dist/telemetry/store/findTelemetryFiles.js.map +1 -0
- package/dist/telemetry/store/flushTelemetryFiles.d.ts +20 -0
- package/dist/telemetry/store/flushTelemetryFiles.js +107 -0
- package/dist/telemetry/store/flushTelemetryFiles.js.map +1 -0
- package/dist/telemetry/store/generateTelemetryFilePath.d.ts +17 -0
- package/dist/telemetry/store/generateTelemetryFilePath.js +30 -0
- package/dist/telemetry/store/generateTelemetryFilePath.js.map +1 -0
- package/dist/telemetry/store/getTelemetryBaseInfo.d.ts +27 -0
- package/dist/telemetry/store/getTelemetryBaseInfo.js +34 -0
- package/dist/telemetry/store/getTelemetryBaseInfo.js.map +1 -0
- package/dist/telemetry/store/logger.d.ts +6 -0
- package/dist/telemetry/store/logger.js +54 -0
- package/dist/telemetry/store/logger.js.map +1 -0
- package/dist/telemetry/store/trace.d.ts +6 -0
- package/dist/telemetry/store/trace.js +150 -0
- package/dist/telemetry/store/trace.js.map +1 -0
- package/dist/telemetry/utils/readNDJSON.d.ts +10 -0
- package/dist/telemetry/utils/readNDJSON.js +18 -0
- package/dist/telemetry/utils/readNDJSON.js.map +1 -0
- package/dist/types.d.ts +33 -0
- package/dist/types.js.map +1 -1
- package/dist/typings/deepSortObject.d.js +2 -0
- package/dist/typings/deepSortObject.d.js.map +1 -0
- package/dist/util/copy.d.ts +5 -0
- package/dist/util/copy.js +37 -0
- package/dist/util/copy.js.map +1 -0
- package/dist/util/detectRuntime.d.ts +8 -0
- package/dist/util/detectRuntime.js +20 -0
- package/dist/util/detectRuntime.js.map +1 -0
- package/dist/util/frameworkPort.d.ts +12 -0
- package/dist/util/frameworkPort.js +61 -0
- package/dist/util/frameworkPort.js.map +1 -0
- package/dist/util/fsUtils.d.ts +2 -0
- package/dist/util/fsUtils.js +34 -0
- package/dist/util/fsUtils.js.map +1 -0
- package/dist/util/getProjectDefaults.d.ts +11 -0
- package/dist/util/getProjectDefaults.js +77 -0
- package/dist/util/getProjectDefaults.js.map +1 -0
- package/dist/util/isStaging.d.ts +7 -0
- package/dist/util/isStaging.js +10 -0
- package/dist/util/isStaging.js.map +1 -0
- package/dist/util/packageManager/packageManagerChoice.d.ts +2 -0
- package/dist/util/packageManager/packageManagerChoice.js +8 -0
- package/dist/util/packageManager/packageManagerChoice.js.map +1 -1
- package/dist/util/parseArguments.d.ts +35 -0
- package/dist/util/parseArguments.js +42 -0
- package/dist/util/parseArguments.js.map +1 -0
- package/dist/util/readdirRecursive.d.ts +5 -0
- package/dist/util/readdirRecursive.js +24 -0
- package/dist/util/readdirRecursive.js.map +1 -0
- package/dist/util/resolveLatestVersions.d.ts +7 -0
- package/dist/util/resolveLatestVersions.js +21 -0
- package/dist/util/resolveLatestVersions.js.map +1 -0
- package/oclif.manifest.json +154 -141
- package/package.json +26 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/init/templates/shopify.ts"],"sourcesContent":["import {type ProjectTemplate} from '../types.js'\n\nconst configTemplate = `\nimport {defineConfig, isDev} from 'sanity'\n\nimport {structureTool} from 'sanity/structure'\nimport {schemaTypes} from './schemaTypes'\nimport {structure} from './structure'\n\nimport {visionTool} from '@sanity/vision'\nimport {colorInput} from '@sanity/color-input'\nimport {imageHotspotArrayPlugin} from 'sanity-plugin-hotspot-array'\nimport {media, mediaAssetSource} from 'sanity-plugin-media'\nimport {customDocumentActions} from './plugins/customDocumentActions'\nimport Navbar from './components/studio/Navbar'\n\nconst devOnlyPlugins = [visionTool()]\n\nexport default defineConfig({\n name: '%sourceName%',\n title: '%projectName%',\n\n projectId: '%projectId%',\n dataset: '%dataset%',\n\n plugins: [\n structureTool({structure}),\n colorInput(),\n imageHotspotArrayPlugin(),\n customDocumentActions(),\n media(),\n ...(isDev ? devOnlyPlugins : []),\n ],\n\n schema: {\n types: schemaTypes,\n },\n\n form: {\n file: {\n assetSources: (previousAssetSources) => {\n return previousAssetSources.filter((assetSource) => assetSource !== mediaAssetSource)\n },\n },\n image: {\n assetSources: (previousAssetSources) => {\n return previousAssetSources.filter((assetSource) => assetSource === mediaAssetSource)\n },\n },\n },\n\n studio: {\n components: {\n navbar: Navbar,\n },\n },\n})`\n\nconst shopifyTemplate: ProjectTemplate = {\n configTemplate,\n dependencies: {\n '@sanity/asset-utils': '^1.3.0',\n '@sanity/color-input': '^3.0.2',\n '@sanity/icons': '^2.11.0',\n '@sanity/ui': '^2.0.0',\n 'lodash.get': '^4.4.2',\n 'pluralize-esm': '^9.0.2',\n 'sanity-plugin-hotspot-array': '^1.0.1',\n 'sanity-plugin-media': '^2.0.5',\n slug: '^8.2.2',\n },\n devDependencies: {\n '@portabletext/types': '^2.0.2',\n '@types/lodash.get': '^4.4.7',\n '@types/slug': '^5.0.3',\n },\n}\nexport default shopifyTemplate\n"],"names":["configTemplate","shopifyTemplate","dependencies","slug","devDependencies"],"mappings":"AAEA,MAAMA,iBAAiB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDtB,CAAC;AAEH,MAAMC,kBAAmC;IACvCD;IACAE,cAAc;QACZ,uBAAuB;QACvB,uBAAuB;QACvB,iBAAiB;QACjB,cAAc;QACd,cAAc;QACd,iBAAiB;QACjB,+BAA+B;QAC/B,uBAAuB;QACvBC,MAAM;IACR;IACAC,iBAAiB;QACf,uBAAuB;QACvB,qBAAqB;QACrB,eAAe;IACjB;AACF;AACA,eAAeH,gBAAe"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const configTemplate = `
|
|
2
|
+
import {shopifyAssets} from 'sanity-plugin-shopify-assets'
|
|
3
|
+
import {defineConfig, isDev} from 'sanity'
|
|
4
|
+
import {structureTool} from 'sanity/structure'
|
|
5
|
+
import {visionTool} from '@sanity/vision'
|
|
6
|
+
import {shopifyDocumentActions} from './plugins/shopifyDocumentActions'
|
|
7
|
+
import {schemaTypes} from './schemaTypes'
|
|
8
|
+
import {structure} from './structure'
|
|
9
|
+
import {SHOPIFY_STORE_ID} from './constants'
|
|
10
|
+
|
|
11
|
+
const devOnlyPlugins = [visionTool()]
|
|
12
|
+
|
|
13
|
+
export default defineConfig({
|
|
14
|
+
name: '%sourceName%',
|
|
15
|
+
title: '%projectName%',
|
|
16
|
+
|
|
17
|
+
projectId: '%projectId%',
|
|
18
|
+
dataset: '%dataset%',
|
|
19
|
+
|
|
20
|
+
plugins: [
|
|
21
|
+
structureTool({structure}),
|
|
22
|
+
shopifyDocumentActions(),
|
|
23
|
+
shopifyAssets({
|
|
24
|
+
shopifyDomain: SHOPIFY_STORE_ID,
|
|
25
|
+
}),
|
|
26
|
+
...(isDev ? devOnlyPlugins : []),
|
|
27
|
+
],
|
|
28
|
+
|
|
29
|
+
schema: {
|
|
30
|
+
types: schemaTypes,
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
`;
|
|
34
|
+
const shopifyTemplate = {
|
|
35
|
+
configTemplate,
|
|
36
|
+
dependencies: {
|
|
37
|
+
'@portabletext/toolkit': '^2.0.1',
|
|
38
|
+
'@sanity/icons': '^2.11.0',
|
|
39
|
+
'@sanity/ui': '^2.0.0',
|
|
40
|
+
'@types/lodash.get': '^4.4.7',
|
|
41
|
+
'lodash.get': '^4.4.2',
|
|
42
|
+
'pluralize-esm': '^9.0.4',
|
|
43
|
+
'sanity-plugin-shopify-assets': '^1.1.0'
|
|
44
|
+
},
|
|
45
|
+
typescriptOnly: true
|
|
46
|
+
};
|
|
47
|
+
export default shopifyTemplate;
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=shopifyOnline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/init/templates/shopifyOnline.ts"],"sourcesContent":["import {type ProjectTemplate} from '../types.js'\n\nconst configTemplate = `\nimport {shopifyAssets} from 'sanity-plugin-shopify-assets'\nimport {defineConfig, isDev} from 'sanity'\nimport {structureTool} from 'sanity/structure'\nimport {visionTool} from '@sanity/vision'\nimport {shopifyDocumentActions} from './plugins/shopifyDocumentActions'\nimport {schemaTypes} from './schemaTypes'\nimport {structure} from './structure'\nimport {SHOPIFY_STORE_ID} from './constants'\n\nconst devOnlyPlugins = [visionTool()]\n\nexport default defineConfig({\n name: '%sourceName%',\n title: '%projectName%',\n\n projectId: '%projectId%',\n dataset: '%dataset%',\n\n plugins: [\n structureTool({structure}),\n shopifyDocumentActions(),\n shopifyAssets({\n shopifyDomain: SHOPIFY_STORE_ID,\n }),\n ...(isDev ? devOnlyPlugins : []),\n ],\n\n schema: {\n types: schemaTypes,\n },\n})\n`\n\nconst shopifyTemplate: ProjectTemplate = {\n configTemplate,\n dependencies: {\n '@portabletext/toolkit': '^2.0.1',\n '@sanity/icons': '^2.11.0',\n '@sanity/ui': '^2.0.0',\n '@types/lodash.get': '^4.4.7',\n 'lodash.get': '^4.4.2',\n 'pluralize-esm': '^9.0.4',\n 'sanity-plugin-shopify-assets': '^1.1.0',\n },\n typescriptOnly: true,\n}\nexport default shopifyTemplate\n"],"names":["configTemplate","shopifyTemplate","dependencies","typescriptOnly"],"mappings":"AAEA,MAAMA,iBAAiB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCxB,CAAC;AAED,MAAMC,kBAAmC;IACvCD;IACAE,cAAc;QACZ,yBAAyB;QACzB,iBAAiB;QACjB,cAAc;QACd,qBAAqB;QACrB,cAAc;QACd,iBAAiB;QACjB,gCAAgC;IAClC;IACAC,gBAAgB;AAClB;AACA,eAAeF,gBAAe"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Framework } from '@vercel/frameworks';
|
|
2
|
+
import { GenerateConfigOptions } from './createStudioConfig';
|
|
3
|
+
export type VersionedFramework = Framework & {
|
|
4
|
+
detectedVersion?: string;
|
|
5
|
+
};
|
|
6
|
+
export interface ProjectTemplate {
|
|
7
|
+
configTemplate?: ((variables: GenerateConfigOptions['variables']) => string) | string;
|
|
8
|
+
datasetUrl?: string;
|
|
9
|
+
dependencies?: Record<string, string>;
|
|
10
|
+
devDependencies?: Record<string, string>;
|
|
11
|
+
entry?: string;
|
|
12
|
+
importPrompt?: string;
|
|
13
|
+
scripts?: Record<string, string>;
|
|
14
|
+
typescriptOnly?: boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/init/types.ts"],"sourcesContent":["import {Framework} from '@vercel/frameworks'\n\nimport {GenerateConfigOptions} from './createStudioConfig'\n\nexport type VersionedFramework = Framework & {\n detectedVersion?: string\n}\n\nexport interface ProjectTemplate {\n configTemplate?: ((variables: GenerateConfigOptions['variables']) => string) | string\n datasetUrl?: string\n dependencies?: Record<string, string>\n devDependencies?: Record<string, string>\n entry?: string\n importPrompt?: string\n scripts?: Record<string, string>\n typescriptOnly?: boolean\n}\n"],"names":[],"mappings":"AAQA,WASC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function updateInitialTemplateMetadata(projectId: string, templateName: string): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { subdebug } from '@sanity/cli-core';
|
|
2
|
+
import { updateProjectInitalTemplate } from '../../services/projects.js';
|
|
3
|
+
const debug = subdebug('init:updateInitialTemplateMetadata');
|
|
4
|
+
export async function updateInitialTemplateMetadata(projectId, templateName) {
|
|
5
|
+
try {
|
|
6
|
+
await updateProjectInitalTemplate(projectId, templateName);
|
|
7
|
+
} catch (err) {
|
|
8
|
+
// Non-critical that we update this metadata, and user does not need to be aware
|
|
9
|
+
let message = typeof err === 'string' ? err : '<unknown error>';
|
|
10
|
+
if (err instanceof Error) {
|
|
11
|
+
message = err.message;
|
|
12
|
+
}
|
|
13
|
+
debug('Failed to update initial template metadata for project: %s', message);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=updateInitialTemplateMetadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/init/updateInitialTemplateMetadata.ts"],"sourcesContent":["import {subdebug} from '@sanity/cli-core'\n\nimport {updateProjectInitalTemplate} from '../../services/projects.js'\n\nconst debug = subdebug('init:updateInitialTemplateMetadata')\n\nexport async function updateInitialTemplateMetadata(\n projectId: string,\n templateName: string,\n): Promise<void> {\n try {\n await updateProjectInitalTemplate(projectId, templateName)\n } catch (err: unknown) {\n // Non-critical that we update this metadata, and user does not need to be aware\n let message = typeof err === 'string' ? err : '<unknown error>'\n if (err instanceof Error) {\n message = err.message\n }\n\n debug('Failed to update initial template metadata for project: %s', message)\n }\n}\n"],"names":["subdebug","updateProjectInitalTemplate","debug","updateInitialTemplateMetadata","projectId","templateName","err","message","Error"],"mappings":"AAAA,SAAQA,QAAQ,QAAO,mBAAkB;AAEzC,SAAQC,2BAA2B,QAAO,6BAA4B;AAEtE,MAAMC,QAAQF,SAAS;AAEvB,OAAO,eAAeG,8BACpBC,SAAiB,EACjBC,YAAoB;IAEpB,IAAI;QACF,MAAMJ,4BAA4BG,WAAWC;IAC/C,EAAE,OAAOC,KAAc;QACrB,gFAAgF;QAChF,IAAIC,UAAU,OAAOD,QAAQ,WAAWA,MAAM;QAC9C,IAAIA,eAAeE,OAAO;YACxBD,UAAUD,IAAIC,OAAO;QACvB;QAEAL,MAAM,8DAA8DK;IACtE;AACF"}
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
import { type ConsentInformation } from './types.js';
|
|
2
|
-
|
|
3
|
-
DO_NOT_TRACK?: string;
|
|
4
|
-
SANITY_TELEMETRY_INSPECT?: string;
|
|
5
|
-
}
|
|
6
|
-
interface Options {
|
|
7
|
-
env: Env | NodeJS.ProcessEnv;
|
|
8
|
-
}
|
|
9
|
-
export declare function resolveConsent({ env }: Options): Promise<ConsentInformation>;
|
|
10
|
-
export {};
|
|
2
|
+
export declare function resolveConsent(): Promise<ConsentInformation>;
|
|
@@ -8,7 +8,7 @@ function parseApiConsentStatus(value) {
|
|
|
8
8
|
}
|
|
9
9
|
throw new Error(`Invalid consent status. Must be one of: ${VALID_API_STATUSES.join(', ')}`);
|
|
10
10
|
}
|
|
11
|
-
export async function resolveConsent(
|
|
11
|
+
export async function resolveConsent() {
|
|
12
12
|
telemetryDebug('Resolving consent…');
|
|
13
13
|
if (isCi()) {
|
|
14
14
|
telemetryDebug('CI environment detected, treating telemetry consent as denied');
|
|
@@ -16,7 +16,7 @@ export async function resolveConsent({ env }) {
|
|
|
16
16
|
status: 'denied'
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
if (isTrueish(env.DO_NOT_TRACK)) {
|
|
19
|
+
if (isTrueish(process.env.DO_NOT_TRACK)) {
|
|
20
20
|
telemetryDebug('DO_NOT_TRACK is set, consent is denied');
|
|
21
21
|
return {
|
|
22
22
|
reason: 'localOverride',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/telemetry/resolveConsent.ts"],"sourcesContent":["import {getCliToken, isCi, isTrueish} from '@sanity/cli-core'\n\nimport {fetchTelemetryConsent} from './fetchTelemetryConsent.js'\nimport {\n isValidApiConsentStatus,\n VALID_API_STATUSES,\n type ValidApiConsentStatus,\n} from './isValidApiConsentStatus.js'\nimport {telemetryDebug} from './telemetryDebug.js'\nimport {type ConsentInformation} from './types.js'\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/telemetry/resolveConsent.ts"],"sourcesContent":["import {getCliToken, isCi, isTrueish} from '@sanity/cli-core'\n\nimport {fetchTelemetryConsent} from './fetchTelemetryConsent.js'\nimport {\n isValidApiConsentStatus,\n VALID_API_STATUSES,\n type ValidApiConsentStatus,\n} from './isValidApiConsentStatus.js'\nimport {telemetryDebug} from './telemetryDebug.js'\nimport {type ConsentInformation} from './types.js'\n\nfunction parseApiConsentStatus(value: unknown): ValidApiConsentStatus {\n if (typeof value === 'string' && isValidApiConsentStatus(value)) {\n return value\n }\n throw new Error(`Invalid consent status. Must be one of: ${VALID_API_STATUSES.join(', ')}`)\n}\n\nexport async function resolveConsent(): Promise<ConsentInformation> {\n telemetryDebug('Resolving consent…')\n if (isCi()) {\n telemetryDebug('CI environment detected, treating telemetry consent as denied')\n return {status: 'denied'}\n }\n\n if (isTrueish(process.env.DO_NOT_TRACK)) {\n telemetryDebug('DO_NOT_TRACK is set, consent is denied')\n return {\n reason: 'localOverride',\n status: 'denied',\n }\n }\n\n const token = await getCliToken()\n if (!token) {\n telemetryDebug('User is not logged in, consent is undetermined')\n return {\n reason: 'unauthenticated',\n status: 'undetermined',\n }\n }\n\n try {\n const response = await fetchTelemetryConsent()\n\n telemetryDebug('User consent status is %s', response.status)\n return {status: parseApiConsentStatus(response.status)}\n } catch (err) {\n telemetryDebug('Failed to fetch user consent status, treating it as \"undetermined\": %s', err)\n return {\n reason: 'fetchError',\n status: 'undetermined',\n }\n }\n}\n"],"names":["getCliToken","isCi","isTrueish","fetchTelemetryConsent","isValidApiConsentStatus","VALID_API_STATUSES","telemetryDebug","parseApiConsentStatus","value","Error","join","resolveConsent","status","process","env","DO_NOT_TRACK","reason","token","response","err"],"mappings":"AAAA,SAAQA,WAAW,EAAEC,IAAI,EAAEC,SAAS,QAAO,mBAAkB;AAE7D,SAAQC,qBAAqB,QAAO,6BAA4B;AAChE,SACEC,uBAAuB,EACvBC,kBAAkB,QAEb,+BAA8B;AACrC,SAAQC,cAAc,QAAO,sBAAqB;AAGlD,SAASC,sBAAsBC,KAAc;IAC3C,IAAI,OAAOA,UAAU,YAAYJ,wBAAwBI,QAAQ;QAC/D,OAAOA;IACT;IACA,MAAM,IAAIC,MAAM,CAAC,wCAAwC,EAAEJ,mBAAmBK,IAAI,CAAC,OAAO;AAC5F;AAEA,OAAO,eAAeC;IACpBL,eAAe;IACf,IAAIL,QAAQ;QACVK,eAAe;QACf,OAAO;YAACM,QAAQ;QAAQ;IAC1B;IAEA,IAAIV,UAAUW,QAAQC,GAAG,CAACC,YAAY,GAAG;QACvCT,eAAe;QACf,OAAO;YACLU,QAAQ;YACRJ,QAAQ;QACV;IACF;IAEA,MAAMK,QAAQ,MAAMjB;IACpB,IAAI,CAACiB,OAAO;QACVX,eAAe;QACf,OAAO;YACLU,QAAQ;YACRJ,QAAQ;QACV;IACF;IAEA,IAAI;QACF,MAAMM,WAAW,MAAMf;QAEvBG,eAAe,6BAA6BY,SAASN,MAAM;QAC3D,OAAO;YAACA,QAAQL,sBAAsBW,SAASN,MAAM;QAAC;IACxD,EAAE,OAAOO,KAAK;QACZb,eAAe,0EAA0Ea;QACzF,OAAO;YACLH,QAAQ;YACRJ,QAAQ;QACV;IACF;AACF"}
|
|
@@ -2,9 +2,6 @@ import { type ValidApiConsentStatus } from './isValidApiConsentStatus.js';
|
|
|
2
2
|
import { type ConsentInformation } from './types.js';
|
|
3
3
|
type SettableConsentStatus = Extract<ValidApiConsentStatus, 'denied' | 'granted'>;
|
|
4
4
|
interface SetConsentOptions {
|
|
5
|
-
env: NodeJS.ProcessEnv | {
|
|
6
|
-
[key: string]: string | undefined;
|
|
7
|
-
};
|
|
8
5
|
status: SettableConsentStatus;
|
|
9
6
|
}
|
|
10
7
|
interface SetConsentResult {
|
|
@@ -12,5 +9,5 @@ interface SetConsentResult {
|
|
|
12
9
|
currentStatus: ConsentInformation;
|
|
13
10
|
message: string;
|
|
14
11
|
}
|
|
15
|
-
export declare function setConsent({
|
|
12
|
+
export declare function setConsent({ status }: SetConsentOptions): Promise<SetConsentResult>;
|
|
16
13
|
export {};
|
|
@@ -6,12 +6,10 @@ const TELEMETRY_CONSENT_CONFIG_KEY = 'telemetryConsent';
|
|
|
6
6
|
function isHttpError(error) {
|
|
7
7
|
return typeof error === 'object' && error !== null && 'statusCode' in error && 'message' in error;
|
|
8
8
|
}
|
|
9
|
-
export async function setConsent({
|
|
9
|
+
export async function setConsent({ status }) {
|
|
10
10
|
telemetryDebug('Setting telemetry consent to "%s"', status);
|
|
11
11
|
// Check current consent status first
|
|
12
|
-
const currentConsent = await resolveConsent(
|
|
13
|
-
env
|
|
14
|
-
});
|
|
12
|
+
const currentConsent = await resolveConsent();
|
|
15
13
|
// Handle various blocking conditions
|
|
16
14
|
if (isCi()) {
|
|
17
15
|
return {
|
|
@@ -20,7 +18,7 @@ export async function setConsent({ env, status }) {
|
|
|
20
18
|
message: 'Cannot set telemetry consent in CI environment'
|
|
21
19
|
};
|
|
22
20
|
}
|
|
23
|
-
if (isTrueish(env.DO_NOT_TRACK) && status === 'granted') {
|
|
21
|
+
if (isTrueish(process.env.DO_NOT_TRACK) && status === 'granted') {
|
|
24
22
|
return {
|
|
25
23
|
changed: false,
|
|
26
24
|
currentStatus: currentConsent,
|
|
@@ -59,9 +57,7 @@ export async function setConsent({ env, status }) {
|
|
|
59
57
|
const userConfig = getUserConfig();
|
|
60
58
|
userConfig.delete(TELEMETRY_CONSENT_CONFIG_KEY);
|
|
61
59
|
const successMessage = status === 'granted' ? "You've now enabled telemetry data collection to help us improve Sanity." : "You've opted out of telemetry data collection.\nNo data will be collected from your Sanity account.";
|
|
62
|
-
const newConsent = await resolveConsent(
|
|
63
|
-
env
|
|
64
|
-
});
|
|
60
|
+
const newConsent = await resolveConsent();
|
|
65
61
|
return {
|
|
66
62
|
changed: true,
|
|
67
63
|
currentStatus: newConsent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/telemetry/setConsent.ts"],"sourcesContent":["import {getGlobalCliClient, getUserConfig, isCi, isTrueish} from '@sanity/cli-core'\n\nimport {type ValidApiConsentStatus} from './isValidApiConsentStatus.js'\nimport {resolveConsent} from './resolveConsent.js'\nimport {telemetryDebug} from './telemetryDebug.js'\nimport {type ConsentInformation} from './types.js'\n\nconst TELEMETRY_CONSENT_CONFIG_KEY = 'telemetryConsent'\n\ntype SettableConsentStatus = Extract<ValidApiConsentStatus, 'denied' | 'granted'>\n\n// Type guard for error objects with HTTP properties\nfunction isHttpError(error: unknown): error is {\n message: string\n response?: {body?: {message?: string}}\n statusCode: number\n} {\n return typeof error === 'object' && error !== null && 'statusCode' in error && 'message' in error\n}\n\ninterface SetConsentOptions {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/telemetry/setConsent.ts"],"sourcesContent":["import {getGlobalCliClient, getUserConfig, isCi, isTrueish} from '@sanity/cli-core'\n\nimport {type ValidApiConsentStatus} from './isValidApiConsentStatus.js'\nimport {resolveConsent} from './resolveConsent.js'\nimport {telemetryDebug} from './telemetryDebug.js'\nimport {type ConsentInformation} from './types.js'\n\nconst TELEMETRY_CONSENT_CONFIG_KEY = 'telemetryConsent'\n\ntype SettableConsentStatus = Extract<ValidApiConsentStatus, 'denied' | 'granted'>\n\n// Type guard for error objects with HTTP properties\nfunction isHttpError(error: unknown): error is {\n message: string\n response?: {body?: {message?: string}}\n statusCode: number\n} {\n return typeof error === 'object' && error !== null && 'statusCode' in error && 'message' in error\n}\n\ninterface SetConsentOptions {\n status: SettableConsentStatus\n}\n\ninterface SetConsentResult {\n changed: boolean\n currentStatus: ConsentInformation\n message: string\n}\n\nexport async function setConsent({status}: SetConsentOptions): Promise<SetConsentResult> {\n telemetryDebug('Setting telemetry consent to \"%s\"', status)\n\n // Check current consent status first\n const currentConsent = await resolveConsent()\n\n // Handle various blocking conditions\n if (isCi()) {\n return {\n changed: false,\n currentStatus: currentConsent,\n message: 'Cannot set telemetry consent in CI environment',\n }\n }\n\n if (isTrueish(process.env.DO_NOT_TRACK) && status === 'granted') {\n return {\n changed: false,\n currentStatus: currentConsent,\n message:\n 'Cannot enable telemetry while DO_NOT_TRACK environment variable is set. Unset DO_NOT_TRACK to enable telemetry.',\n }\n }\n\n // Check if already at desired status\n if (currentConsent.status === status) {\n const message =\n status === 'granted'\n ? \"You've already enabled telemetry data collection to help us improve Sanity.\"\n : currentConsent.reason === 'localOverride'\n ? \"You've already opted out of telemetry data collection.\\nNo data is collected from your machine.\\n\\nUsing DO_NOT_TRACK environment variable.\"\n : \"You've already opted out of telemetry data collection.\\nNo data is collected from your Sanity account.\"\n\n return {\n changed: false,\n currentStatus: currentConsent,\n message,\n }\n }\n\n // User must be logged in to set consent\n if (currentConsent.status === 'undetermined' && currentConsent.reason === 'unauthenticated') {\n return {\n changed: false,\n currentStatus: currentConsent,\n message: 'You need to log in first to set telemetry preferences.',\n }\n }\n\n try {\n const client = await getGlobalCliClient({\n apiVersion: '2023-12-18',\n requireUser: true,\n })\n\n const uri = `/users/me/consents/telemetry/status/${status}`\n telemetryDebug('Sending telemetry consent status to %s', uri)\n\n await client.request({\n method: 'PUT',\n uri,\n })\n\n // Clear cached telemetry consent\n const userConfig = getUserConfig()\n userConfig.delete(TELEMETRY_CONSENT_CONFIG_KEY)\n\n const successMessage =\n status === 'granted'\n ? \"You've now enabled telemetry data collection to help us improve Sanity.\"\n : \"You've opted out of telemetry data collection.\\nNo data will be collected from your Sanity account.\"\n\n const newConsent = await resolveConsent()\n\n return {\n changed: true,\n currentStatus: newConsent,\n message: successMessage,\n }\n } catch (err: unknown) {\n const errorMessage = `Failed to ${status === 'granted' ? 'enable' : 'disable'} telemetry`\n\n if (isHttpError(err) && err.statusCode === 403) {\n // Create a new error without stack trace from original error\n const message = err.response?.body?.message\n ? `${errorMessage}: ${err.response.body.message}`\n : errorMessage\n throw new Error(message)\n }\n\n if (isHttpError(err)) {\n // For other errors, preserve the original error but update the message\n err.message = err.response?.body?.message\n ? `${errorMessage}: ${err.response.body.message}`\n : errorMessage\n throw err\n }\n\n // For non-HTTP errors, wrap in a new error\n throw new Error(errorMessage)\n }\n}\n"],"names":["getGlobalCliClient","getUserConfig","isCi","isTrueish","resolveConsent","telemetryDebug","TELEMETRY_CONSENT_CONFIG_KEY","isHttpError","error","setConsent","status","currentConsent","changed","currentStatus","message","process","env","DO_NOT_TRACK","reason","client","apiVersion","requireUser","uri","request","method","userConfig","delete","successMessage","newConsent","err","errorMessage","statusCode","response","body","Error"],"mappings":"AAAA,SAAQA,kBAAkB,EAAEC,aAAa,EAAEC,IAAI,EAAEC,SAAS,QAAO,mBAAkB;AAGnF,SAAQC,cAAc,QAAO,sBAAqB;AAClD,SAAQC,cAAc,QAAO,sBAAqB;AAGlD,MAAMC,+BAA+B;AAIrC,oDAAoD;AACpD,SAASC,YAAYC,KAAc;IAKjC,OAAO,OAAOA,UAAU,YAAYA,UAAU,QAAQ,gBAAgBA,SAAS,aAAaA;AAC9F;AAYA,OAAO,eAAeC,WAAW,EAACC,MAAM,EAAoB;IAC1DL,eAAe,qCAAqCK;IAEpD,qCAAqC;IACrC,MAAMC,iBAAiB,MAAMP;IAE7B,qCAAqC;IACrC,IAAIF,QAAQ;QACV,OAAO;YACLU,SAAS;YACTC,eAAeF;YACfG,SAAS;QACX;IACF;IAEA,IAAIX,UAAUY,QAAQC,GAAG,CAACC,YAAY,KAAKP,WAAW,WAAW;QAC/D,OAAO;YACLE,SAAS;YACTC,eAAeF;YACfG,SACE;QACJ;IACF;IAEA,qCAAqC;IACrC,IAAIH,eAAeD,MAAM,KAAKA,QAAQ;QACpC,MAAMI,UACJJ,WAAW,YACP,gFACAC,eAAeO,MAAM,KAAK,kBACxB,gJACA;QAER,OAAO;YACLN,SAAS;YACTC,eAAeF;YACfG;QACF;IACF;IAEA,wCAAwC;IACxC,IAAIH,eAAeD,MAAM,KAAK,kBAAkBC,eAAeO,MAAM,KAAK,mBAAmB;QAC3F,OAAO;YACLN,SAAS;YACTC,eAAeF;YACfG,SAAS;QACX;IACF;IAEA,IAAI;QACF,MAAMK,SAAS,MAAMnB,mBAAmB;YACtCoB,YAAY;YACZC,aAAa;QACf;QAEA,MAAMC,MAAM,CAAC,oCAAoC,EAAEZ,QAAQ;QAC3DL,eAAe,0CAA0CiB;QAEzD,MAAMH,OAAOI,OAAO,CAAC;YACnBC,QAAQ;YACRF;QACF;QAEA,iCAAiC;QACjC,MAAMG,aAAaxB;QACnBwB,WAAWC,MAAM,CAACpB;QAElB,MAAMqB,iBACJjB,WAAW,YACP,4EACA;QAEN,MAAMkB,aAAa,MAAMxB;QAEzB,OAAO;YACLQ,SAAS;YACTC,eAAee;YACfd,SAASa;QACX;IACF,EAAE,OAAOE,KAAc;QACrB,MAAMC,eAAe,CAAC,UAAU,EAAEpB,WAAW,YAAY,WAAW,UAAU,UAAU,CAAC;QAEzF,IAAIH,YAAYsB,QAAQA,IAAIE,UAAU,KAAK,KAAK;YAC9C,6DAA6D;YAC7D,MAAMjB,UAAUe,IAAIG,QAAQ,EAAEC,MAAMnB,UAChC,GAAGgB,aAAa,EAAE,EAAED,IAAIG,QAAQ,CAACC,IAAI,CAACnB,OAAO,EAAE,GAC/CgB;YACJ,MAAM,IAAII,MAAMpB;QAClB;QAEA,IAAIP,YAAYsB,MAAM;YACpB,uEAAuE;YACvEA,IAAIf,OAAO,GAAGe,IAAIG,QAAQ,EAAEC,MAAMnB,UAC9B,GAAGgB,aAAa,EAAE,EAAED,IAAIG,QAAQ,CAACC,IAAI,CAACnB,OAAO,EAAE,GAC/CgB;YACJ,MAAMD;QACR;QAEA,2CAA2C;QAC3C,MAAM,IAAIK,MAAMJ;IAClB;AACF"}
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -10,46 +10,56 @@ export declare class InitCommand extends SanityCommand<typeof InitCommand> {
|
|
|
10
10
|
description: string;
|
|
11
11
|
})[];
|
|
12
12
|
static flags: {
|
|
13
|
-
'auto-updates': import("@oclif/core/interfaces").BooleanFlag<
|
|
14
|
-
bare: import("@oclif/core/interfaces").BooleanFlag<
|
|
13
|
+
'auto-updates': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
bare: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
15
|
coupon: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
16
|
'create-project': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
17
|
dataset: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
-
'dataset-default': import("@oclif/core/interfaces").BooleanFlag<
|
|
18
|
+
'dataset-default': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
19
|
env: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
-
'from-create': import("@oclif/core/interfaces").BooleanFlag<
|
|
20
|
+
'from-create': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
21
21
|
git: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
-
mcp: import("@oclif/core/interfaces").BooleanFlag<
|
|
23
|
-
'nextjs-add-config-files': import("@oclif/core/interfaces").BooleanFlag<
|
|
24
|
-
'nextjs-append-env': import("@oclif/core/interfaces").BooleanFlag<
|
|
25
|
-
'nextjs-embed-studio': import("@oclif/core/interfaces").BooleanFlag<
|
|
26
|
-
'no-git': import("@oclif/core/interfaces").BooleanFlag<
|
|
22
|
+
mcp: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
23
|
+
'nextjs-add-config-files': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
24
|
+
'nextjs-append-env': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
25
|
+
'nextjs-embed-studio': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
26
|
+
'no-git': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
27
27
|
organization: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
28
28
|
'output-path': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
29
|
-
'overwrite-files': import("@oclif/core/interfaces").BooleanFlag<
|
|
29
|
+
'overwrite-files': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
30
30
|
'package-manager': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
31
31
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
32
32
|
'project-plan': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
33
33
|
provider: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
quickstart: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
35
|
+
reconfigure: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
36
|
+
template: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
36
37
|
'template-token': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
37
|
-
typescript: import("@oclif/core/interfaces").BooleanFlag<
|
|
38
|
+
typescript: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
38
39
|
visibility: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
39
|
-
yes: import("@oclif/core/interfaces").BooleanFlag<
|
|
40
|
+
yes: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
40
41
|
};
|
|
41
42
|
run(): Promise<void>;
|
|
42
43
|
private checkFlagsInUnattendedMode;
|
|
43
44
|
private createProjectFromName;
|
|
44
45
|
private ensureAuthenticated;
|
|
46
|
+
private flagOrDefault;
|
|
45
47
|
private getOrCreateDataset;
|
|
46
48
|
private getOrCreateProject;
|
|
47
49
|
private getPlan;
|
|
50
|
+
private getPostInitMCPPrompt;
|
|
48
51
|
private getProjectDetails;
|
|
52
|
+
private getProjectOutputPath;
|
|
53
|
+
private initNextJs;
|
|
54
|
+
private promptForDatasetImport;
|
|
49
55
|
private promptForDefaultConfig;
|
|
50
56
|
private promptForProjectCreation;
|
|
57
|
+
private promptForTemplate;
|
|
58
|
+
private promptForUndefinedFlag;
|
|
51
59
|
private promptUserForNewOrganization;
|
|
52
60
|
private promptUserForOrganization;
|
|
53
61
|
private verifyCoupon;
|
|
54
62
|
private verifyPlan;
|
|
63
|
+
private writeOrOverwrite;
|
|
64
|
+
private writeSourceFiles;
|
|
55
65
|
}
|