@platformatic/astro 3.46.0 → 3.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/config.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
 
8
8
  export interface PlatformaticAstroConfig {
9
9
  $schema?: string;
10
+ module?: string;
10
11
  logger?: {
11
12
  level?: (
12
13
  | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
package/index.d.ts ADDED
@@ -0,0 +1,34 @@
1
+ import { BaseCapability, BaseContext, BaseOptions } from '@platformatic/basic'
2
+ import { Configuration, ConfigurationOptions } from '@platformatic/foundation'
3
+ import { JSONSchemaType } from 'ajv'
4
+ import type { PlatformaticAstroConfig } from './config.d.ts'
5
+
6
+ export type { PlatformaticAstroConfig } from './config.d.ts'
7
+
8
+ export interface AstroContext extends BaseContext {}
9
+
10
+ export type AstroConfiguration = Configuration<PlatformaticAstroConfig>
11
+
12
+ export declare function transform (config: AstroConfiguration): Promise<AstroConfiguration>
13
+
14
+ export declare function loadConfiguration (
15
+ root: string | PlatformaticAstroConfig,
16
+ source?: string | PlatformaticAstroConfig,
17
+ context?: ConfigurationOptions
18
+ ): Promise<AstroConfiguration>
19
+
20
+ export declare function create (
21
+ configOrRoot: string | PlatformaticAstroConfig,
22
+ sourceOrConfig?: string | PlatformaticAstroConfig,
23
+ context?: ConfigurationOptions
24
+ ): Promise<AstroCapability>
25
+
26
+ export declare class AstroCapability extends BaseCapability<PlatformaticAstroConfig, BaseOptions<AstroContext>> {
27
+ constructor (root: string, config: PlatformaticAstroConfig, context?: object)
28
+ }
29
+
30
+ export declare const packageJson: Record<string, unknown>
31
+ export declare const schema: JSONSchemaType<PlatformaticAstroConfig>
32
+ export declare const schemaComponents: { astro: JSONSchemaType<object> }
33
+ export declare const version: string
34
+ export declare const supportedVersions: string
package/lib/capability.js CHANGED
@@ -18,7 +18,7 @@ import { dirname, resolve } from 'node:path'
18
18
  import { satisfies } from 'semver'
19
19
  import { version } from './schema.js'
20
20
 
21
- const supportedVersions = '^4.0.0 || ^5.0.0'
21
+ export const supportedVersions = '^4.0.0 || ^5.0.0'
22
22
 
23
23
  export class AstroCapability extends BaseCapability {
24
24
  #astro
package/lib/schema.js CHANGED
@@ -28,6 +28,9 @@ export const schema = {
28
28
  $schema: {
29
29
  type: 'string'
30
30
  },
31
+ module: {
32
+ type: 'string'
33
+ },
31
34
  logger: utilsSchemaComponents.logger,
32
35
  server: utilsSchemaComponents.server,
33
36
  watch: basicSchemaComponents.watch,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/astro",
3
- "version": "3.46.0",
3
+ "version": "3.48.0",
4
4
  "description": "Platformatic Astro Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -19,8 +19,8 @@
19
19
  "@fastify/static": "^8.0.0",
20
20
  "fastify": "^5.7.0",
21
21
  "semver": "^7.6.3",
22
- "@platformatic/basic": "3.46.0",
23
- "@platformatic/foundation": "3.46.0"
22
+ "@platformatic/basic": "3.48.0",
23
+ "@platformatic/foundation": "3.48.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@astrojs/node": "^9.2.0",
@@ -32,16 +32,18 @@
32
32
  "json-schema-to-typescript": "^15.0.1",
33
33
  "neostandard": "^0.12.0",
34
34
  "typescript": "^5.5.4",
35
+ "tstyche": "^6.2.0",
35
36
  "vite": "^7.0.0",
36
37
  "ws": "^8.18.0",
37
- "@platformatic/gateway": "3.46.0",
38
- "@platformatic/service": "3.46.0"
38
+ "@platformatic/gateway": "3.48.0",
39
+ "@platformatic/service": "3.48.0"
39
40
  },
40
41
  "engines": {
41
42
  "node": ">=22.19.0"
42
43
  },
43
44
  "scripts": {
44
- "test": "node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/*.test.js test/**/*.test.js",
45
+ "test": "npm run test:types && node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/*.test.js test/**/*.test.js",
46
+ "test:types": "tstyche",
45
47
  "gen-schema": "node lib/schema.js > schema.json",
46
48
  "gen-types": "json2ts > config.d.ts < schema.json",
47
49
  "build": "npm run gen-schema && npm run gen-types",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/astro/3.46.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/astro/3.48.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Astro Config",
5
5
  "type": "object",
@@ -7,6 +7,9 @@
7
7
  "$schema": {
8
8
  "type": "string"
9
9
  },
10
+ "module": {
11
+ "type": "string"
12
+ },
10
13
  "logger": {
11
14
  "type": "object",
12
15
  "properties": {