Skip to content

Commit c058708

Browse files
authored
chore: update docs url (#247)
* chore: update docs url * fix: local schema path
1 parent fcbad49 commit c058708

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

crates/pgt_configuration/src/lib.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,7 @@ impl PartialConfiguration {
8484
/// Returns the initial configuration.
8585
pub fn init() -> Self {
8686
Self {
87-
// TODO: Update this once we have a static url
88-
schema: Some(format!(
89-
"https://supabase-community.github.io/postgres_lsp/schemas/{VERSION}/schema.json"
90-
)),
87+
schema: Some(format!("https://pgtools.dev/schemas/{VERSION}/schema.json")),
9188
files: Some(PartialFilesConfiguration {
9289
ignore: Some(Default::default()),
9390
..Default::default()

crates/pgt_workspace/src/configuration.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,13 @@ pub fn create_config(
171171

172172
// we now check if pglt is installed inside `node_modules` and if so, we use the schema from there
173173
if VERSION == "0.0.0" {
174-
let schema_path = Path::new("./node_modules/@pglt/pglt/schema.json");
174+
let schema_path = Path::new("./node_modules/@postgrestools/postgrestools/schema.json");
175175
let options = OpenOptions::default().read(true);
176176
if fs.open_with_options(schema_path, options).is_ok() {
177177
configuration.schema = schema_path.to_str().map(String::from);
178178
}
179179
} else {
180-
configuration.schema = Some(format!(
181-
"https://supabase-community.github.io/postgres_lsp/schemas/{VERSION}/schema.json"
182-
));
180+
configuration.schema = Some(format!("https://pgtools.dev/schemas/{VERSION}/schema.json"));
183181
}
184182

185183
let contents = serde_json::to_string_pretty(&configuration)

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ After running the `init` command, you’ll have a `postgrestools.jsonc` file in
4141

4242
```json
4343
{
44-
"$schema": "https://supabase-community.github.io/postgres_lsp/schemas/0.0.0/schema.json",
44+
"$schema": "https://pgtools.dev/schemas/0.0.0/schema.json",
4545
"vcs": {
4646
"enabled": false,
4747
"clientKind": "git",

0 commit comments

Comments
 (0)