Updated imports to have extensions

This commit is contained in:
Alexander Cerutti
2025-01-11 14:41:15 +01:00
parent 2bbea853e7
commit d20129da99
12 changed files with 43 additions and 43 deletions

View File

@@ -1,7 +1,7 @@
import { Readable, Stream } from "node:stream"; import { Readable, Stream } from "node:stream";
import * as Messages from "./messages";
import { toArray as zipToArray } from "do-not-zip";
import { Buffer } from "node:buffer"; import { Buffer } from "node:buffer";
import { toArray as zipToArray } from "do-not-zip";
import * as Messages from "./messages.js";
export const filesSymbol = Symbol("bundleFiles"); export const filesSymbol = Symbol("bundleFiles");
export const freezeSymbol = Symbol("bundleFreeze"); export const freezeSymbol = Symbol("bundleFreeze");

View File

@@ -1,7 +1,7 @@
import type PKPass from "./PKPass"; import type PKPass from "./PKPass.js";
import * as Schemas from "./schemas"; import * as Schemas from "./schemas/index.js";
import * as Utils from "./utils"; import * as Utils from "./utils.js";
import * as Messages from "./messages"; import * as Messages from "./messages.js";
/** /**
* Class to represent lower-level keys pass fields * Class to represent lower-level keys pass fields

View File

@@ -1,14 +1,14 @@
import { Stream } from "node:stream"; import { Stream } from "node:stream";
import { Buffer } from "node:buffer"; import { Buffer } from "node:buffer";
import path from "node:path"; import path from "node:path";
import FieldsArray from "./FieldsArray"; import FieldsArray from "./FieldsArray.js";
import Bundle, { filesSymbol } from "./Bundle"; import Bundle, { filesSymbol } from "./Bundle.js";
import getModelFolderContents from "./getModelFolderContents"; import getModelFolderContents from "./getModelFolderContents.js";
import * as Schemas from "./schemas"; import * as Schemas from "./schemas/index.js";
import * as Signature from "./Signature"; import * as Signature from "./Signature.js";
import * as Strings from "./StringsUtils"; import * as Strings from "./StringsUtils.js";
import * as Utils from "./utils"; import * as Utils from "./utils.js";
import * as Messages from "./messages"; import * as Messages from "./messages.js";
const propsSymbol = Symbol("props"); const propsSymbol = Symbol("props");
const localizationSymbol = Symbol("pass.l10n"); const localizationSymbol = Symbol("pass.l10n");

View File

@@ -1,5 +1,5 @@
import forge from "node-forge"; import forge from "node-forge";
import type * as Schemas from "./schemas"; import type * as Schemas from "./schemas/index.js";
import { Buffer } from "node:buffer"; import { Buffer } from "node:buffer";
/** /**

View File

@@ -1,8 +1,8 @@
import * as path from "node:path"; import * as path from "node:path";
import * as Utils from "./utils";
import * as Messages from "./messages";
import { promises as fs } from "node:fs"; import { promises as fs } from "node:fs";
import type { Buffer } from "node:buffer"; import type { Buffer } from "node:buffer";
import * as Utils from "./utils.js";
import * as Messages from "./messages.js";
/** /**
* Reads the model folder contents * Reads the model folder contents

View File

@@ -1,4 +1,4 @@
export { default as PKPass } from "./PKPass"; export { default as PKPass } from "./PKPass.js";
// ***************************************** // // ***************************************** //
// *** Exporting only schemas interfaces *** // // *** Exporting only schemas interfaces *** //
@@ -15,4 +15,4 @@ export type {
TransitType, TransitType,
Personalize, Personalize,
OverridablePassProps, OverridablePassProps,
} from "./schemas"; } from "./schemas/index.js";

View File

@@ -1,5 +1,5 @@
import Joi from "joi"; import Joi from "joi";
import { Semantics } from "./Semantics"; import { Semantics } from "./Semantics.js";
export type PKDataDetectorType = export type PKDataDetectorType =
| "PKDataDetectorTypePhoneNumber" | "PKDataDetectorTypePhoneNumber"

View File

@@ -1,5 +1,5 @@
import Joi from "joi"; import Joi from "joi";
import { Field, FieldWithRow } from "./Field"; import { Field, FieldWithRow } from "./Field.js";
export type TransitType = export type TransitType =
| "PKTransitTypeAir" | "PKTransitTypeAir"

View File

@@ -1,5 +1,5 @@
import Joi from "joi"; import Joi from "joi";
import { RGB_HEX_COLOR_REGEX } from "./regexps"; import { RGB_HEX_COLOR_REGEX } from "./regexps.js";
/** /**
* These couple of structures are organized alphabetically, * These couple of structures are organized alphabetically,

View File

@@ -1,5 +1,5 @@
import Joi from "joi"; import Joi from "joi";
import * as SemanticTagType from "./SemanticTagType"; import * as SemanticTagType from "./SemanticTagType.js";
/** /**
* For a better description of every single field, * For a better description of every single field,

View File

@@ -1,26 +1,26 @@
export * from "./Barcode"; export * from "./Barcode.js";
export * from "./Beacon"; export * from "./Beacon.js";
export * from "./Location"; export * from "./Location.js";
export * from "./Field"; export * from "./Field.js";
export * from "./NFC"; export * from "./NFC.js";
export * from "./Semantics"; export * from "./Semantics.js";
export * from "./PassFields"; export * from "./PassFields.js";
export * from "./Personalize"; export * from "./Personalize.js";
export * from "./Certificates"; export * from "./Certificates.js";
import Joi from "joi"; import Joi from "joi";
import type { Buffer } from "node:buffer"; import type { Buffer } from "node:buffer";
import { Barcode } from "./Barcode"; import { Barcode } from "./Barcode.js";
import { Location } from "./Location"; import { Location } from "./Location.js";
import { Beacon } from "./Beacon"; import { Beacon } from "./Beacon.js";
import { NFC } from "./NFC"; import { NFC } from "./NFC.js";
import { PassFields, TransitType } from "./PassFields"; import { PassFields, TransitType } from "./PassFields.js";
import { Semantics } from "./Semantics"; import { Semantics } from "./Semantics.js";
import { CertificatesSchema } from "./Certificates"; import { CertificatesSchema } from "./Certificates.js";
import * as Messages from "../messages"; import * as Messages from "../messages.js";
import { RGB_HEX_COLOR_REGEX, URL_REGEX } from "./regexps"; import { RGB_HEX_COLOR_REGEX, URL_REGEX } from "./regexps.js";
export type PreferredStyleSchemes = ("posterEventTicket" | "eventTicket")[]; export type PreferredStyleSchemes = ("posterEventTicket" | "eventTicket")[];

View File

@@ -1,5 +1,5 @@
import * as Messages from "./messages"; import * as Messages from "./messages.js";
import type Bundle from "./Bundle"; import type Bundle from "./Bundle.js";
/** /**
* Converts a date to W3C / UTC string * Converts a date to W3C / UTC string