File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,14 +67,19 @@ function registerSchemasHandler(context: vscode.ExtensionContext) {
6767 // get schema form local file in node_modules
6868 const schemaFile = (
6969 await vscode . workspace . findFiles (
70- '**/node_modules/@tauri-apps/cli/schema.json'
70+ '**/node_modules/@tauri-apps/cli/{ schema.json,config.schema.json} '
7171 )
7272 ) [ 0 ]
73+
7374 if ( schemaFile ) return readFileSync ( schemaFile . fsPath , 'utf-8' )
7475
7576 async function getSchemaFromRelease ( version : string ) {
77+ const filename = version . startsWith ( '1' )
78+ ? 'schema.json'
79+ : 'config.schema.json'
80+
7681 const res = await axios . get (
77- `https://github.com/tauri-apps/tauri/releases/download/tauri-build-v${ version } /schema.json `
82+ `https://github.com/tauri-apps/tauri/releases/download/tauri-build-v${ version } /${ filename } `
7883 )
7984 return res . status == 200 ? JSON . stringify ( res . data ) : null
8085 }
You can’t perform that action at this time.
0 commit comments