executor 1.2.4-beta.1 → 1.2.4-beta.2
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/bin/executor.mjs +45 -24
- package/package.json +1 -1
- package/resources/web/assets/{highlighted-body-TPN3WLV5-mDJLgy5k.js → highlighted-body-TPN3WLV5-zMnrvDEs.js} +1 -1
- package/resources/web/assets/{index-B7tODbr-.js → index-DxR_-y39.js} +2 -2
- package/resources/web/assets/{mermaid-O7DHMXV3-DLDVSK79.js → mermaid-O7DHMXV3-CB_QyhtV.js} +3 -3
- package/resources/web/index.html +1 -1
package/bin/executor.mjs
CHANGED
|
@@ -324424,7 +324424,23 @@ var LocalSourceArtifactSchema = Struct({
|
|
|
324424
324424
|
revision: StoredSourceCatalogRevisionRecordSchema,
|
|
324425
324425
|
snapshot: CatalogSnapshotV1Schema
|
|
324426
324426
|
});
|
|
324427
|
-
var
|
|
324427
|
+
var ReadableLegacyLocalSourceArtifactSchema = Struct({
|
|
324428
|
+
version: Literal2(LEGACY_LOCAL_SOURCE_ARTIFACT_VERSION),
|
|
324429
|
+
sourceId: SourceIdSchema,
|
|
324430
|
+
catalogId: SourceCatalogIdSchema,
|
|
324431
|
+
generatedAt: TimestampMsSchema,
|
|
324432
|
+
revision: StoredSourceCatalogRevisionRecordSchema,
|
|
324433
|
+
snapshot: Unknown
|
|
324434
|
+
});
|
|
324435
|
+
var ReadableLocalSourceArtifactSchema = Struct({
|
|
324436
|
+
version: Literal2(LOCAL_SOURCE_ARTIFACT_VERSION),
|
|
324437
|
+
sourceId: SourceIdSchema,
|
|
324438
|
+
catalogId: SourceCatalogIdSchema,
|
|
324439
|
+
generatedAt: TimestampMsSchema,
|
|
324440
|
+
revision: StoredSourceCatalogRevisionRecordSchema,
|
|
324441
|
+
snapshot: Unknown
|
|
324442
|
+
});
|
|
324443
|
+
var decodeReadableLocalSourceArtifactOption = decodeUnknownOption(parseJson(Union2(ReadableLocalSourceArtifactSchema, ReadableLegacyLocalSourceArtifactSchema)));
|
|
324428
324444
|
var normalizeLocalSourceArtifact = (artifact) => artifact.version === LOCAL_SOURCE_ARTIFACT_VERSION ? artifact : {
|
|
324429
324445
|
...artifact,
|
|
324430
324446
|
version: LOCAL_SOURCE_ARTIFACT_VERSION
|
|
@@ -324480,6 +324496,13 @@ var hydrateArtifactSourceDocuments = (input) => {
|
|
|
324480
324496
|
};
|
|
324481
324497
|
var snapshotHash = (snapshot2) => contentHash(JSON.stringify(snapshot2));
|
|
324482
324498
|
var importMetadataHash = (snapshot2) => contentHash(JSON.stringify(snapshot2.import));
|
|
324499
|
+
var decodeCatalogSnapshotV1Option = (snapshot2) => {
|
|
324500
|
+
try {
|
|
324501
|
+
return decodeCatalogSnapshotV1(snapshot2);
|
|
324502
|
+
} catch {
|
|
324503
|
+
return null;
|
|
324504
|
+
}
|
|
324505
|
+
};
|
|
324483
324506
|
var buildLocalSourceArtifact = (input) => {
|
|
324484
324507
|
const catalogId = stableSourceCatalogId(input.source);
|
|
324485
324508
|
const generatedAt = Date.now();
|
|
@@ -324512,16 +324535,21 @@ var readLocalSourceArtifact = (input) => gen2(function* () {
|
|
|
324512
324535
|
}
|
|
324513
324536
|
const readPath = path4;
|
|
324514
324537
|
const content = yield* fs.readFileString(readPath, "utf8").pipe(mapError2(mapFileSystemError2(readPath, "read source artifact")));
|
|
324515
|
-
const
|
|
324516
|
-
|
|
324517
|
-
|
|
324518
|
-
|
|
324519
|
-
|
|
324520
|
-
|
|
324521
|
-
|
|
324522
|
-
|
|
324538
|
+
const decodedArtifact = decodeReadableLocalSourceArtifactOption(content);
|
|
324539
|
+
if (isNone2(decodedArtifact)) {
|
|
324540
|
+
return null;
|
|
324541
|
+
}
|
|
324542
|
+
const artifact = normalizeLocalSourceArtifact(decodedArtifact.value);
|
|
324543
|
+
const snapshot2 = decodeCatalogSnapshotV1Option(artifact.snapshot);
|
|
324544
|
+
if (snapshot2 === null) {
|
|
324545
|
+
return null;
|
|
324546
|
+
}
|
|
324547
|
+
const decodedSnapshotArtifact = {
|
|
324548
|
+
...artifact,
|
|
324549
|
+
snapshot: snapshot2
|
|
324550
|
+
};
|
|
324523
324551
|
const rawDocuments = {};
|
|
324524
|
-
for (const documentId of Object.keys(
|
|
324552
|
+
for (const documentId of Object.keys(decodedSnapshotArtifact.snapshot.catalog.documents)) {
|
|
324525
324553
|
const sourceDocumentPath = localSourceDocumentPath({
|
|
324526
324554
|
context: input.context,
|
|
324527
324555
|
sourceId: input.sourceId,
|
|
@@ -324533,26 +324561,19 @@ var readLocalSourceArtifact = (input) => gen2(function* () {
|
|
|
324533
324561
|
}
|
|
324534
324562
|
const sourceContent = yield* fs.readFileString(sourceDocumentPath, "utf8").pipe(mapError2(mapFileSystemError2(sourceDocumentPath, "read source document")));
|
|
324535
324563
|
rawDocuments[documentId] = {
|
|
324536
|
-
sourceKind:
|
|
324564
|
+
sourceKind: decodedSnapshotArtifact.snapshot.import.sourceKind,
|
|
324537
324565
|
kind: "source_document",
|
|
324538
324566
|
value: sourceContent
|
|
324539
324567
|
};
|
|
324540
324568
|
}
|
|
324541
324569
|
const hydratedArtifact = Object.keys(rawDocuments).length > 0 ? hydrateArtifactSourceDocuments({
|
|
324542
|
-
artifact,
|
|
324570
|
+
artifact: decodedSnapshotArtifact,
|
|
324543
324571
|
rawDocuments
|
|
324544
|
-
}) :
|
|
324545
|
-
return
|
|
324546
|
-
|
|
324547
|
-
|
|
324548
|
-
|
|
324549
|
-
}),
|
|
324550
|
-
catch: (cause2) => new LocalSourceArtifactDecodeError({
|
|
324551
|
-
message: `Invalid IR snapshot in local source artifact at ${readPath}: ${unknownLocalErrorDetails(cause2)}`,
|
|
324552
|
-
path: readPath,
|
|
324553
|
-
details: unknownLocalErrorDetails(cause2)
|
|
324554
|
-
})
|
|
324555
|
-
});
|
|
324572
|
+
}) : decodedSnapshotArtifact;
|
|
324573
|
+
return {
|
|
324574
|
+
...hydratedArtifact,
|
|
324575
|
+
snapshot: hydratedArtifact.snapshot
|
|
324576
|
+
};
|
|
324556
324577
|
});
|
|
324557
324578
|
var writeLocalSourceArtifact = (input) => gen2(function* () {
|
|
324558
324579
|
const fs = yield* exports_FileSystem.FileSystem;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,R as c,M as p,B as x}from"./mermaid-O7DHMXV3-
|
|
1
|
+
import{r,R as c,M as p,B as x}from"./mermaid-O7DHMXV3-CB_QyhtV.js";import{j as d}from"./index-CRuElBS1.js";var R=({code:i,language:e,raw:t,className:g,startLine:u,...m})=>{let{shikiTheme:o}=r.useContext(c),a=p(),[n,s]=r.useState(t);return r.useEffect(()=>{if(!a){s(t);return}let l=a.highlight({code:i,language:e,themes:o},h=>{s(h)});l&&s(l)},[i,e,o,a,t]),d.jsx(x,{className:g,language:e,result:n,startLine:u,...m})};export{R as HighlightedCodeBlockBody};
|