mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 21:25:26 +00:00
Refactored all the schemas;
Splitted them in a folder and renamed them to have the same name of typescript type; Added more SemanticKeys; Removed Schema resolution via string;
This commit is contained in:
10
src/utils.ts
10
src/utils.ts
@@ -1,5 +1,5 @@
|
||||
import { EOL } from "os";
|
||||
import { PartitionedBundle, BundleUnit } from "./schema";
|
||||
import type * as Schemas from "./schemas";
|
||||
import { sep } from "path";
|
||||
|
||||
/**
|
||||
@@ -118,12 +118,12 @@ export function generateStringFile(lang: { [index: string]: string }): Buffer {
|
||||
*/
|
||||
|
||||
type PartitionedBundleElements = [
|
||||
PartitionedBundle["l10nBundle"],
|
||||
PartitionedBundle["bundle"],
|
||||
Schemas.PartitionedBundle["l10nBundle"],
|
||||
Schemas.PartitionedBundle["bundle"],
|
||||
];
|
||||
|
||||
export function splitBufferBundle(
|
||||
origin: BundleUnit,
|
||||
origin: Schemas.BundleUnit,
|
||||
): PartitionedBundleElements {
|
||||
const initialValue: PartitionedBundleElements = [{}, {}];
|
||||
|
||||
@@ -180,7 +180,7 @@ export function hasFilesWithName(
|
||||
}
|
||||
|
||||
export function deletePersonalization(
|
||||
source: BundleUnit,
|
||||
source: Schemas.BundleUnit,
|
||||
logosNames: string[] = [],
|
||||
): void {
|
||||
[...logosNames, "personalization.json"].forEach(
|
||||
|
||||
Reference in New Issue
Block a user