update all deps (#80)
This commit is contained in:
parent
f43db76966
commit
c968b374a2
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"@matthiesenxyz/astro-gists": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
update dependencies
|
|
@ -41,22 +41,21 @@
|
||||||
"scripts": {},
|
"scripts": {},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"astro": ">=4.4.1"
|
"astro": ">=4.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@octokit/types": "^12.6.0"
|
"@octokit/types": "^13.4.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expressive-code/core": "^0.33.5",
|
"@expressive-code/core": "^0.35.2",
|
||||||
"@expressive-code/plugin-frames": "0.33.5",
|
"@expressive-code/plugin-frames": "^0.35.2",
|
||||||
"@expressive-code/plugin-shiki": "0.33.5",
|
"@expressive-code/plugin-shiki": "^0.35.2",
|
||||||
"@expressive-code/plugin-text-markers": "0.33.5",
|
"@expressive-code/plugin-text-markers": "^0.35.2",
|
||||||
"@expressive-code/plugin-line-numbers": "^0.33.5",
|
"@expressive-code/plugin-line-numbers": "^0.35.2",
|
||||||
"astro-integration-kit": "^0.8.0",
|
"astro-integration-kit": "^0.12.0",
|
||||||
"chalk": "^5.3.0",
|
"chalk": "^5.3.0",
|
||||||
"hast-util-to-html": "8.0.4",
|
"p-retry": "^6.2.0",
|
||||||
"p-retry": "6.2.0",
|
"octokit": "^3.2.0",
|
||||||
"octokit": "^3.1.2",
|
"vite": "^5.2.10"
|
||||||
"vite": "^5.2.7"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
import { toHtml } from 'hast-util-to-html'
|
import { toHtml } from '@expressive-code/core/hast'
|
||||||
import { getPageData } from './page-data';
|
import { getPageData } from './page-data';
|
||||||
import { engine } from '../index'
|
import { engine } from '../index'
|
||||||
|
|
||||||
|
|
|
@ -25,63 +25,62 @@ export const TOKEN_MISSING_ERROR = "GITHUB_PERSONAL_TOKEN not found. Please add
|
||||||
export default defineIntegration({
|
export default defineIntegration({
|
||||||
name: "@matthiesenxyz/astro-gists",
|
name: "@matthiesenxyz/astro-gists",
|
||||||
optionsSchema: z.custom<astroGistsUserConfig>().optional().default({ verbose: false }),
|
optionsSchema: z.custom<astroGistsUserConfig>().optional().default({ verbose: false }),
|
||||||
setup({
|
setup({ name, options }) {
|
||||||
name,
|
|
||||||
options,
|
|
||||||
options: { verbose: isVerbose }
|
|
||||||
}) {
|
|
||||||
return {
|
return {
|
||||||
"astro:config:setup": ( params ) => {
|
hooks: {
|
||||||
|
"astro:config:setup": ( params ) => {
|
||||||
|
|
||||||
const { logger } = params;
|
const { verbose } = options;
|
||||||
|
const { logger } = params;
|
||||||
// Create a logger for the setup events
|
|
||||||
const configLogger = logger.fork("astro-gists : setup");
|
// Create a logger for the setup events
|
||||||
const configDone = logger.fork("astro-gists : setup-done")
|
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, verbose, "info", "Setting up Astro Gists Integration.", false);
|
||||||
gistLogger(configLogger, isVerbose, "warn", "Verbose logging is enabled.", true);
|
|
||||||
|
gistLogger(configLogger, verbose, "warn", "Verbose logging is enabled.", true);
|
||||||
// Check for GITHUB_PERSONAL_TOKEN
|
|
||||||
if (!isThereAToken()) {
|
// Check for GITHUB_PERSONAL_TOKEN
|
||||||
gistLogger(configLogger, isVerbose, "error",TOKEN_MISSING_ERROR, false)
|
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"
|
"astro": "astro"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"astro": "^4.5.12",
|
"astro": "^4.7.0",
|
||||||
"@matthiesenxyz/astro-gists": "workspace:*"
|
"@matthiesenxyz/astro-gists": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@astrojs/mdx": "^2.2.2",
|
"@astrojs/mdx": "^2.3.1",
|
||||||
"@astrojs/check": "^0.5.10",
|
"@astrojs/check": "^0.5.10",
|
||||||
"@types/node": "^20.12.2",
|
"@types/node": "^20.12.7",
|
||||||
"typescript": "^5.4.3"
|
"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