-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add in rudimentary typings (#271)
This module is used externally to fetch the manifests, and TS types are always nice to have Result: (for this its fineee if its masquerading as ESM, as we use esm-compatible syntax) ![Google Chrome Beta - 2024-02-08 at 18 39 57@2x](https://github.com/apify/actor-templates/assets/17960496/cf8a534d-fcca-42e5-9cd6-9dc2dc855c13)
- Loading branch information
1 parent
998b257
commit 54951ec
Showing
4 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
templates | ||
src/*.d.[cm]ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
export interface Template { | ||
id: string; | ||
name: string; | ||
label: string; | ||
category: string; | ||
technologies: string[]; | ||
description: string; | ||
messages?: { | ||
postCreate?: string; | ||
}; | ||
archiveUrl: string; | ||
defaultRunOptions?: { | ||
|
||
build?: string; | ||
memoryMbytes?: number; | ||
timeoutSecs?: number; | ||
}; | ||
showcaseFiles?: string[]; | ||
useCases?: string[]; | ||
aliases?: string[]; | ||
} | ||
|
||
export interface Manifest { | ||
consoleReadmeSuffixUrl?: string; | ||
localReadmeSuffixUrl?: string; | ||
templates: Template[]; | ||
} | ||
|
||
export function fetchManifest(manifestUrl?: string): Promise<Manifest>; | ||
export const manifestUrl: string; | ||
export const wrapperManifestUrl: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
export interface Template { | ||
id: string; | ||
name: string; | ||
label: string; | ||
category: string; | ||
technologies: string[]; | ||
description: string; | ||
messages?: { | ||
postCreate?: string; | ||
}; | ||
archiveUrl: string; | ||
defaultRunOptions?: { | ||
|
||
build?: string; | ||
memoryMbytes?: number; | ||
timeoutSecs?: number; | ||
}; | ||
showcaseFiles?: string[]; | ||
useCases?: string[]; | ||
aliases?: string[]; | ||
} | ||
|
||
export interface Manifest { | ||
consoleReadmeSuffixUrl?: string; | ||
localReadmeSuffixUrl?: string; | ||
templates: Template[]; | ||
} | ||
|
||
export function fetchManifest(manifestUrl?: string): Promise<Manifest>; | ||
export const manifestUrl: string; | ||
export const wrapperManifestUrl: string; |