mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 14:25:17 +00:00
Updated serverless example to run on ESM
This commit is contained in:
@@ -6,20 +6,22 @@
|
||||
"author": "Alexander P. Cerutti <cerutti.alexander@gmail.com>",
|
||||
"license": "ISC",
|
||||
"main": "src/index.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"clear:deps": "rm -rf node_modules",
|
||||
"example": "pnpm serverless@3 offline --host 0.0.0.0; :'specifying host due to WSL limits'"
|
||||
"example": "pnpm serverless offline --host 0.0.0.0; :'specifying host due to WSL limits'"
|
||||
},
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.1691.0",
|
||||
"tslib": "^2.7.0",
|
||||
"aws-sdk": "^2.1692.0",
|
||||
"tslib": "^2.8.1",
|
||||
"passkit-generator": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/aws-lambda": "^8.10.145",
|
||||
"@types/aws-lambda": "^8.10.147",
|
||||
"serverless-offline": "^8.8.1",
|
||||
"serverless-plugin-typescript": "^2.1.5",
|
||||
"serverless-s3-local": "^0.8.5",
|
||||
"typescript": "^5.7.3"
|
||||
"typescript": "^5.7.3",
|
||||
"@types/node": "^18"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { ALBEvent, ALBResult } from "aws-lambda";
|
||||
import { PKPass } from "../../../../lib";
|
||||
import { PKPass } from "passkit-generator";
|
||||
import {
|
||||
throwClientErrorWithoutModelName,
|
||||
createPassGenerator,
|
||||
} from "../shared";
|
||||
} from "../shared.js";
|
||||
|
||||
/**
|
||||
* Lambda for barcodes example
|
||||
|
||||
@@ -3,7 +3,7 @@ import { PKPass } from "passkit-generator";
|
||||
import {
|
||||
throwClientErrorWithoutModelName,
|
||||
createPassGenerator,
|
||||
} from "../shared";
|
||||
} from "../shared.js";
|
||||
|
||||
/**
|
||||
* Lambda for expirationDate example
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ALBEvent, ALBResult } from "aws-lambda";
|
||||
import { PKPass } from "passkit-generator";
|
||||
import { createPassGenerator } from "../shared";
|
||||
import { createPassGenerator } from "../shared.js";
|
||||
|
||||
/**
|
||||
* Lambda for fields example
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export * from "./barcodes";
|
||||
export * from "./expirationDate";
|
||||
export * from "./fields";
|
||||
export * from "./localize";
|
||||
export * from "./pkpasses";
|
||||
export * from "./scratch";
|
||||
export * from "./barcodes.js";
|
||||
export * from "./expirationDate.js";
|
||||
export * from "./fields.js";
|
||||
export * from "./localize.js";
|
||||
export * from "./pkpasses.js";
|
||||
export * from "./scratch.js";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
throwClientErrorWithoutModelName,
|
||||
createPassGenerator,
|
||||
} from "../shared";
|
||||
} from "../shared.js";
|
||||
import type { ALBEvent, ALBResult } from "aws-lambda";
|
||||
import type { PKPass } from "passkit-generator";
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import {
|
||||
getS3Instance,
|
||||
getRandomColorPart,
|
||||
throwClientErrorWithoutModelName,
|
||||
} from "../shared";
|
||||
} from "../shared.js";
|
||||
import config from "../../config.json";
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
createPassGenerator,
|
||||
getRandomColorPart,
|
||||
getSpecificFileInModel,
|
||||
} from "../shared";
|
||||
} from "../shared.js";
|
||||
|
||||
/**
|
||||
* Lambda for scratch example
|
||||
|
||||
@@ -1 +1 @@
|
||||
export * from "./functions";
|
||||
export * from "./functions/index.js";
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "CommonJS",
|
||||
"outDir": "build",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
|
||||
Reference in New Issue
Block a user