Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/core/lib/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import * as colors from "./external/colors.ts";
import { MappedString } from "./text-types.ts";
import { ErrorLocation, TidyverseError } from "./errors-types.ts";
import { isWindows } from "../../deno_ral/platform.ts";

// tidyverse error message styling
// https://style.tidyverse.org/error-messages.html
Expand All @@ -25,9 +24,19 @@ import { isWindows } from "../../deno_ral/platform.ts";

function platformHasNonAsciiCharacters(): boolean {
try {
return !isWindows;
// we can't import from deno_ral directly here
// because it's outside of core/lib, which
// gets imported by code that runs in the browser
//
// Then, we need to guard against Deno being undefined
// there as well
return Deno.build.os !== "windows";
} catch (_e) {
return false;
//
// But if deno is undefined, we can assume that we're
// running in the browser, where non-ascii characters
// are supported
return true;
}
}

Expand Down
51 changes: 46 additions & 5 deletions src/resources/editor/tools/vs-code.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11839,6 +11839,11 @@ var require_yaml_intelligence_resources = __commonJS({
description: "The brand's Mastodon URL."
}
},
bluesky: {
string: {
description: "The brand's Bluesky URL."
}
},
github: {
string: {
description: "The brand's GitHub URL."
Expand Down Expand Up @@ -12526,10 +12531,45 @@ var require_yaml_intelligence_resources = __commonJS({
ref: "brand-typography"
},
defaults: {
ref: "brand-defaults"
}
}
}
},
{
id: "brand-defaults",
object: {
properties: {
bootstrap: {
ref: "brand-defaults-bootstrap"
},
quarto: {
schema: "object"
}
}
}
},
{
id: "brand-defaults-bootstrap",
object: {
properties: {
defaults: {
schema: {
object: {
additionalProperties: {
schema: {
anyOf: [
"string",
"boolean",
"number"
]
}
}
}
}
}
}
}
}
],
"schema/document-about.yml": [
Expand Down Expand Up @@ -21782,6 +21822,7 @@ var require_yaml_intelligence_resources = __commonJS({
"Important links for the brand, including social media links. If a\nsingle string, it is the brand\u2019s home page or website. Additional fields\nare allowed for internal use.",
"The brand\u2019s home page or website.",
"The brand\u2019s Mastodon URL.",
"The brand\u2019s Bluesky URL.",
"The brand\u2019s GitHub URL.",
"The brand\u2019s LinkedIn URL.",
"The brand\u2019s Twitter URL.",
Expand Down Expand Up @@ -24146,12 +24187,12 @@ var require_yaml_intelligence_resources = __commonJS({
mermaid: "%%"
},
"handlers/mermaid/schema.yml": {
_internalId: 193475,
_internalId: 193524,
type: "object",
description: "be an object",
properties: {
"mermaid-format": {
_internalId: 193467,
_internalId: 193516,
type: "enum",
enum: [
"png",
Expand All @@ -24167,7 +24208,7 @@ var require_yaml_intelligence_resources = __commonJS({
exhaustiveCompletions: true
},
theme: {
_internalId: 193474,
_internalId: 193523,
type: "anyOf",
anyOf: [
{
Expand Down Expand Up @@ -24301,9 +24342,9 @@ var ANSI_PATTERN = new RegExp(
// ../errors.ts
function platformHasNonAsciiCharacters() {
try {
return !isWindows;
return Deno.build.os !== "windows";
} catch (_e) {
return false;
return true;
}
}
function tidyverseInfo(msg) {
Expand Down
49 changes: 45 additions & 4 deletions src/resources/editor/tools/yaml/web-worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 44 additions & 3 deletions src/resources/editor/tools/yaml/yaml-intelligence-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -4811,6 +4811,11 @@
"description": "The brand's Mastodon URL."
}
},
"bluesky": {
"string": {
"description": "The brand's Bluesky URL."
}
},
"github": {
"string": {
"description": "The brand's GitHub URL."
Expand Down Expand Up @@ -5498,10 +5503,45 @@
"ref": "brand-typography"
},
"defaults": {
"ref": "brand-defaults"
}
}
}
},
{
"id": "brand-defaults",
"object": {
"properties": {
"bootstrap": {
"ref": "brand-defaults-bootstrap"
},
"quarto": {
"schema": "object"
}
}
}
},
{
"id": "brand-defaults-bootstrap",
"object": {
"properties": {
"defaults": {
"schema": {
"object": {
"additionalProperties": {
"schema": {
"anyOf": [
"string",
"boolean",
"number"
]
}
}
}
}
}
}
}
}
],
"schema/document-about.yml": [
Expand Down Expand Up @@ -14754,6 +14794,7 @@
"Important links for the brand, including social media links. If a\nsingle string, it is the brand’s home page or website. Additional fields\nare allowed for internal use.",
"The brand’s home page or website.",
"The brand’s Mastodon URL.",
"The brand’s Bluesky URL.",
"The brand’s GitHub URL.",
"The brand’s LinkedIn URL.",
"The brand’s Twitter URL.",
Expand Down Expand Up @@ -17118,12 +17159,12 @@
"mermaid": "%%"
},
"handlers/mermaid/schema.yml": {
"_internalId": 193475,
"_internalId": 193524,
"type": "object",
"description": "be an object",
"properties": {
"mermaid-format": {
"_internalId": 193467,
"_internalId": 193516,
"type": "enum",
"enum": [
"png",
Expand All @@ -17139,7 +17180,7 @@
"exhaustiveCompletions": true
},
"theme": {
"_internalId": 193474,
"_internalId": 193523,
"type": "anyOf",
"anyOf": [
{
Expand Down
21 changes: 21 additions & 0 deletions src/resources/schema/definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2977,4 +2977,25 @@
typography:
ref: brand-typography
defaults:
ref: brand-defaults

- id: brand-defaults
object:
properties:
bootstrap:
ref: brand-defaults-bootstrap
quarto:
schema: object

- id: brand-defaults-bootstrap
object:
properties:
defaults:
schema:
object:
additionalProperties:
schema:
anyOf:
- string
- boolean
- number
26 changes: 26 additions & 0 deletions src/resources/schema/json-schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -3204,6 +3204,9 @@
"mastodon": {
"type": "string"
},
"bluesky": {
"type": "string"
},
"github": {
"type": "string"
},
Expand Down Expand Up @@ -3767,11 +3770,34 @@
"$ref": "#/$defs/BrandTypography"
},
"defaults": {
"$ref": "#/$defs/BrandDefaults"
}
}
}
},
"BrandDefaults": {
"object": {
"properties": {
"bootstrap": {
"$ref": "#/$defs/BrandDefaultsBootstrap"
},
"quarto": {
"type": "object"
}
}
}
},
"BrandDefaultsBootstrap": {
"object": {
"properties": {
"defaults": {
"object": {
"properties": {}
}
}
}
}
},
"ProjectConfig": {
"object": {
"properties": {
Expand Down
Loading
Loading