From a15dc29290b0a0ac13d7d8c36f0a8da327583025 Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Mon, 7 Feb 2022 01:18:06 +0100 Subject: [PATCH] Added explicit Buffer import declarations --- examples/serverless/src/shared.ts | 1 + spec/Bundle.ts | 1 + spec/PKPass.ts | 1 + src/PKPass.ts | 1 + src/Signature.ts | 1 + src/StringsUtils.ts | 1 + src/getModelFolderContents.ts | 1 + src/schemas/Certificates.ts | 2 +- src/schemas/index.ts | 1 + 9 files changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/serverless/src/shared.ts b/examples/serverless/src/shared.ts index 36dc87e..44ee71b 100644 --- a/examples/serverless/src/shared.ts +++ b/examples/serverless/src/shared.ts @@ -2,6 +2,7 @@ import { ALBEvent, ALBResult } from "aws-lambda"; import AWS from "aws-sdk"; import { promises as fs } from "fs"; import path from "path"; +import { Buffer } from "buffer"; import config from "../config.json"; import { PKPass } from "passkit-generator"; diff --git a/spec/Bundle.ts b/spec/Bundle.ts index 368c28d..f418ca4 100644 --- a/spec/Bundle.ts +++ b/spec/Bundle.ts @@ -1,4 +1,5 @@ import { Stream } from "stream"; +import { Buffer } from "buffer"; import * as Messages from "../lib/messages"; import { default as Bundle, filesSymbol } from "../lib/Bundle"; diff --git a/spec/PKPass.ts b/spec/PKPass.ts index 2b1353e..8f073c2 100644 --- a/spec/PKPass.ts +++ b/spec/PKPass.ts @@ -1,5 +1,6 @@ import { promises as fs } from "fs"; import * as path from "path"; +import { Buffer } from "buffer"; import { filesSymbol, freezeSymbol } from "../lib/Bundle"; import FieldsArray from "../lib/FieldsArray"; import { PassProps } from "../lib/schemas"; diff --git a/src/PKPass.ts b/src/PKPass.ts index f7d5945..d80c3b7 100644 --- a/src/PKPass.ts +++ b/src/PKPass.ts @@ -1,4 +1,5 @@ import { Stream } from "stream"; +import { Buffer } from "buffer"; import path from "path"; import FieldsArray from "./FieldsArray"; import Bundle, { filesSymbol } from "./Bundle"; diff --git a/src/Signature.ts b/src/Signature.ts index 4c1bdba..ecb3248 100644 --- a/src/Signature.ts +++ b/src/Signature.ts @@ -1,5 +1,6 @@ import forge from "node-forge"; import type * as Schemas from "./schemas"; +import { Buffer } from "buffer"; /** * Creates an hash for a buffer. Used by manifest diff --git a/src/StringsUtils.ts b/src/StringsUtils.ts index e44d032..0038912 100644 --- a/src/StringsUtils.ts +++ b/src/StringsUtils.ts @@ -1,4 +1,5 @@ import { EOL } from "os"; +import { Buffer } from "buffer"; // ************************************ // // *** UTILS FOR PASS.STRINGS FILES *** // diff --git a/src/getModelFolderContents.ts b/src/getModelFolderContents.ts index ebac561..49f7e02 100644 --- a/src/getModelFolderContents.ts +++ b/src/getModelFolderContents.ts @@ -2,6 +2,7 @@ import * as path from "path"; import * as Utils from "./utils"; import * as Messages from "./messages"; import { promises as fs } from "fs"; +import type { Buffer } from "buffer"; /** * Reads the model folder contents diff --git a/src/schemas/Certificates.ts b/src/schemas/Certificates.ts index ad33494..fe661d0 100644 --- a/src/schemas/Certificates.ts +++ b/src/schemas/Certificates.ts @@ -1,4 +1,4 @@ -import type forge from "node-forge"; +import { Buffer } from "buffer"; import Joi from "joi"; export interface CertificatesSchema { diff --git a/src/schemas/index.ts b/src/schemas/index.ts index 7758e0c..5b83ee9 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -9,6 +9,7 @@ export * from "./Personalize"; export * from "./Certificates"; import Joi from "joi"; +import { Buffer } from "buffer"; import { Barcode } from "./Barcode"; import { Location } from "./Location";