Skip to content

Commit 8a5cdd0

Browse files
Minor updates for more robust generation (#20)
This pull request updates documentation and instructions related to the Snap-In and Airdrop SDK usage, with a focus on clarifying requirements for the SDK version, the `initialDomainMapping` parameter, and the handling of extraction state. The most important changes are summarized below: **SDK Version and Usage Requirements:** * Updated the required Airdrop SDK Library version from "1.5.1" to "1.8.0" in the Snap-In template documentation, ensuring that all features and fixes up to the latest version are utilized. **initialDomainMapping Parameter Clarifications:** * Changed the `initialDomainMapping` parameter from optional to required in the documentation for the `spawn` method, making it clear that this object must always be provided. * Clarified in the spawn method instructions that the initial domain mapping JSON object must be used for the `initialDomainMapping` parameter, and that it should be read directly from the JSON file. **Extraction Task Handling:** * Removed the call to `adapter.postState()` in the `onTimeout` handler within the attachments extraction process documentation, likely to streamline or correct the timeout flow. Issue: https://app.devrev.ai/devrev/works/ISS-206307
1 parent af21260 commit 8a5cdd0

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

devrev-snapin-template.plain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
- The Snap-In will run on Node.js as the runtime environment.
2929

30-
- The Snap-In should use The Airdrop SDK Library version "1.5.1" for handling data extraction and loading, pushing data, event-driven actions, state management, and artifact handling.
30+
- The Snap-In should use The Airdrop SDK Library version "1.8.0" for handling data extraction and loading, pushing data, event-driven actions, state management, and artifact handling.
3131

3232
- Use snake_case for JSON keys.
3333

docs/airdrop_sdk_library_documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ spawn({ event, initialState, workerPath, options, initialDomainMapping });
444444

445445
- _initialDomainMapping_
446446

447-
Optional. An **object** containing the initial domain mapping.
447+
Required. An **object** containing the initial domain mapping.
448448

449449
- _options_
450450

docs/attachments-extraction.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ processTask({
8383
}
8484
},
8585
onTimeout: async ({ adapter }) => {
86-
await adapter.postState();
8786
await adapter.emit(ExtractorEventType.ExtractionAttachmentsProgress, {
8887
progress: 50,
8988
});

templates/spawn_method_instructions.plain

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- The Extraction Function should start The Worker Thread with timeout of 10 minutes.
33
- "isLocalDevelopment" *must not* be set.
44
- "initialState" should be The Extraction State Object with all "completed" fields set to false, and all the rest of the fields in The Extraction State Object set to undefined, false, 0, or empty string, depending on the type of the field.
5-
- Use The Initial Domain Mapping JSON object for initialDomainMapping parameter when spawning a new worker.
6-
- Note: The Initial Domain Mapping JSON object should be read directly from the JSON file.
75
- Note: No additional fields should be added to The Extraction State Object.
86
- Note: The Worker Thread must be implemented in TypeScript and it should be referenced with a .ts extension, not .js.
7+
- Use The Initial Domain Mapping JSON object for initialDomainMapping parameter when spawning a new worker.
8+
- Note: The Initial Domain Mapping JSON object should be read directly from the JSON file.

0 commit comments

Comments
 (0)