update all deps
This commit is contained in:
parent
f43db76966
commit
0d3fc13944
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@matthiesenxyz/astro-gists": patch
|
||||
---
|
||||
|
||||
update dependencies
|
|
@ -41,22 +41,21 @@
|
|||
"scripts": {},
|
||||
"type": "module",
|
||||
"peerDependencies": {
|
||||
"astro": ">=4.4.1"
|
||||
"astro": ">=4.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@octokit/types": "^12.6.0"
|
||||
"@octokit/types": "^13.4.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@expressive-code/core": "^0.33.5",
|
||||
"@expressive-code/plugin-frames": "0.33.5",
|
||||
"@expressive-code/plugin-shiki": "0.33.5",
|
||||
"@expressive-code/plugin-text-markers": "0.33.5",
|
||||
"@expressive-code/plugin-line-numbers": "^0.33.5",
|
||||
"astro-integration-kit": "^0.8.0",
|
||||
"@expressive-code/core": "^0.35.2",
|
||||
"@expressive-code/plugin-frames": "^0.35.2",
|
||||
"@expressive-code/plugin-shiki": "^0.35.2",
|
||||
"@expressive-code/plugin-text-markers": "^0.35.2",
|
||||
"@expressive-code/plugin-line-numbers": "^0.35.2",
|
||||
"astro-integration-kit": "^0.12.0",
|
||||
"chalk": "^5.3.0",
|
||||
"hast-util-to-html": "8.0.4",
|
||||
"p-retry": "6.2.0",
|
||||
"octokit": "^3.1.2",
|
||||
"vite": "^5.2.7"
|
||||
"p-retry": "^6.2.0",
|
||||
"octokit": "^3.2.0",
|
||||
"vite": "^5.2.10"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
import { toHtml } from 'hast-util-to-html'
|
||||
import { toHtml } from '@expressive-code/core/hast'
|
||||
import { getPageData } from './page-data';
|
||||
import { engine } from '../index'
|
||||
|
||||
|
|
|
@ -25,63 +25,62 @@ export const TOKEN_MISSING_ERROR = "GITHUB_PERSONAL_TOKEN not found. Please add
|
|||
export default defineIntegration({
|
||||
name: "@matthiesenxyz/astro-gists",
|
||||
optionsSchema: z.custom<astroGistsUserConfig>().optional().default({ verbose: false }),
|
||||
setup({
|
||||
name,
|
||||
options,
|
||||
options: { verbose: isVerbose }
|
||||
}) {
|
||||
setup({ name, options }) {
|
||||
return {
|
||||
"astro:config:setup": ( params ) => {
|
||||
hooks: {
|
||||
"astro:config:setup": ( params ) => {
|
||||
|
||||
const { logger } = params;
|
||||
|
||||
// Create a logger for the setup events
|
||||
const configLogger = logger.fork("astro-gists : setup");
|
||||
const configDone = logger.fork("astro-gists : setup-done")
|
||||
|
||||
gistLogger(configLogger, isVerbose, "info", "Setting up Astro Gists Integration.", false);
|
||||
|
||||
gistLogger(configLogger, isVerbose, "warn", "Verbose logging is enabled.", true);
|
||||
|
||||
// Check for GITHUB_PERSONAL_TOKEN
|
||||
if (!isThereAToken()) {
|
||||
gistLogger(configLogger, isVerbose, "error",TOKEN_MISSING_ERROR, false)
|
||||
const { verbose } = options;
|
||||
const { logger } = params;
|
||||
|
||||
// Create a logger for the setup events
|
||||
const configLogger = logger.fork("astro-gists : setup");
|
||||
const configDone = logger.fork("astro-gists : setup-done")
|
||||
|
||||
gistLogger(configLogger, verbose, "info", "Setting up Astro Gists Integration.", false);
|
||||
|
||||
gistLogger(configLogger, verbose, "warn", "Verbose logging is enabled.", true);
|
||||
|
||||
// Check for GITHUB_PERSONAL_TOKEN
|
||||
if (!isThereAToken()) {
|
||||
gistLogger(configLogger, verbose, "error",TOKEN_MISSING_ERROR, false)
|
||||
}
|
||||
|
||||
// Add virtual imports
|
||||
gistLogger(configLogger, verbose, "info", "Adding virtual imports.", true);
|
||||
addVirtualImports(params, {
|
||||
name,
|
||||
imports: {
|
||||
"virtual:astro-gists/config": `export default ${JSON.stringify(options)}`,
|
||||
"astro-gists:components": `export * from "@matthiesenxyz/astro-gists/components";`
|
||||
}});
|
||||
|
||||
// Add .d.ts file
|
||||
gistLogger(configLogger, verbose, "info", "Injecting astro-gists.d.ts file.", true);
|
||||
|
||||
const gistsDTS = fileFactory();
|
||||
|
||||
gistsDTS.addLines(`
|
||||
declare module "astro-gists:components" {
|
||||
export * from "@matthiesenxyz/astro-gists/components";
|
||||
}
|
||||
`)
|
||||
|
||||
addDts(params, {
|
||||
name: "astro-gists",
|
||||
content: gistsDTS.text()
|
||||
})
|
||||
|
||||
// Log that the configuration is complete
|
||||
gistLogger(
|
||||
configDone,
|
||||
verbose,
|
||||
"info",
|
||||
"Configuration for Astro Gists Integration is complete.",
|
||||
false
|
||||
);
|
||||
},
|
||||
}
|
||||
|
||||
// Add virtual imports
|
||||
gistLogger(configLogger, isVerbose, "info", "Adding virtual imports.", true);
|
||||
addVirtualImports(params, {
|
||||
name,
|
||||
imports: {
|
||||
"virtual:astro-gists/config": `export default ${JSON.stringify(options)}`,
|
||||
"astro-gists:components": `export * from "@matthiesenxyz/astro-gists/components";`
|
||||
}});
|
||||
|
||||
// Add .d.ts file
|
||||
gistLogger(configLogger, isVerbose, "info", "Injecting astro-gists.d.ts file.", true);
|
||||
|
||||
const gistsDTS = fileFactory();
|
||||
|
||||
gistsDTS.addLines(`
|
||||
declare module "astro-gists:components" {
|
||||
export * from "@matthiesenxyz/astro-gists/components";
|
||||
}
|
||||
`)
|
||||
|
||||
addDts(params, {
|
||||
name: "astro-gists",
|
||||
content: gistsDTS.text()
|
||||
})
|
||||
|
||||
// Log that the configuration is complete
|
||||
gistLogger(
|
||||
configDone,
|
||||
isVerbose,
|
||||
"info",
|
||||
"Configuration for Astro Gists Integration is complete.",
|
||||
false
|
||||
);
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"astro": "^4.5.12",
|
||||
"astro": "^4.7.0",
|
||||
"@matthiesenxyz/astro-gists": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/mdx": "^2.2.2",
|
||||
"@astrojs/mdx": "^2.3.1",
|
||||
"@astrojs/check": "^0.5.10",
|
||||
"@types/node": "^20.12.2",
|
||||
"typescript": "^5.4.3"
|
||||
"@types/node": "^20.12.7",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
|
|
1324
pnpm-lock.yaml
1324
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue