diff --git a/examples/self-hosted/src/PKPass.from.ts b/examples/self-hosted/src/PKPass.from.ts index ebacd57..f1705f8 100644 --- a/examples/self-hosted/src/PKPass.from.ts +++ b/examples/self-hosted/src/PKPass.from.ts @@ -7,8 +7,8 @@ import { app } from "./webserver"; import { getCertificates } from "./shared"; -import path from "path"; -import { promises as fs } from "fs"; +import path from "node:path"; +import { promises as fs } from "node:fs"; import { PKPass } from "passkit-generator"; import * as Utils from "passkit-generator/lib/utils"; diff --git a/examples/self-hosted/src/PKPasses.ts b/examples/self-hosted/src/PKPasses.ts index 548fee4..0be86e4 100644 --- a/examples/self-hosted/src/PKPasses.ts +++ b/examples/self-hosted/src/PKPasses.ts @@ -31,8 +31,8 @@ import { app } from "./webserver"; import { getCertificates } from "./shared"; -import { promises as fs } from "fs"; -import path from "path"; +import { promises as fs } from "node:fs"; +import path from "node:path"; import { PKPass } from "passkit-generator"; // *************************** // diff --git a/examples/self-hosted/src/fields.ts b/examples/self-hosted/src/fields.ts index 0149b56..0e1bf9c 100644 --- a/examples/self-hosted/src/fields.ts +++ b/examples/self-hosted/src/fields.ts @@ -11,7 +11,7 @@ import { app } from "./webserver"; import { getCertificates } from "./shared"; -import path from "path"; +import path from "node:path"; import { PKPass } from "passkit-generator"; app.route("/fields/:modelName").get(async (request, response) => { diff --git a/examples/self-hosted/src/localize.ts b/examples/self-hosted/src/localize.ts index cc3832b..f22f49a 100644 --- a/examples/self-hosted/src/localize.ts +++ b/examples/self-hosted/src/localize.ts @@ -6,7 +6,7 @@ import { app } from "./webserver"; import { getCertificates } from "./shared"; -import path from "path"; +import path from "node:path"; import { PKPass } from "passkit-generator"; app.route("/localize/:modelName").get(async (request, response) => { diff --git a/examples/self-hosted/src/scratch.ts b/examples/self-hosted/src/scratch.ts index c4d0745..76e31a1 100644 --- a/examples/self-hosted/src/scratch.ts +++ b/examples/self-hosted/src/scratch.ts @@ -5,8 +5,8 @@ import { app } from "./webserver"; import { getCertificates } from "./shared"; -import path from "path"; -import { promises as fs } from "fs"; +import path from "node:path"; +import { promises as fs } from "node:fs"; import { PKPass } from "passkit-generator"; function getRandomColorPart() { diff --git a/examples/self-hosted/src/setBarcodes.ts b/examples/self-hosted/src/setBarcodes.ts index 6b79e90..bf4b7ef 100644 --- a/examples/self-hosted/src/setBarcodes.ts +++ b/examples/self-hosted/src/setBarcodes.ts @@ -11,7 +11,7 @@ import { app } from "./webserver"; import { getCertificates } from "./shared"; import { PKPass } from "passkit-generator"; -import path from "path"; +import path from "node:path"; app.route("/barcodes/:modelName").get(async (request, response) => { const passName = diff --git a/examples/self-hosted/src/setExpirationDate.ts b/examples/self-hosted/src/setExpirationDate.ts index e2ece50..085492d 100644 --- a/examples/self-hosted/src/setExpirationDate.ts +++ b/examples/self-hosted/src/setExpirationDate.ts @@ -9,7 +9,7 @@ import { app } from "./webserver"; import { getCertificates } from "./shared"; -import path from "path"; +import path from "node:path"; import { PKPass } from "passkit-generator"; app.route("/expirationDate/:modelName").get(async (request, response) => { diff --git a/examples/self-hosted/src/shared.ts b/examples/self-hosted/src/shared.ts index f6a92c3..ab3df90 100644 --- a/examples/self-hosted/src/shared.ts +++ b/examples/self-hosted/src/shared.ts @@ -1,5 +1,5 @@ -import { promises as fs } from "fs"; -import path from "path"; +import fs from "node:fs/promises"; +import path from "node:path"; interface Cache { certificates: diff --git a/examples/serverless/src/shared.ts b/examples/serverless/src/shared.ts index 411906b..0c54e1e 100644 --- a/examples/serverless/src/shared.ts +++ b/examples/serverless/src/shared.ts @@ -1,8 +1,8 @@ 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 fs from "node:fs/promises"; +import path from "node:path"; +import { Buffer } from "node:buffer"; import config from "../config.json"; import { PKPass } from "passkit-generator"; diff --git a/src/Bundle.ts b/src/Bundle.ts index b718daf..87004b5 100644 --- a/src/Bundle.ts +++ b/src/Bundle.ts @@ -1,4 +1,4 @@ -import { Readable, Stream } from "stream"; +import { Readable, Stream } from "node:stream"; import * as Messages from "./messages"; import * as zip from "do-not-zip"; diff --git a/src/PKPass.ts b/src/PKPass.ts index b3f0edf..b92046c 100644 --- a/src/PKPass.ts +++ b/src/PKPass.ts @@ -1,6 +1,6 @@ -import { Stream } from "stream"; -import { Buffer } from "buffer"; -import path from "path"; +import { Stream } from "node:stream"; +import { Buffer } from "node:buffer"; +import path from "node:path"; import FieldsArray from "./FieldsArray"; import Bundle, { filesSymbol } from "./Bundle"; import getModelFolderContents from "./getModelFolderContents"; diff --git a/src/Signature.ts b/src/Signature.ts index ecb3248..7d17cf6 100644 --- a/src/Signature.ts +++ b/src/Signature.ts @@ -1,6 +1,6 @@ import forge from "node-forge"; import type * as Schemas from "./schemas"; -import { Buffer } from "buffer"; +import { Buffer } from "node:buffer"; /** * Creates an hash for a buffer. Used by manifest diff --git a/src/StringsUtils.ts b/src/StringsUtils.ts index 0038912..b055906 100644 --- a/src/StringsUtils.ts +++ b/src/StringsUtils.ts @@ -1,5 +1,5 @@ -import { EOL } from "os"; -import { Buffer } from "buffer"; +import { EOL } from "node:os"; +import { Buffer } from "node:buffer"; // ************************************ // // *** UTILS FOR PASS.STRINGS FILES *** // diff --git a/src/getModelFolderContents.ts b/src/getModelFolderContents.ts index 21292b0..1867a51 100644 --- a/src/getModelFolderContents.ts +++ b/src/getModelFolderContents.ts @@ -1,8 +1,8 @@ -import * as path from "path"; +import * as path from "node:path"; import * as Utils from "./utils"; import * as Messages from "./messages"; -import { promises as fs } from "fs"; -import type { Buffer } from "buffer"; +import { promises as fs } from "node:fs"; +import type { Buffer } from "node:buffer"; /** * Reads the model folder contents diff --git a/src/schemas/Certificates.ts b/src/schemas/Certificates.ts index 92b5ade..fa81ab1 100644 --- a/src/schemas/Certificates.ts +++ b/src/schemas/Certificates.ts @@ -1,4 +1,4 @@ -import { Buffer } from "buffer"; +import { Buffer } from "node:buffer"; import Joi from "joi"; export interface CertificatesSchema { diff --git a/src/schemas/index.ts b/src/schemas/index.ts index e063b04..f985300 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -9,7 +9,7 @@ export * from "./Personalize"; export * from "./Certificates"; import Joi from "joi"; -import { Buffer } from "buffer"; +import type { Buffer } from "node:buffer"; import { Barcode } from "./Barcode"; import { Location } from "./Location";