@lambda-kata/licensing 0.1.15 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var E=Object.create;var g=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var h=(i,e)=>()=>(i&&(e=i(i=0)),e);var A=(i,e)=>{for(var t in e)g(i,t,{get:e[t],enumerable:!0})},f=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of z(e))!b.call(i,n)&&n!==t&&g(i,n,{get:()=>e[n],enumerable:!(r=R(e,n))||r.enumerable});return i};var I=(i,e,t)=>(t=i!=null?E(O(i)):{},f(e||!i||!i.__esModule?g(t,"default",{value:i,enumerable:!0}):t,i)),M=i=>f(g({},"__esModule",{value:!0}),i);function v(){let i=l.getInstance();i.optimizeMemoryUsage(),i.optimizeStartupTime();let e=i.getMetrics();console.log(`[PERF] Optimizations applied - Loading: ${e.loadingTime}ms, Memory: ${Math.round(e.memoryUsage/1024)}KB`)}var l,y=h(()=>{"use strict";l=class i{static instance=null;metrics;startupTime;memoryBaseline;constructor(){this.startupTime=Date.now(),this.memoryBaseline=process.memoryUsage().heapUsed,this.metrics={memoryUsage:0,loadingTime:0,activeRequests:0,cacheHitRate:0}}static getInstance(){return i.instance||(i.instance=new i),i.instance}optimizeMemoryUsage(){global.gc&&global.gc(),this.configureV8MemoryOptimizations(),this.initializeStringInterning(),this.setupMemoryMonitoring()}optimizeStartupTime(){let e=Date.now();this.precompileRegexPatterns(),this.initializeObjectPools(),this.initializeOptimizedCache(),this.warmupCodePaths();let t=Date.now();this.metrics.loadingTime=t-e,this.metrics.loadingTime>100&&console.warn(`[PERF] Startup time ${this.metrics.loadingTime}ms exceeds 100ms target`)}getMetrics(){let e=process.memoryUsage().heapUsed;return this.metrics.memoryUsage=e-this.memoryBaseline,{...this.metrics}}trackRequestStart(){this.metrics.activeRequests++}trackRequestEnd(e){this.metrics.activeRequests=Math.max(0,this.metrics.activeRequests-1);let t=.1;this.metrics.cacheHitRate=t*(e?1:0)+(1-t)*this.metrics.cacheHitRate}configureV8MemoryOptimizations(){if(process.env.NODE_ENV==="production"){let e=process.env.NODE_OPTIONS??"",t=["--optimize-for-size","--max-old-space-size=64","--gc-interval=100","--expose-gc"],r=e;t.forEach(n=>{r.includes(n)||(r+=` ${n}`)}),process.env.NODE_OPTIONS=r}}initializeStringInterning(){let e=["Invalid account ID format","Native validator unavailable","System error","Network error","Security error","Memory allocation error"],t=new Map;e.forEach(r=>{t.set(r,r)})}setupMemoryMonitoring(){if(process.env.NODE_ENV==="test"||process.env.JEST_WORKER_ID)return;let e=setInterval(()=>{let r=process.memoryUsage().heapUsed-this.memoryBaseline;r>800*1024&&(console.warn(`[PERF] Memory usage ${Math.round(r/1024)}KB approaching 1MB limit`),global.gc&&global.gc()),this.metrics.memoryUsage=r},3e4);process.on("exit",()=>{clearInterval(e)})}precompileRegexPatterns(){let e=/^\d{12}$/;global.__VALIDATOR_REGEX_CACHE={accountId:e}}initializeObjectPools(){let e=[];for(let t=0;t<5;t++)e.push({entitled:!1,message:null,layerArn:null,expiresAt:null});global.__VALIDATOR_OBJECT_POOL={responses:e,nextIndex:0}}initializeOptimizedCache(){let e=[];for(let t=0;t<16;t++)e.push("");global.__VALIDATOR_CACHE_KEYS=e}warmupCodePaths(){(global.__VALIDATOR_REGEX_CACHE?.accountId||/^\d{12}$/).test("123456789012");let r=global.__VALIDATOR_OBJECT_POOL;if(r){let n=r.responses[0];n.entitled=!1}process.memoryUsage()}}});var x={};A(x,{NativeLicensingService:()=>m,createLicensingService:()=>S,default:()=>P});module.exports=M(x);function S(){return new m}var m,P,k=h(()=>{y();v();m=class{addon=null;addonLoadAttempted=!1;performanceOptimizer;constructor(){this.performanceOptimizer=l.getInstance()}async checkEntitlement(e){this.performanceOptimizer.trackRequestStart();try{if(!this.isValidAccountId(e))return this.logError("Invalid account ID format provided",{accountIdLength:typeof e=="string"?e.length:"not-string",accountIdType:typeof e}),this.performanceOptimizer.trackRequestEnd(!1),{entitled:!1,message:"Invalid account ID format"};if(this.addonLoadAttempted||this.loadAddon(),!this.addon)return this.logError("Native validator unavailable",{addonLoadAttempted:this.addonLoadAttempted}),this.performanceOptimizer.trackRequestEnd(!1),{entitled:!1,message:"Native validator unavailable"};let t=await this.addon.checkEntitlement(e);this.logInfo("Validation completed",{entitled:t.entitled,hasLayerArn:!!t.layerArn,hasMessage:!!t.message,hasExpiresAt:!!t.expiresAt});let n=this.performanceOptimizer.getMetrics().cacheHitRate>.3;return this.performanceOptimizer.trackRequestEnd(n),t}catch(t){return this.logError("Unexpected error during validation",{errorType:t instanceof Error?t.constructor.name:typeof t,errorMessage:this.sanitizeErrorMessage(t)}),this.performanceOptimizer.trackRequestEnd(!1),{entitled:!1,message:"System error"}}}checkEntitlementSync(e){this.performanceOptimizer.trackRequestStart();try{if(!this.isValidAccountId(e))return this.logError("Invalid account ID format provided (sync)",{accountIdLength:typeof e=="string"?e.length:"not-string",accountIdType:typeof e}),this.performanceOptimizer.trackRequestEnd(!1),{entitled:!1,message:"Invalid account ID format"};if(this.addonLoadAttempted||this.loadAddon(),!this.addon)return this.logError("Native validator unavailable (sync)",{addonLoadAttempted:this.addonLoadAttempted}),this.performanceOptimizer.trackRequestEnd(!1),{entitled:!1,message:"Native validator unavailable"};let t=this.addon.checkEntitlementSync(e);return this.logInfo("Sync validation completed",{entitled:t.entitled,hasLayerArn:!!t.layerArn,hasMessage:!!t.message,hasExpiresAt:!!t.expiresAt}),this.performanceOptimizer.trackRequestEnd(!0),t}catch(t){return this.logError("Unexpected error during sync validation",{errorType:t instanceof Error?t.constructor.name:typeof t,errorMessage:this.sanitizeErrorMessage(t)}),this.performanceOptimizer.trackRequestEnd(!1),{entitled:!1,message:"System error"}}}getPerformanceMetrics(){return this.performanceOptimizer.getMetrics()}isValidAccountId(e){return typeof e!="string"||e.length!==12?!1:/^\d{12}$/.test(e)}loadAddon(){this.addonLoadAttempted=!0;let e=require("os"),t=require("path"),r=require("fs"),n=e.platform(),d=e.arch(),c="lambda_kata_licensing.node",s;if(n==="linux")s=d==="x64"?"amd64":"arm64";else if(n==="darwin")s=`darwin-${d}`;else{this.logError("Unsupported platform for native addon",{platform:n,arch:d}),this.addon=null;return}let o=null;try{let a=require.resolve("@lambda-kata/licensing");o=t.join(t.dirname(a),"..","..")}catch{o=t.join(__dirname,"..","..")}let u=[t.join(o,"prebuilt",s,"build","Release",c),t.join(o,"build","Release",c),t.join(o,"build",s,"build","Release",c),t.join(__dirname,"..","..","prebuilt",s,"build","Release",c),t.join(__dirname,"..","..","build","Release",c)];for(let a of u)try{if(r.existsSync(a)){this.addon=require(a),this.logInfo("Native addon loaded successfully",{path:a});return}}catch(p){this.logError("Failed to load native addon from path",{path:a,errorType:p instanceof Error?p.constructor.name:typeof p,errorMessage:this.sanitizeErrorMessage(p)})}this.logError("Failed to load native licensing validator - no addon found",{searchedPaths:u,platform:n,arch:d,platformArch:s,licensingPackageRoot:o}),this.addon=null}isProductionMode(){return process.env.NODE_ENV==="production"}sanitizeErrorMessage(e){return this.isProductionMode()?e instanceof Error?`${e.constructor.name} occurred`:"Unknown error occurred":e instanceof Error?e.message:typeof e=="string"?e:String(e)}logInfo(e,t){this.isProductionMode()?console.log(`[INFO] native-licensing-validator: ${e}`):console.log(`[INFO] native-licensing-validator: ${e}`,t)}logError(e,t){this.isProductionMode()?console.error("[ERROR] native-licensing-validator: System error occurred"):console.error(`[ERROR] native-licensing-validator: ${e}`,t)}},P=m});k();0&&(module.exports={NativeLicensingService,createLicensingService});
1
+ "use strict";var E=Object.create;var g=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var h=(i,e)=>()=>(i&&(e=i(i=0)),e);var A=(i,e)=>{for(var t in e)g(i,t,{get:e[t],enumerable:!0})},f=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of z(e))!b.call(i,n)&&n!==t&&g(i,n,{get:()=>e[n],enumerable:!(r=R(e,n))||r.enumerable});return i};var I=(i,e,t)=>(t=i!=null?E(O(i)):{},f(e||!i||!i.__esModule?g(t,"default",{value:i,enumerable:!0}):t,i)),M=i=>f(g({},"__esModule",{value:!0}),i);function v(){let i=l.getInstance();i.optimizeMemoryUsage(),i.optimizeStartupTime();let e=i.getMetrics();console.log(`[PERF] Optimizations applied - Loading: ${e.loadingTime}ms, Memory: ${Math.round(e.memoryUsage/1024)}KB`)}var l,y=h(()=>{"use strict";l=class i{static instance=null;metrics;startupTime;memoryBaseline;constructor(){this.startupTime=Date.now(),this.memoryBaseline=process.memoryUsage().heapUsed,this.metrics={memoryUsage:0,loadingTime:0,activeRequests:0,cacheHitRate:0}}static getInstance(){return i.instance||(i.instance=new i),i.instance}optimizeMemoryUsage(){global.gc&&global.gc(),this.configureV8MemoryOptimizations(),this.initializeStringInterning()}optimizeStartupTime(){let e=Date.now();this.precompileRegexPatterns(),this.initializeObjectPools(),this.initializeOptimizedCache(),this.warmupCodePaths();let t=Date.now();this.metrics.loadingTime=t-e,this.metrics.loadingTime>100&&console.warn(`[PERF] Startup time ${this.metrics.loadingTime}ms exceeds 100ms target`)}getMetrics(){let e=process.memoryUsage().heapUsed;return this.metrics.memoryUsage=e-this.memoryBaseline,{...this.metrics}}trackRequestStart(){this.metrics.activeRequests++}trackRequestEnd(e){this.metrics.activeRequests=Math.max(0,this.metrics.activeRequests-1);let t=.1;this.metrics.cacheHitRate=t*(e?1:0)+(1-t)*this.metrics.cacheHitRate}configureV8MemoryOptimizations(){if(process.env.NODE_ENV==="production"){let e=process.env.NODE_OPTIONS??"",t=["--optimize-for-size","--max-old-space-size=64","--gc-interval=100","--expose-gc"],r=e;t.forEach(n=>{r.includes(n)||(r+=` ${n}`)}),process.env.NODE_OPTIONS=r}}initializeStringInterning(){let e=["Invalid account ID format","Native validator unavailable","System error","Network error","Security error","Memory allocation error"],t=new Map;e.forEach(r=>{t.set(r,r)})}setupMemoryMonitoring(){if(process.env.NODE_ENV==="test"||process.env.JEST_WORKER_ID)return;let e=setInterval(()=>{let r=process.memoryUsage().heapUsed-this.memoryBaseline;r>800*1024&&(console.warn(`[PERF] Memory usage ${Math.round(r/1024)}KB approaching 1MB limit`),global.gc&&global.gc()),this.metrics.memoryUsage=r},3e4);e.unref(),process.on("exit",()=>{clearInterval(e)})}precompileRegexPatterns(){let e=/^\d{12}$/;global.__VALIDATOR_REGEX_CACHE={accountId:e}}initializeObjectPools(){let e=[];for(let t=0;t<5;t++)e.push({entitled:!1,message:null,layerArn:null,expiresAt:null});global.__VALIDATOR_OBJECT_POOL={responses:e,nextIndex:0}}initializeOptimizedCache(){let e=[];for(let t=0;t<16;t++)e.push("");global.__VALIDATOR_CACHE_KEYS=e}warmupCodePaths(){(global.__VALIDATOR_REGEX_CACHE?.accountId||/^\d{12}$/).test("123456789012");let r=global.__VALIDATOR_OBJECT_POOL;if(r){let n=r.responses[0];n.entitled=!1}process.memoryUsage()}}});var x={};A(x,{NativeLicensingService:()=>m,createLicensingService:()=>S,default:()=>P});module.exports=M(x);function S(){return new m}var m,P,k=h(()=>{y();v();m=class{addon=null;addonLoadAttempted=!1;performanceOptimizer;constructor(){this.performanceOptimizer=l.getInstance()}async checkEntitlement(e){this.performanceOptimizer.trackRequestStart();try{if(!this.isValidAccountId(e))return this.logError("Invalid account ID format provided",{accountIdLength:typeof e=="string"?e.length:"not-string",accountIdType:typeof e}),this.performanceOptimizer.trackRequestEnd(!1),{entitled:!1,message:"Invalid account ID format"};if(this.addonLoadAttempted||this.loadAddon(),!this.addon)return this.logError("Native validator unavailable",{addonLoadAttempted:this.addonLoadAttempted}),this.performanceOptimizer.trackRequestEnd(!1),{entitled:!1,message:"Native validator unavailable"};let t=await this.addon.checkEntitlement(e);this.logInfo("Validation completed",{entitled:t.entitled,hasLayerArn:!!t.layerArn,hasMessage:!!t.message,hasExpiresAt:!!t.expiresAt});let n=this.performanceOptimizer.getMetrics().cacheHitRate>.3;return this.performanceOptimizer.trackRequestEnd(n),t}catch(t){return this.logError("Unexpected error during validation",{errorType:t instanceof Error?t.constructor.name:typeof t,errorMessage:this.sanitizeErrorMessage(t)}),this.performanceOptimizer.trackRequestEnd(!1),{entitled:!1,message:"System error"}}}checkEntitlementSync(e){this.performanceOptimizer.trackRequestStart();try{if(!this.isValidAccountId(e))return this.logError("Invalid account ID format provided (sync)",{accountIdLength:typeof e=="string"?e.length:"not-string",accountIdType:typeof e}),this.performanceOptimizer.trackRequestEnd(!1),{entitled:!1,message:"Invalid account ID format"};if(this.addonLoadAttempted||this.loadAddon(),!this.addon)return this.logError("Native validator unavailable (sync)",{addonLoadAttempted:this.addonLoadAttempted}),this.performanceOptimizer.trackRequestEnd(!1),{entitled:!1,message:"Native validator unavailable"};let t=this.addon.checkEntitlementSync(e);return this.logInfo("Sync validation completed",{entitled:t.entitled,hasLayerArn:!!t.layerArn,hasMessage:!!t.message,hasExpiresAt:!!t.expiresAt}),this.performanceOptimizer.trackRequestEnd(!0),t}catch(t){return this.logError("Unexpected error during sync validation",{errorType:t instanceof Error?t.constructor.name:typeof t,errorMessage:this.sanitizeErrorMessage(t)}),this.performanceOptimizer.trackRequestEnd(!1),{entitled:!1,message:"System error"}}}getPerformanceMetrics(){return this.performanceOptimizer.getMetrics()}isValidAccountId(e){return typeof e!="string"||e.length!==12?!1:/^\d{12}$/.test(e)}loadAddon(){this.addonLoadAttempted=!0;let e=require("os"),t=require("path"),r=require("fs"),n=e.platform(),d=e.arch(),c="lambda_kata_licensing.node",s;if(n==="linux")s=d==="x64"?"amd64":"arm64";else if(n==="darwin")s=`darwin-${d}`;else{this.logError("Unsupported platform for native addon",{platform:n,arch:d}),this.addon=null;return}let o=null;try{let a=require.resolve("@lambda-kata/licensing");o=t.join(t.dirname(a),"..","..")}catch{o=t.join(__dirname,"..","..")}let u=[t.join(o,"prebuilt",s,"build","Release",c),t.join(o,"build","Release",c),t.join(o,"build",s,"build","Release",c),t.join(__dirname,"..","..","prebuilt",s,"build","Release",c),t.join(__dirname,"..","..","build","Release",c)];for(let a of u)try{if(r.existsSync(a)){this.addon=require(a),this.logInfo("Native addon loaded successfully",{path:a});return}}catch(p){this.logError("Failed to load native addon from path",{path:a,errorType:p instanceof Error?p.constructor.name:typeof p,errorMessage:this.sanitizeErrorMessage(p)})}this.logError("Failed to load native licensing validator - no addon found",{searchedPaths:u,platform:n,arch:d,platformArch:s,licensingPackageRoot:o}),this.addon=null}isProductionMode(){return process.env.NODE_ENV==="production"}sanitizeErrorMessage(e){return this.isProductionMode()?e instanceof Error?`${e.constructor.name} occurred`:"Unknown error occurred":e instanceof Error?e.message:typeof e=="string"?e:String(e)}logInfo(e,t){this.isProductionMode()?console.log(`[INFO] native-licensing-validator: ${e}`):console.log(`[INFO] native-licensing-validator: ${e}`,t)}logError(e,t){this.isProductionMode()?console.error("[ERROR] native-licensing-validator: System error occurred"):console.error(`[ERROR] native-licensing-validator: ${e}`,t)}},P=m});k();0&&(module.exports={NativeLicensingService,createLicensingService});
package/package.json CHANGED
@@ -1,98 +1,99 @@
1
1
  {
2
- "name": "@lambda-kata/licensing",
3
- "version": "0.1.15",
4
- "description": "Tamper-resistant native licensing validator for Lambda Kata Integration",
5
- "main": "out/dist/index.js",
6
- "types": "out/tsc/index.d.ts",
7
- "license": "SEE LICENSE IN LICENSE",
8
- "author": "Lambda Kata Team",
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/lambda-kata/licensing.git"
2
+ "name": "@lambda-kata/licensing",
3
+ "version": "0.1.17",
4
+ "description": "Tamper-resistant native licensing validator for Lambda Kata Integration",
5
+ "main": "out/dist/index.js",
6
+ "types": "out/tsc/index.d.ts",
7
+ "license": "SEE LICENSE IN LICENSE",
8
+ "author": "Lambda Kata Team",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/lambda-kata/licensing.git"
12
+ },
13
+ "keywords": [
14
+ "lambda-kata",
15
+ "licensing",
16
+ "native",
17
+ "node-api",
18
+ "security",
19
+ "aws-lambda"
20
+ ],
21
+ "engines": {
22
+ "node": ">=18.0.0"
23
+ },
24
+ "os": [
25
+ "linux",
26
+ "darwin"
27
+ ],
28
+ "cpu": [
29
+ "x64",
30
+ "arm64"
31
+ ],
32
+ "scripts": {
33
+ "build": "yarn build:clean && yarn build:native && yarn build:ts && yarn build:types",
34
+ "build:clean": "rm -rf out/ build/ prebuilt/",
35
+ "build:native": "node-gyp rebuild || echo 'Native build failed - addon will be unavailable'",
36
+ "build:native:docker": "./scripts/build-docker.sh",
37
+ "build:ts": "esbuild src/index.ts --bundle --platform=node --target=node18 --format=cjs --outfile=out/dist/index.js --tree-shaking=true --minify --external:*.node",
38
+ "build:types": "tsc --emitDeclarationOnly --outDir out/tsc",
39
+ "build:all": "./scripts/build-all.sh",
40
+ "build:prebuilt": "./scripts/build-prebuilt.sh",
41
+ "test": "npx jest --runInBand --colors --verbose --testTimeout=15000 --forceExit --detectOpenHandles --no-cache",
42
+ "test:watch": "npx jest --watch --testTimeout=15000 --runInBand --no-cache",
43
+ "test:coverage": "npx jest --coverage --runInBand --colors --verbose --testTimeout=15000 --forceExit --detectOpenHandles --no-cache",
44
+ "test:safe": "npx jest --runInBand --colors --verbose --testTimeout=10000 --forceExit --detectOpenHandles --no-cache --testPathIgnorePatterns='.*\\.property\\.test\\.ts'",
45
+ "test:unit": "npx jest --runInBand --colors --verbose --testTimeout=10000 --forceExit --detectOpenHandles --no-cache --testPathPattern='.*\\.test\\.ts' --testPathIgnorePatterns='.*\\.property\\.test\\.ts'",
46
+ "test:property": "npx jest --runInBand --colors --verbose --testTimeout=20000 --forceExit --detectOpenHandles --no-cache --testPathPattern='.*\\.property\\.test\\.ts'",
47
+ "test:deployment": "./scripts/test-deployment.sh",
48
+ "lint": "eslint src/ test/ --ext .ts",
49
+ "lint:fix": "eslint src/ test/ --ext .ts --fix",
50
+ "docs": "typedoc src/index.ts --out docs/",
51
+ "install": "node scripts/install.js",
52
+ "postinstall": "node scripts/postinstall.js || echo 'Postinstall script failed, using fallback mode'",
53
+ "publish": "yarn build:native:docker all && ./scripts/build-prebuilt.sh package && ls -la prebuilt/ && npm publish"
54
+ },
55
+ "files": [
56
+ "out/",
57
+ "prebuilt/",
58
+ "scripts/install.js",
59
+ "scripts/postinstall.js",
60
+ "README.md",
61
+ "LICENSE"
62
+ ],
63
+ "dependencies": {
64
+ "node-addon-api": "^7.0.0"
65
+ },
66
+ "devDependencies": {
67
+ "@types/jest": "^29.5.0",
68
+ "@types/node": "^20.0.0",
69
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
70
+ "@typescript-eslint/parser": "^6.0.0",
71
+ "esbuild": "^0.19.0",
72
+ "eslint": "^8.0.0",
73
+ "fast-check": "^3.15.0",
74
+ "jest": "^29.5.0",
75
+ "node-gyp": "^10.0.0",
76
+ "ts-jest": "^29.1.0",
77
+ "typedoc": "^0.25.0",
78
+ "typescript": "^5.0.0"
79
+ },
80
+ "peerDependencies": {
81
+ "aws-cdk-lib": "^2.0.0",
82
+ "constructs": "^10.0.0"
83
+ },
84
+ "peerDependenciesMeta": {
85
+ "aws-cdk-lib": {
86
+ "optional": true
12
87
  },
13
- "keywords": [
14
- "lambda-kata",
15
- "licensing",
16
- "native",
17
- "node-api",
18
- "security",
19
- "aws-lambda"
20
- ],
21
- "engines": {
22
- "node": ">=18.0.0"
23
- },
24
- "os": [
25
- "linux",
26
- "darwin"
27
- ],
28
- "cpu": [
29
- "x64",
30
- "arm64"
31
- ],
32
- "scripts": {
33
- "build": "yarn build:clean && yarn build:native && yarn build:ts && yarn build:types",
34
- "build:clean": "rm -rf out/ build/ prebuilt/",
35
- "build:native": "node-gyp rebuild || echo 'Native build failed - addon will be unavailable'",
36
- "build:native:docker": "./scripts/build-docker.sh",
37
- "build:ts": "esbuild src/index.ts --bundle --platform=node --target=node18 --format=cjs --outfile=out/dist/index.js --tree-shaking=true --minify --external:*.node",
38
- "build:types": "tsc --emitDeclarationOnly --outDir out/tsc",
39
- "build:all": "./scripts/build-all.sh",
40
- "build:prebuilt": "./scripts/build-prebuilt.sh",
41
- "test": "npx jest --runInBand --colors --verbose --testTimeout=15000 --forceExit --detectOpenHandles --no-cache",
42
- "test:watch": "npx jest --watch --testTimeout=15000 --runInBand --no-cache",
43
- "test:coverage": "npx jest --coverage --runInBand --colors --verbose --testTimeout=15000 --forceExit --detectOpenHandles --no-cache",
44
- "test:safe": "npx jest --runInBand --colors --verbose --testTimeout=10000 --forceExit --detectOpenHandles --no-cache --testPathIgnorePatterns='.*\\.property\\.test\\.ts'",
45
- "test:unit": "npx jest --runInBand --colors --verbose --testTimeout=10000 --forceExit --detectOpenHandles --no-cache --testPathPattern='.*\\.test\\.ts' --testPathIgnorePatterns='.*\\.property\\.test\\.ts'",
46
- "test:property": "npx jest --runInBand --colors --verbose --testTimeout=20000 --forceExit --detectOpenHandles --no-cache --testPathPattern='.*\\.property\\.test\\.ts'",
47
- "test:deployment": "./scripts/test-deployment.sh",
48
- "lint": "eslint src/ test/ --ext .ts",
49
- "lint:fix": "eslint src/ test/ --ext .ts --fix",
50
- "docs": "typedoc src/index.ts --out docs/",
51
- "install": "node scripts/install.js",
52
- "postinstall": "node scripts/postinstall.js || echo 'Postinstall script failed, using fallback mode'"
53
- },
54
- "files": [
55
- "out/",
56
- "prebuilt/",
57
- "scripts/install.js",
58
- "scripts/postinstall.js",
59
- "README.md",
60
- "LICENSE"
61
- ],
62
- "dependencies": {
63
- "node-addon-api": "^7.0.0"
64
- },
65
- "devDependencies": {
66
- "@types/jest": "^29.5.0",
67
- "@types/node": "^20.0.0",
68
- "@typescript-eslint/eslint-plugin": "^6.0.0",
69
- "@typescript-eslint/parser": "^6.0.0",
70
- "esbuild": "^0.19.0",
71
- "eslint": "^8.0.0",
72
- "fast-check": "^3.15.0",
73
- "jest": "^29.5.0",
74
- "node-gyp": "^10.0.0",
75
- "ts-jest": "^29.1.0",
76
- "typedoc": "^0.25.0",
77
- "typescript": "^5.0.0"
78
- },
79
- "peerDependencies": {
80
- "aws-cdk-lib": "^2.0.0",
81
- "constructs": "^10.0.0"
82
- },
83
- "peerDependenciesMeta": {
84
- "aws-cdk-lib": {
85
- "optional": true
86
- },
87
- "constructs": {
88
- "optional": true
89
- }
90
- },
91
- "gypfile": true,
92
- "binary": {
93
- "napi_versions": [
94
- 8,
95
- 9
96
- ]
88
+ "constructs": {
89
+ "optional": true
97
90
  }
91
+ },
92
+ "gypfile": true,
93
+ "binary": {
94
+ "napi_versions": [
95
+ 8,
96
+ 9
97
+ ]
98
+ }
98
99
  }