@poe-platform/safe-bash 0.1.814 → 0.1.815

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.
Files changed (59) hide show
  1. package/dist/mp4-ast/index.d.ts +1 -0
  2. package/dist/mp4-ast/mp4-fragment-source.d.ts +35 -0
  3. package/dist/mp4-ast/mp4-sample-source.d.ts +5 -2
  4. package/dist/mp4-ast/types.d.ts +11 -0
  5. package/dist/pdf-ast/cos/object-reader.d.ts +3 -2
  6. package/dist/pdf-ast/edit/forms.d.ts +1 -0
  7. package/dist/pdf-ast/edit/retained-form-data.d.ts +9 -0
  8. package/dist/pdf-ast/index.d.ts +1 -0
  9. package/dist/pdf-ast/index.js +476 -55
  10. package/dist/safe-bash/command-chunks/{biff-KRHJ63K3-VQPJCVIL.js → biff-A7XPBWAK-DCLG5QKF.js} +1775 -1667
  11. package/dist/safe-bash/command-chunks/{chunk-AVGXFWEB.js → chunk-44F5TOHZ.js} +179 -58
  12. package/dist/safe-bash/command-chunks/{chunk-PIVH35EQ.js → chunk-6CDDKNNA.js} +1 -0
  13. package/dist/safe-bash/command-chunks/{chunk-K4XNUJVJ.js → chunk-6EINUY5G.js} +149 -165
  14. package/dist/safe-bash/command-chunks/{chunk-5BIQWWLB.js → chunk-CFMJXJS5.js} +1 -1
  15. package/dist/safe-bash/command-chunks/{chunk-3JM7E42I.js → chunk-GPGLTWNR.js} +106 -32
  16. package/dist/safe-bash/command-chunks/{chunk-2ETEJOYX.js → chunk-HQ2UN2L2.js} +8 -8
  17. package/dist/safe-bash/command-chunks/{chunk-CK2WFJZN.js → chunk-KASXIRKD.js} +12 -14
  18. package/dist/safe-bash/command-chunks/chunk-KHUT7BB5.js +65 -0
  19. package/dist/safe-bash/command-chunks/{chunk-LAPOMHGY.js → chunk-NEYITAAO.js} +114 -97
  20. package/dist/safe-bash/command-chunks/{chunk-FF7UGJWS.js → chunk-QDVDBN2N.js} +1 -1
  21. package/dist/safe-bash/command-chunks/{chunk-SW37YCBW.js → chunk-U3C6IT2C.js} +44 -30
  22. package/dist/safe-bash/command-chunks/{chunk-G3TAX3CV.js → chunk-WAT2562G.js} +610 -539
  23. package/dist/safe-bash/command-chunks/{chunk-VT7UBPAE.js → chunk-YW2VYN4V.js} +23 -11
  24. package/dist/safe-bash/command-chunks/{chunk-GQGMQMIM.js → chunk-ZIGENXGC.js} +243 -1
  25. package/dist/safe-bash/command-chunks/{command-engine-7V6PZR7G.js → command-engine-M7S4QIXV.js} +12 -4
  26. package/dist/safe-bash/command-chunks/{engine-UYJENSWK-VSCGKSQV.js → engine-YUYZJIB4-NZUDFEHL.js} +1 -1
  27. package/dist/safe-bash-command-ffmpeg/index.js +1 -1
  28. package/dist/safe-bash-command-ffprobe/index.js +2 -2
  29. package/dist/safe-bash-command-ffprobe/media.d.ts +8 -2
  30. package/dist/safe-bash-command-ffprobe/media.js +4 -2
  31. package/dist/safe-bash-command-pandoc/command.js +3 -3
  32. package/dist/safe-bash-command-pandoc/index.js +8 -8
  33. package/dist/safe-bash-command-patch/index.js +7 -6
  34. package/dist/safe-bash-command-patch/patch-formats.d.ts +6 -5
  35. package/dist/safe-bash-command-patch/patch-formats.js +3 -2
  36. package/dist/safe-bash-command-patch/patch-gnu-paths.d.ts +7 -7
  37. package/dist/safe-bash-command-patch/patch-gnu-reject.d.ts +1 -1
  38. package/dist/safe-bash-command-patch/patch-gnu-reject.js +3 -2
  39. package/dist/safe-bash-command-patch/patch-publication.js +3 -2
  40. package/dist/safe-bash-command-patch/patch-text.d.ts +13 -0
  41. package/dist/safe-bash-command-patch/patch.js +7 -6
  42. package/dist/safe-bash-command-patch/stored-patch.d.ts +29 -4
  43. package/dist/safe-bash-command-patch/stored-target.d.ts +2 -1
  44. package/dist/safe-bash-command-patch/unified.d.ts +18 -4
  45. package/dist/safe-bash-command-patch/unified.js +2 -1
  46. package/dist/safe-bash-command-pdftk/index.js +30 -20
  47. package/dist/safe-bash-command-pptx/engine.js +1 -1
  48. package/dist/safe-bash-command-ssconvert/index.js +2 -2
  49. package/dist/safe-bash-presentation-engine/index.js +1 -1
  50. package/dist/safe-bash-presentation-engine/notes.d.ts +1 -0
  51. package/dist/safe-bash-presentation-engine/notes.js +7 -1
  52. package/dist/safe-bash-presentation-engine/retained-notes.d.ts +27 -0
  53. package/dist/safe-bash-xml-engine/document.js +2 -2
  54. package/dist/safe-bash-xml-engine/index.js +2 -2
  55. package/dist/safe-bash-xml-engine/stored-document.js +1 -1
  56. package/dist/spreadsheet-format-xls/biff-properties-merge.js +40 -21
  57. package/dist/spreadsheet-format-xls/biff-property-values.d.ts +31 -0
  58. package/dist/spreadsheet-format-xls/biff-property-values.js +158 -0
  59. package/package.json +3 -2
@@ -10,3 +10,4 @@ export * from "./containers/adapters.js";
10
10
  export * from "./containers/streaming.js";
11
11
  export { decodeH264Samples } from "./h264.js";
12
12
  export { scanMp4SampleTable, type Mp4SampleTables, type Mp4TableRange, type Mp4SampleSpan, type Mp4SampleScanOptions } from "./mp4-sample-source.js";
13
+ export { scanMp4Fragment, type Mp4FragmentDefaults, type Mp4FragmentState, type Mp4FragmentScanOptions } from "./mp4-fragment-source.js";
@@ -0,0 +1,35 @@
1
+ import { type Mp4BoxScanOptions } from './mp4-source.js';
2
+ import { type Mp4SampleSteps, type Mp4SampleSpan, type Mp4SampleScanOptions, type Mp4TableRange } from './mp4-sample-source.js';
3
+ import type { MediaProbeSource } from './types.js';
4
+ export interface Mp4FragmentDefaults {
5
+ readonly defaultSampleDescriptionIndex: number;
6
+ readonly defaultSampleDuration: number;
7
+ readonly defaultSampleSize: number;
8
+ readonly defaultSampleFlags: number;
9
+ }
10
+ export interface Mp4FragmentState {
11
+ readonly dts: number;
12
+ readonly sampleCount: number;
13
+ }
14
+ export interface Mp4FragmentScanOptions extends Omit<Mp4SampleScanOptions, 'syncSamples'> {
15
+ readonly trackId: number;
16
+ readonly moofOffset: number;
17
+ readonly defaults: Mp4FragmentDefaults;
18
+ /** Carry the end of the last retained sample and count across classic tables and fragments. */
19
+ readonly state?: Mp4FragmentState;
20
+ }
21
+ interface FragmentHeader extends Mp4FragmentDefaults {
22
+ readonly baseDataOffset: number;
23
+ }
24
+ /** Shared header interpretation, including the resident reader's truncated-field zeros. */
25
+ export declare function mp4FragmentHeader(bytes: Uint8Array, options: Mp4FragmentScanOptions): FragmentHeader | undefined;
26
+ export declare function mp4FragmentTime(bytes: Uint8Array, fallback: number): number;
27
+ /** Traverse a single run without retaining its rows or payload. */
28
+ export declare function mp4FragmentRunSteps(size: number, table: Mp4TableRange, header: FragmentHeader, state: Mp4FragmentState, options: Mp4SampleScanOptions): Mp4SampleSteps<Mp4FragmentState>;
29
+ /**
30
+ * Replay one traf's children. Two sibling scans keep headers independent of box order
31
+ * without collecting runs. Returns carried state even when tfdt has no samples.
32
+ * Source ownership, trex lookup, track iteration and staged publication belong to the caller.
33
+ */
34
+ export declare function scanMp4Fragment(source: MediaProbeSource, range: Pick<Mp4BoxScanOptions, 'offset' | 'length' | 'depth'>, options: Mp4FragmentScanOptions): AsyncGenerator<Mp4SampleSpan, Mp4FragmentState>;
35
+ export {};
@@ -40,13 +40,16 @@ type Step = {
40
40
  kind: 'sample';
41
41
  sample: Mp4SampleSpan;
42
42
  };
43
- type Steps<T> = Generator<Step, T, Uint8Array | boolean | undefined>;
43
+ export type Mp4SampleSteps<T> = Generator<Step, T, Uint8Array | boolean | undefined>;
44
44
  /** One traversal shared by the resident parser and asynchronous caller ranges. */
45
- export declare function mp4SampleTableSteps(size: number, tables: Mp4SampleTables, options?: Pick<Mp4SampleScanOptions, 'type' | 'budget'>): Steps<void>;
45
+ export declare function mp4SampleTableSteps(size: number, tables: Mp4SampleTables, options?: Pick<Mp4SampleScanOptions, 'type' | 'budget'>): Mp4SampleSteps<void>;
46
46
  /**
47
47
  * Replay a classic (non-fragmented) stbl without materializing tables or payloads.
48
48
  * At most seven 16 KiB table pages are cached; sync membership belongs to the caller.
49
49
  * Input/index lifetime, publication after validation, and fragmented runs remain caller-owned.
50
50
  */
51
51
  export declare function scanMp4SampleTable(source: MediaProbeSource, tables: Mp4SampleTables, options?: Mp4SampleScanOptions): AsyncGenerator<Mp4SampleSpan, void>;
52
+ export declare function readMp4SampleRange(source: MediaProbeSource, offset: number, length: number, options: Mp4SampleScanOptions): Promise<Uint8Array>;
53
+ /** Drive the shared sample traversal with bounded owned table pages. */
54
+ export declare function consumeMp4SampleSteps<T>(source: MediaProbeSource, steps: Mp4SampleSteps<T>, options: Mp4SampleScanOptions): AsyncGenerator<Mp4SampleSpan, T>;
52
55
  export {};
@@ -375,6 +375,15 @@ export type MediaProbeRecords = Omit<MediaProbeResult, "packets" | "frames"> & {
375
375
  readonly packets?: Iterable<MediaProbePacket> | undefined;
376
376
  readonly frames?: Iterable<MediaProbeFrame> | undefined;
377
377
  };
378
+ /** Caller-backed, one-shot record sources. Consume before retiring the input source. */
379
+ export type MediaProbeSourceRecords = Omit<MediaProbeResult, "streams" | "chapters" | "packets" | "frames"> & {
380
+ /** Retire plugin-owned backing after all requested records, including unselected sections. */
381
+ readonly close?: () => Promise<void>;
382
+ readonly streams: Iterable<MediaProbeStream> | AsyncIterable<MediaProbeStream>;
383
+ readonly chapters: Iterable<MediaProbeResult["chapters"][number]> | AsyncIterable<MediaProbeResult["chapters"][number]>;
384
+ readonly packets?: Iterable<MediaProbePacket> | AsyncIterable<MediaProbePacket> | undefined;
385
+ readonly frames?: Iterable<MediaProbeFrame> | AsyncIterable<MediaProbeFrame> | undefined;
386
+ };
378
387
  export interface MediaSourceProbeOptions extends ParseMediaOptions {
379
388
  readonly signal?: AbortSignal;
380
389
  readonly showPackets?: boolean;
@@ -463,6 +472,8 @@ export interface MediaAstPlugin {
463
472
  showPackets?: boolean;
464
473
  showFrames?: boolean;
465
474
  }): MediaProbeResult;
475
+ /** Lazy caller-backed records; source remains alive through complete enumeration. */
476
+ probeRecords?(source: MediaProbeSource, options?: MediaSourceProbeOptions): Promise<MediaProbeSourceRecords>;
466
477
  /** Optional bounded range path; packet/frame descriptors may be lazy iterables. */
467
478
  probeMetadata?(source: MediaProbeSource, options?: MediaSourceProbeOptions): Promise<MediaProbeRecords>;
468
479
  /** Optional bounded sequential metadata path; consumes input through EOF. */
@@ -17,7 +17,7 @@ export interface PdfObjectReaderOptions extends Omit<ParseCosRangeOptions, "reso
17
17
  /** Aggregate decoded object-stream data and header tape bytes. */
18
18
  readonly maxStagingBytes?: number;
19
19
  readonly maxObjectStreamMembers?: number;
20
- /** Live ancestor-index staging for each indirect length traversal. */
20
+ /** Live ancestor-index staging for each indirect reference traversal. */
21
21
  readonly maxTraversalStagingBytes?: number;
22
22
  }
23
23
  /** Raw indexed COS access. The source and xref index remain caller-owned.
@@ -31,7 +31,7 @@ export declare class PdfObjectReader {
31
31
  private readonly storage;
32
32
  private readonly streams;
33
33
  private readonly backingFailures;
34
- private readonly lengthPaths;
34
+ private readonly referencePaths;
35
35
  private readonly repairedOffsets;
36
36
  private readonly options;
37
37
  private readonly capacity;
@@ -45,6 +45,7 @@ export declare class PdfObjectReader {
45
45
  /** Decode one retained stream under consumer backpressure. The caller owns
46
46
  * the source and must keep it open until iteration finishes. */
47
47
  decodeStream(objectNumber: number, generationNumber?: number, options?: Pick<PdfStreamDecodeOptions, "stopBeforeImageCodec" | "raw">): AsyncGenerator<Uint8Array, void, void>;
48
+ private resolveStreamDictionary;
48
49
  /** A stream-valued /Length is invalid as a length, but its references still
49
50
  * need cycle, admission and backing-error validation. Walk those discarded
50
51
  * values in source order instead of retaining one parser and AST per link. */
@@ -16,5 +16,6 @@ export declare function getDocumentFormFields(doc: ParsedCosDocument): PdfFormFi
16
16
  export declare function setDocumentFormField(doc: ParsedCosDocument, fieldName: string, value: string | boolean): void;
17
17
  export declare function generateDocumentFormAppearancesSteps(doc: ParsedCosDocument): Generator<void, void, void>;
18
18
  export declare function generateDocumentFormAppearances(doc: ParsedCosDocument): void;
19
+ export declare function decodeFormDataEntities(text: string): string;
19
20
  export declare function parseFormDataBytes(bytes: Uint8Array): Map<string, string | boolean>;
20
21
  export declare function flattenDocumentFormFields(doc: ParsedCosDocument): void;
@@ -0,0 +1,9 @@
1
+ import type { PdfIndexStorage } from "../cos/object-index.js";
2
+ import type { PdfFileSource } from "../source.js";
3
+ import type { RetainedFormUpdate } from "./retained-form-appearances.js";
4
+ /** Consume a retained form-data source and yield final fields in first-seen
5
+ * order. Input text, FDF tokens, names and overwrite state use caller storage.
6
+ * Individual field names/values and lexical tokens remain resident. */
7
+ export declare function parseRetainedFormData(source: PdfFileSource, storage: PdfIndexStorage, options?: {
8
+ readonly signal?: AbortSignal;
9
+ }): AsyncGenerator<RetainedFormUpdate>;
@@ -79,3 +79,4 @@ export { replaceRetainedPdfName } from "./edit/retained-name-replacement.js";
79
79
  export { QpdfJsonValues } from "./cos/qpdf-json-values.js";
80
80
  export { QpdfJsonDocument, type ApplyQpdfJsonOptions } from "./cos/qpdf-json-document.js";
81
81
  export type { RetainedAppendAttachment } from "./edit/retained-append-attachments.js";
82
+ export { parseRetainedFormData } from "./edit/retained-form-data.js";