@orm-plugin/ghg-data-converter 0.0.0-stage → 0.1.0
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/README.md +2 -3
- package/dist/ccs/src/client.d.ts +44 -0
- package/dist/ccs/src/eems-template.d.ts +277 -0
- package/dist/ccs/src/eems-template.test.d.ts +1 -0
- package/dist/ccs/src/index.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1553 -0
- package/dist/index.umd.cjs +3 -0
- package/dist/veracity/src/client.d.ts +61 -0
- package/dist/veracity/src/client.test.d.ts +1 -0
- package/dist/veracity/src/index.d.ts +2 -0
- package/dist/veracity/src/ovd-template.d.ts +196 -0
- package/package.json +61 -4
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(function(m,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("crypto-js"),require("axios"),require("moment"),require("form-data"),require("fs")):typeof define=="function"&&define.amd?define(["exports","crypto-js","axios","moment","form-data","fs"],p):(m=typeof globalThis<"u"?globalThis:m||self,p(m["idm-plugin-ghg-data-converter"]={},m.CryptoJS,m.axios,m.moment,m.FormData,m.fs))})(this,function(m,p,d,A,H,P){"use strict";var q=Object.defineProperty;var j=(m,p,d)=>p in m?q(m,p,{enumerable:!0,configurable:!0,writable:!0,value:d}):m[p]=d;var f=(m,p,d)=>(j(m,typeof p!="symbol"?p+"":p,d),d);const C={test:{report:"http://eemstest.ccs.org.cn/energyEfficiency/energyDataAccept",delete:"http://eemstest.ccs.org.cn/energyEfficiency/voyageDataDelete2CCS",cii:"http://eemstest.ccs.org.cn/energyEfficiency/energyData2CCS",imoFuel:"http://eemstest.ccs.org.cn/energyEfficiency/imoFuelData"},prod:{report:"http://eems.ccs.org.cn/energyEfficiency/energyDateAccept",delete:"http://eems.ccs.org.cn/energyEfficiency/voyageDataDelete2CCS",cii:"http://eems.ccs.org.cn/energyEfficiency/energyData2CCS",imoFuel:"http://eems.ccs.org.cn/energyEfficiency/imoFuelData"}},U="A5483FA7";class x{constructor(n){f(this,"client");f(this,"urls");if(this.options=n,this.urls=n.test?C.test:C.prod,this.client=d.create({timeout:3e4}),this.licenseType==="company"&&!n.companyLicense)throw new Error("CcsEemsClient缺少license配置");if(this.licenseType==="ship"&&!n.shipLicense)throw new Error("CcsEemsClient缺少shipLicense配置")}get licenseType(){return this.options.licenseType??"company"}generateToken(n,o){const t=p.enc.Utf8.parse(this.options.tokenKey||U),l=this.licenseType==="ship",u=`${n}${l?"S":"C"}${o??(l?this.options.shipLicense:this.options.companyLicense)}`.replace(/[^a-zA-Z0-9.\-*_]/g,a=>a===" "?"+":`%${Buffer.from(a,"utf8").toString("hex").toUpperCase()}`);return p.DES.encrypt(u,t,{iv:t,mode:p.mode.CBC,padding:p.pad.Pkcs7}).ciphertext.toString(p.enc.Hex).toUpperCase()}buildParams(n){const o=String(Date.now()),t=new FormData;return t.append("voyageData",JSON.stringify(n)),t.append("timestamp",o),t.append("token",this.generateToken(o)),this.options.companyCode&&t.append("companyCode",this.options.companyCode),t}async reportVoyageData(n){return(await this.client.post(this.urls.report,this.buildParams(n))).data}async deleteVoyageData(n){const o=String(Date.now()),t=new FormData;return t.append("voyageData",JSON.stringify({deletePorts:n})),t.append("timestamp",o),t.append("token",this.generateToken(o)),(await this.client.post(this.urls.delete,t)).data}}var y=(e=>(e.HSHFO="1",e.LSHFO="11",e.ULSHFO="12",e.HSLFO="2",e.LSLFO="21",e.ULSLFO="22",e.MDO_MGO="3",e.LPG_PROPANE="4",e.LPG_BUTANE="5",e.LNG_OTTO_MS="6",e.LNG_OTTO_SS="61",e.LNG_DIESEL_SS="62",e.LNG_LBSI="63",e.METHANOL_FOSSIL="7",e.H2_FOSSIL_FC="71",e.H2_FOSSIL_ICE="72",e.NH3_FOSSIL="73",e.ETHANOL="8",e.BIODIESEL="9",e.HVO="81",e.BIO_LNG_OTTO_MS="82",e.BIO_LNG_OTTO_SS="83",e.BIO_LNG_DIESEL_SS="84",e.BIO_LNG_LBSI="85",e.BIO_METHANOL="86",e.OTHER_BIOFUELS="87",e.BIO_H2_FC="88",e.BIO_H2_ICE="89",e.E_DIESEL="101",e.E_METHANOL="102",e.E_LNG_OTTO_MS="103",e.E_LNG_OTTO_SS="104",e.E_LNG_DIESEL_SS="105",e.E_LNG_LBSI="106",e.E_H2_FC="107",e.E_H2_ICE="108",e.E_NH3="109",e.E_LPG="110",e.E_DME="111",e))(y||{});const w={1:"高硫重燃油 HS HFO",11:"低硫重燃油 LS HFO",12:"超低硫重燃油 ULS HFO",2:"高硫轻燃油 HS LFO",21:"低硫轻燃油 LS LFO",22:"超低硫轻燃油 ULS LFO",3:"柴油/汽油 MDO/MGO",4:"液化石油气(丙烷)LPG(Propane)",5:"液化石油气(丁烷)LPG(Butane)",6:"液化天然气LNG Otto (dual fuel medium speed)",61:"液化天然气LNG Otto (dual fuel slow speed)",62:"液化天然气LNG Diesel (dual fuel slow speed)",63:"液化天然气LNG-Lean-Burn Spark-Ignited (LBSI)",7:"甲醇(化石)Methanol (fossil)",71:"氢(化石)燃料电池 H2 (fossil)-Fuel Cells",72:"氢(化石)内燃机 H2 (fossil)-ICE",73:"氨(化石)NH3 (fossil)",8:"乙醇 Ethanol",9:"生物柴油 Bio-diesel",81:"氢化植物油 HVO",82:"Bio-LNG Otto (dual fuel medium speed)",83:"Bio-LNG Otto (dual fuel slow speed)",84:"Bio-LNG Diesel (dual fuel slow speed)",85:"Bio-LNG-Lean-Burn Spark-Ignited (LBSI)",86:"Bio-methanol",87:"Other Biofuels",88:"Bio-H2— Fuel Cells",89:"Bio-H2— ICE",101:"e-diesel",102:"e-methanol",103:"e-LNG Otto (dual fuel medium speed)",104:"e-LNG Otto (dual fuel slow speed)",105:"e-LNG Diesel (dual fuel slow speed)",106:"e-LNG-Lean-Burn Spark-Ignited (LBSI)",107:"e-H2—Fuel Cells",108:"e-H2—ICE",109:"e-NH3",110:"e-LPG",111:"e-DME"},k=[{oilId:"1",fields:["BROB_HSFO"]},{oilId:"11",fields:["BROB_VLSFO"]},{oilId:"12",fields:["BROB_ULSFO"]},{oilId:"3",fields:["BROB_VLSDGO","BROB_ULSDGO"]}];var S=(e=>(e.MAIN_ENGINES="1",e.AUXILIARY_ENGINES="2",e.BOILERS="3",e.INCINERATOR="4",e.INERT_GAS_GENERATORS="5",e.CARGO_PUMPS="6",e.GAS_TURBINES="7",e))(S||{}),g=(e=>(e.PORT="0",e.ANCHORING="1",e.DRIFTING="2",e))(g||{}),N=(e=>(e.NO="0",e.EU="1",e.UK="2",e.EU_OVERSEAS="3",e.EU_SMALL_ISLAND="4",e))(N||{}),F=(e=>(e.LOADING="0",e.DISCHARGING="1",e.STS="2",e.WAITING_BERTH="3",e.BUNKERING="4",e.SUPPLY="5",e.REPAIR="6",e.CREW_CHANGE="7",e.SHELTER="8",e.OTHER="9",e))(F||{}),h=(e=>(e.DEPARTURE="0",e.ARRIVAL="1",e))(h||{}),L=(e=>(e.ANNUAL="0",e.ISM_CHANGE="1",e.NEW_SHIP="2",e.FLAG_CHANGE="3",e))(L||{}),R=(e=>(e.ETS="0",e.FUEL_EU="1",e.CARBON_CAPTURE="2",e))(R||{}),E=(e=>(e.SECURING_SHIP_SAFETY="1",e.SAVING_LIFE_AT_SEA="2",e.SAILING_IN_ICE="3",e))(E||{}),I=(e=>(e.TANKER_STS="1",e.REEFER_CONTAINER="2",e.GAS_CARGO_COOLING="3",e.TANKER_EDRIVEN_PUMP="4",e.TANKER_BOILER_CARGO_HEATING="5",e.INDEPENDENT_DISCHARGE_PUMP="6",e))(I||{});const D=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/,W=["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE"],$={AUSTRIA:"AT",BELGIUM:"BE",BULGARIA:"BG",CROATIA:"HR",CYPRUS:"CY","CZECH REPUBLIC":"CZ",DENMARK:"DK",ESTONIA:"EE",FINLAND:"FI",FRANCE:"FR",GERMANY:"DE",GREECE:"GR",HUNGARY:"HU",IRELAND:"IE",ITALY:"IT",LATVIA:"LV",LITHUANIA:"LT",LUXEMBOURG:"LU",MALTA:"MT",NETHERLANDS:"NL",POLAND:"PL",PORTUGAL:"PT",ROMANIA:"RO",SLOVAKIA:"SK",SLOVENIA:"SI",SPAIN:"ES",SWEDEN:"SE","UNITED KINGDOM":"GB","GREAT BRITAIN":"GB",UK:"GB"},K=(e,n=2)=>String(e).padStart(n,"0");class B{parsePort(n){var a,s;if(!n)return{name:"",country:"",loCode:"",zone:null};const[o="",t="",l=""]=n.split("|").map(M=>M.trim());let r=t,u=l;/^[A-Za-z]{5}$/.test(r)||(u||(u=r),r="");const i=o.match(/^(.*?)\s*\(([^)]+)\)\s*$/);return{name:((a=i==null?void 0:i[1])==null?void 0:a.trim())||o,country:((s=i==null?void 0:i[2])==null?void 0:s.trim())||"",loCode:r.toUpperCase(),zone:u?this.parseZone(u):null}}parseZone(n){if(!n)return null;const o=Number(String(n).trim());return Number.isFinite(o)?o:null}formatLocalTime(n,o){const t=o??0;return A(n).utcOffset(t).format("YYYY-MM-DD HH:mm:ss")}formatCoordinate(n,o){const t=Number(n);if(!Number.isFinite(t))return"";const l=Math.abs(t);let r=Math.floor(l),u=Math.round((l-r)*60);u===60&&(r+=1,u=0);const i=o==="lat"?t>=0?"N":"S":t>=0?"E":"W";return`${r}°${K(u)}′ ${i}`}mapOilType(n){return{HSFO:"1",VLSFO:"11",ULSFO:"12",MDO:"3"}[n]}mapIsEu(n){const o=String(n||"").trim().toUpperCase();if(!o)return"0";const t=$[o]||o;return W.includes(t)?"1":t==="GB"||t==="UK"?"2":"0"}normalizeImo(n){return String(n??"").trim()}validate(n,o=[]){const t=(r,u,i,a)=>o.push({row:r,field:u,value:i,reason:a}),l=(n==null?void 0:n.voyagePorts)||[];return l.length||t(0,"voyagePorts",void 0,"报文中未包含有效数据(voyagePorts为空)"),l.forEach((r,u)=>{const i=u+1;r.imoNo||t(i,"imoNo",r.imoNo,"船舶识别号必填"),/^[0-9]{7,16}$/.test(r.imoNo)||t(i,"imoNo",r.imoNo,"海船应为IMO号(7位数字)"),/^[0-9a-fA-F]{32}$/.test(r.refCode)||t(i,"refCode",r.refCode,"应为32位GUID字符串"),r.firstVoyageCode||t(i,"firstVoyageCode",r.firstVoyageCode,"航次编号1必填"),r.firstVoyageCode&&r.firstVoyageCode.length>16&&t(i,"firstVoyageCode",r.firstVoyageCode,"最大长度V16"),Object.values(g).includes(r.recordType)||t(i,"recordType",r.recordType,"停泊类型枚举值不合法"),r.portid||t(i,"portid",r.portid,"港口代码必填"),r.portid&&r.recordType==="0"&&r.portid!=="000"&&r.portid.length!==5&&t(i,"portid",r.portid,"停靠港应使用国际港口5位码"),Object.values(N).includes(r.isEu)||t(i,"isEu",r.isEu,"isEu枚举值不合法"),D.test(r.arrTm||"")||t(i,"arrTm",r.arrTm,"抵港时间格式应为yyyy-mm-dd HH:MI:SS(本地时间)"),Number.isFinite(r.arrZone)||t(i,"arrZone",r.arrZone,"抵港时区必填"),D.test(r.deptTm||"")||t(i,"deptTm",r.deptTm,"离港时间格式应为yyyy-mm-dd HH:MI:SS(本地时间)"),Number.isFinite(r.deptZone)||t(i,"deptZone",r.deptZone,"离港时区必填"),["0","1"].includes(r.inPort)||t(i,"inPort",r.inPort,"港界内/外枚举值不合法"),(r.voyagePortloadings||[]).forEach((a,s)=>{Object.values(h).includes(a.loadingType)||t(i,`voyagePortloadings[${s}].loadingType`,a.loadingType,"货物信息类型枚举值不合法"),Number.isFinite(Number(a.cargoTons))||t(i,`voyagePortloadings[${s}].cargoTons`,a.cargoTons,"载货量必填")}),(r.voyagePortoils||[]).forEach((a,s)=>{Object.values(y).includes(a.oilId)||t(i,`voyagePortoils[${s}].oilId`,a.oilId,"燃油代码不正确"),Number.isFinite(Number(a.arrTons))||t(i,`voyagePortoils[${s}].arrTons`,a.arrTons,"抵港存油量必填"),Number.isFinite(Number(a.deptTons))||t(i,`voyagePortoils[${s}].deptTons`,a.deptTons,"离港存油量必填")}),(r.voyageAddoils||[]).forEach((a,s)=>{Object.values(y).includes(a.oilId)||t(i,`voyageAddoils[${s}].oilId`,a.oilId,"燃油代码不正确"),Number.isFinite(Number(a.addTons))||t(i,`voyageAddoils[${s}].addTons`,a.addTons,"加油量必填"),D.test(a.addTm||"")||t(i,`voyageAddoils[${s}].addTm`,a.addTm,"加油时间格式应为yyyy-mm-dd HH:MI:SS(本地时间)"),Number.isFinite(Number(a.viscosity))||t(i,`voyageAddoils[${s}].viscosity`,a.viscosity,"加油燃料粘度必填")}),(r.voyageOutoils||[]).forEach((a,s)=>{Object.values(y).includes(a.oilId)||t(i,`voyageOutoils[${s}].oilId`,a.oilId,"燃油代码不正确"),Number.isFinite(Number(a.outTons))||t(i,`voyageOutoils[${s}].outTons`,a.outTons,"驳出燃料量必填"),D.test(a.outTm||"")||t(i,`voyageOutoils[${s}].outTm`,a.outTm,"驳出时间格式应为yyyy-mm-dd HH:MI:SS(本地时间)")}),(r.voyageSludges||[]).forEach((a,s)=>{Number.isFinite(Number(a.sludgeTons))||t(i,`voyageSludges[${s}].sludgeTons`,a.sludgeTons,"处理油渣量必填"),D.test(a.sludgeOutTm||"")||t(i,`voyageSludges[${s}].sludgeOutTm`,a.sludgeOutTm,"油渣处理时间格式应为yyyy-mm-dd HH:MI:SS(本地时间)")})}),o}}const Y=new B;class z{constructor(n,o,t="https://ovd.veracityapp.com/api"){f(this,"client");f(this,"jwtToken",null);this.accessKey=n,this.companyId=o,this.baseUrl=t,this.client=d.create({timeout:3e4})}async authenticate(){const n="https://ovdadmin.veracityapp.com/token",o=await d.get(n,{headers:{Authorization:`Bearer ${this.accessKey}`}});return this.jwtToken=o.data,this.jwtToken}getHeaders(){return{Authorization:`Bearer ${this.jwtToken}`,"Content-Type":"application/json"}}async uploadData(n,o,t){if(o.length>1001)throw new Error("建议单次上传不超过 1000 行数据");const l={CompanyId:this.companyId,Data:{InterfaceCode:n,Data:o},Tag:t};return(await this.client.post(`${this.baseUrl}/Data/process`,l,{headers:this.getHeaders()})).data}async deleteData(n){return(await this.client.delete(`${this.baseUrl}/Data/process`,{headers:this.getHeaders(),data:{CompanyId:this.companyId,InterfaceCode:n.interfaceCode,VesselIMOs:n.vesselIMOs,UTCDateTimeFrom:n.from,UTCDateTimeTo:n.to,Tag:n.tag}})).data}async uploadDocument(n){const o=new H;o.append("File",P.createReadStream(n.filePath));const t=new URL(`${this.baseUrl}/v1/documents`);return t.searchParams.append("CompanyId",this.companyId),t.searchParams.append("VesselIMO",n.vesselIMO),t.searchParams.append("DocumentType",n.docType),n.bunkerCategory&&t.searchParams.append("BunkerDocumentCategory",n.bunkerCategory),n.bdnNumbers&&n.bdnNumbers.forEach(r=>t.searchParams.append("BdnNumbers",r)),(await this.client.post(t.toString(),o,{headers:{...this.getHeaders(),...o.getHeaders()}})).data}async checkHealth(){return(await d.get("https://ovd.veracityapp.com/health")).data.Status==="Healthy"}}var b=(e=>(e.Date="Date",e.Time="Time",e.DateTime="Date-Time",e.WholeNumber="WholeNumber",e.DecimalNumber="DecimalNumber",e.Text="Text",e))(b||{}),O=(e=>(e.Arrival="Arrival",e.Departure="Departure",e.ArrivalSts="ArrivalSTS",e.DepartureSts="DepartureSTS",e.Sts="STS",e.Bosp="BOSP",e.Eosp="EOSP",e.BeginOfSeaPassage="BeginOfSeaPassage",e.EndOfSeaPassage="EndOfSeaPassage",e.Faop="FAOP",e.FullAheadOnPassage="FullAheadOnPassage",e.BeginOfShifting="BeginOfShifting",e.EndOfShifting="EndOfShifting",e.BeginCanalPassage="Begin canal passage",e.EndCanalPassage="End canal passage",e.BeginAnchoringDrifting="Begin Anchoring/Drifting",e.EndAnchoringDrifting="End Anchoring/Drifting",e.NoonSeaPassage="Noon (Position) - Sea passage",e.NoonPort="Noon (Position) - Port",e.NoonRiver="Noon (Position) - River",e.NoonStoppage="Noon (Position) - Stoppage",e.EtaUpdate="ETA update",e.BeginFuelChangeOver="Begin fuel change over",e.EndFuelChangeOver="End fuel change over",e.ChangeDestinationDeviation="Change destination (Deviation)",e.BeginOfDeviation="Begin of deviation",e.EndOfDeviation="End of deviation",e.EnteringSpecialArea="Entering special area",e.LeavingSpecialArea="Leaving special area",e.OtherEvent="Other event",e.BeginOfOffhire="Beginofoffhire",e.EndOfOffhire="Endofoffhire",e.PerformanceSnapshot="Performance snapshot",e))(O||{}),v=(e=>(e.CargoOperations="CargoOperations",e.PassengerMovement="PassengerMovement",e.TakingBunkers="TakingBunkers",e.ChangingCrew="ChangingCrew",e.GoodWillVisit="GoodWillVisit",e.TakingSupplies="TakingSupplies",e.Repair="Repair",e.LaidUp="LaidUp",e.AwaitingOrders="AwaitingOrders",e.Miscellaneous="Miscellaneous",e.CrewMovement="CrewMovement",e.CruiseLeisureRecreation="CruiseLeisureRecreation",e.UnderGovernmentOrder="UnderGovernmentOrder",e.QuarantineInspection="QuarantineInspection",e.Refuge="Refuge",e.UnloadingCargo="UnloadingCargo",e.LoadingCargo="LoadingCargo",e.RepairInDryDock="RepairInDryDock",e.RepairInWetDock="RepairInWetDock",e.CargoTankCleaning="CargoTankCleaning",e.MeansOfTransportCustomsClearance="MeansOfTransportCustomsClearance",e.DeGassing="DeGassing",e.WasteDisposal="WasteDisposal",e.OffshoreMobilizationOperations="OffshoreMobilizationOperations",e.TransferOfPersonnel="TransferOfPersonnel",e.PassThrough="PassThrough",e))(v||{}),G=(e=>(e.HFO="HFO",e.LFO="LFO",e.MGO="MGO",e.MDO="MDO",e.LPGP="LPGP",e.LPGB="LPGB",e.LNG="LNG",e.LngN2="LNGN2",e.Methanol="Methanol",e.Ethanol="Ethanol",e.Ethane="Ethane",e.Blend="Blend",e.EMdo="eMDO",e.EMgo="eMGO",e.ELpg="eLPG",e.EDme="eDME",e.HVO="HVO",e.FAME="FAME",e.BioDiesel="BioDiesel",e.BioLNG="BioLNG",e.ELNG="eLNG",e.BioMethanol="BioMethanol",e.EMethanol="eMethanol",e.NH3="NH3",e.H2="H2",e.BioH2="BioH2",e.EH2="eH2",e.ENh3="eNH3",e.LBG="LBG",e.OtherBio="OtherBio",e.LSHFO="LSHFO",e.LSLFO="LSLFO",e.LSMGO="LSMGO",e.ULSFO2020="ULSFO2020",e.ULSLFO2020="ULSLFO2020",e.ULSMDO2020="ULSMDO2020",e.ULSMGO2020="ULSMGO2020",e.VLSFO="VLSFO",e.VLSFO2020="VLSFO2020",e.VLSLFO2020="VLSLFO2020",e.B100LFO="B100LFO",e.B100MGO="B100MGO",e.B10LFO="B10LFO",e.B10MGO="B10MGO",e.B20LFO="B20LFO",e.B24LFO="B24LFO",e.B30LFO="B30LFO",e.B50MGO="B50MGO",e.BioLFO="BioLFO",e.BioMGO="BioMGO",e.Other="Other",e))(G||{}),V=(e=>(e.OVDLA="OVDLA",e.OVDBR="OVDBR",e))(V||{});class T{fields(n){return this.fieldDefs(n).map(o=>o.name)}formatCoordinate(n,o){const t=Math.abs(n),l=Math.floor(t),r=(t-l)*60;return{hemisphere:o==="lat"?n>=0?"N":"S":o==="lng"?n>=0?"E":"W":"",degrees:l,minutes:r.toFixed(2)}}mapEvent(n){return{NOON:"Noon (Position) - Sea passage"}[n]||n}mapPortCallPurpose(n){return{DISCHARGE:"UnloadingCargo",DISCHARGING:"UnloadingCargo",DISCH:"UnloadingCargo",UNLOAD:"UnloadingCargo",UNLOADING:"UnloadingCargo",LOAD:"LoadingCargo",LOADING:"LoadingCargo",LOADDISCHARGE:"CargoOperations","LOAD/DISCHARGE":"CargoOperations",BUNKERING:"TakingBunkers",BUNKER:"TakingBunkers",OTHER:"Miscellaneous","CANAL TRANSIT":"PassThrough",TRANSIT:"PassThrough",REPAIRS:"Repair","DRY DOCK":"RepairInDryDock","LAY UP":"LaidUp","CREW CHANGE":"ChangingCrew"}[String(n??"").trim().toUpperCase()]||""}validate(n,o="OVDLA"){const[t,...l]=n,r=new Map(this.fieldDefs(o).map(i=>[i.name,i])),u=[];return l.forEach((i,a)=>{t.forEach((s,M)=>{const _=r.get(s);if(!_)return;const c=String(i[M]??"").trim();if(c){if(_.name==="IMO"||_.rule==="exact7digits"){/^\d{7}$/.test(c)||u.push({row:a+1,field:s,value:c,reason:"must be exactly 7 digits"});return}switch(_.type){case"Date":/^\d{4}-\d{2}-\d{2}$/.test(c)||u.push({row:a+1,field:s,value:c,reason:"expected format yyyy-mm-dd"});break;case"Time":/^\d{2}:\d{2}$/.test(c)||u.push({row:a+1,field:s,value:c,reason:"expected format hh:mm"});break;case"Date-Time":/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(c)||u.push({row:a+1,field:s,value:c,reason:"expected format yyyy-mm-dd hh:mm"});break;case"WholeNumber":/^[+-]?\d+$/.test(c)||u.push({row:a+1,field:s,value:c,reason:"expected whole number"});break;case"DecimalNumber":Number.isFinite(Number(c))||u.push({row:a+1,field:s,value:c,reason:"expected decimal number"});break;case"Text":_.maxLength&&c.length>_.maxLength&&u.push({row:a+1,field:s,value:c,reason:`exceeds max length ${_.maxLength}`}),/['"]/.test(c)&&u.push({row:a+1,field:s,value:c,reason:"single/double quotes are not allowed"});break}}})}),u}toCsv(n){const o=n.map(t=>t.map(l=>{const r=String(l);return r.includes(",")||r.includes('"')||r.includes(`
|
|
2
|
+
`)?`"${r.replace(/"/g,'""')}"`:r}).join(",")).join(`
|
|
3
|
+
`);return Buffer.from(o,"utf-8")}}class Z extends T{constructor(){super(...arguments);f(this,"version","3.13");f(this,"logAbstractDefs",[{name:"Date_UTC",type:"Date",relevantFor:"mandatory for MRV&DCS",mandatory:!0,description:"UTC date"},{name:"Time_UTC",type:"Time",unit:"hh:mm",relevantFor:"mandatory for MRV&DCS",mandatory:!0,description:"UTC time"},{name:"IMO",type:"WholeNumber",rule:"exact7digits",relevantFor:"mandatory for MRV&DCS",mandatory:!0,description:"IMO Number"},{name:"Event",type:"Text",maxLength:30,relevantFor:"mandatory for MRV&DCS",description:'Reported event , see additional sheet "Event types"'},{name:"Voyage_From",type:"Text",maxLength:5,unit:"UN/LOCODE",relevantFor:"mandatory for MRV&DCS",description:"From - port code (Departure port)"},{name:"Voyage_To",type:"Text",maxLength:5,unit:"UN/LOCODE",relevantFor:"mandatory for MRV&DCS",description:"To - port code (Arrival port)"},{name:"Voyage_Number",type:"Text",maxLength:30,relevantFor:"recommended for voyage level verfication schemes",description:"Name or number"},{name:"Voyage_Leg",type:"Text",maxLength:500,relevantFor:"out of scope for GHG verification"},{name:"Voyage_Type",type:"Text",maxLength:30,relevantFor:"for CII correction",description:"E.g. STS (in context of DCS CII Correction Factors), one way, round trip, idle"},{name:"Purposes_Of_Call",type:"Text",maxLength:100,relevantFor:"mandatory for MRV&DCS",description:'Primary purposes of a port call. For supported purposes/keywords see additonal sheet "Port call purposes". Serveral purposes can be separeted by a comma (,). To be reported for each Departure event.'},{name:"Offhire_Reasons",type:"Text",maxLength:100,relevantFor:"for CII correction, voluntary wrt MRV",description:"Please see notes on GHG reporting for details"},{name:"Time_Since_Previous_Report",type:"DecimalNumber",unit:"h",relevantFor:"mandatory for MRV&DCS",mandatory:!0},{name:"Time_Elapsed_Anchoring",type:"DecimalNumber",unit:"h",relevantFor:"mandatory for MRV&DCS",description:"Time at anchor"},{name:"Time_Elapsed_Sailing",type:"DecimalNumber",unit:"h",relevantFor:"DSC only, voluntary wrt MRV",description:"Sailing"},{name:"Time_Elapsed_Drifting",type:"DecimalNumber",unit:"h",relevantFor:"recommended for MRV&DCS",description:"Drifting"},{name:"Time_Elapsed_Maneuvering",type:"DecimalNumber",unit:"h",relevantFor:"recommended for MRV&DCS",description:"Maneuvering"},{name:"Time_Elapsed_Waiting",type:"DecimalNumber",unit:"h",relevantFor:"not in use",description:"Waiting"},{name:"Time_Elapsed_Loading_Unloading",type:"DecimalNumber",unit:"h",relevantFor:"mandatory for MRV",description:"Loading/ Unloading"},{name:"Time_Elapsed_Ice",type:"DecimalNumber",unit:"h",relevantFor:"for CII correction, voluntary wrt MRV",description:"Operating in ice"},{name:"Distance",type:"DecimalNumber",unit:"NM",relevantFor:"mandatory for MRV&DCS"},{name:"Latitude_North_South",type:"Text",maxLength:5,relevantFor:"mandatory for MRV&DCS",description:"North / South"},{name:"Latitude_Degree",type:"WholeNumber",unit:"°",relevantFor:"mandatory for MRV&DCS",description:"Degrees"},{name:"Latitude_Minutes",type:"DecimalNumber",unit:"'",relevantFor:"mandatory for MRV&DCS",description:"Minutes"},{name:"Longitude_East_West",type:"Text",maxLength:5,relevantFor:"mandatory for MRV&DCS",description:"East / West"},{name:"Longitude_Degree",type:"WholeNumber",unit:"°",relevantFor:"mandatory for MRV&DCS",description:"Degrees"},{name:"Longitude_Minutes",type:"DecimalNumber",unit:"'",relevantFor:"mandatory for MRV&DCS",description:"Minutes"},{name:"Cargo_Mt",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Weight of cargo in mt"},{name:"Cargo_M3",type:"DecimalNumber",unit:"m3",relevantFor:"mandatory for MRV&DCS",description:"Volume of cargo in cubic meters"},{name:"Deadweight_Carried",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Deadweight carried as per MRV (i.e. excl. bunkers)"},{name:"Cargo_Total_TEU",type:"WholeNumber",unit:"TEU",relevantFor:"DSC only, voluntary wrt MRV",description:"Total"},{name:"Passengers",type:"WholeNumber",relevantFor:"mandatory for MRV&DCS",description:"Number of passengers"},{name:"Crew",type:"WholeNumber",relevantFor:"mandatory for MRV&DCS",description:"Crew"},{name:"Reefer_20_Chilled",type:"WholeNumber",relevantFor:"for CII correction",description:"Reefer 20 ft. Chilled"},{name:"Reefer_40_Chilled",type:"WholeNumber",relevantFor:"for CII correction",description:"Reefer 40 ft. chilled"},{name:"Reefer_20_Frozen",type:"WholeNumber",relevantFor:"for CII correction",description:"Reefer 20 ft. Frozen"},{name:"Reefer_40_Frozen",type:"WholeNumber",relevantFor:"for CII correction",description:"Reefer 40 ft. Frozen"},{name:"Wind_Force_Kn",type:"DecimalNumber",unit:"kn",relevantFor:"out of scope for GHG verification",description:"Speed"},{name:"Wind_Force_Bft",type:"WholeNumber",unit:"Bft",relevantFor:"out of scope for GHG verification",description:"Force"},{name:"ME_Consumption_HFO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"ME HFO consumption"},{name:"ME_Consumption_LFO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"ME LFO consumption"},{name:"ME_Consumption_MGO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"ME MGO consumption"},{name:"ME_Consumption_MDO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"ME MDO consumption"},{name:"ME_Consumption_O",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"ME other fuels consumption"},{name:"ME_Consumption_O_type",type:"Text",maxLength:30,relevantFor:"mandatory for MRV&DCS",description:"ME other fuels type"},{name:"ME_Consumption_LPGP",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"ME LPG Propane consumption"},{name:"ME_Consumption_LPGB",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"ME LPG Butane consumption"},{name:"ME_Consumption_LNG",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"ME LNG consumption"},{name:"ME_Consumption_M",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"ME Methanol consumption"},{name:"ME_Consumption_E",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"ME Ethanol consumption"},{name:"AE_Consumption_HFO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"AE HFO consumption"},{name:"AE_Consumption_LFO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"AE LFO consumption"},{name:"AE_Consumption_MGO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"AE MGO consumption"},{name:"AE_Consumption_MDO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"AE MDO consumption"},{name:"AE_Consumption_O",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"AE other fuels consumption"},{name:"AE_Consumption_O_type",type:"Text",maxLength:30,relevantFor:"mandatory for MRV&DCS",description:"AE other fuels type"},{name:"AE_Consumption_LPGP",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"AE LPG Propane consumption"},{name:"AE_Consumption_LPGB",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"AE LPG Butane consumption"},{name:"AE_Consumption_LNG",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"AE LNG consumption"},{name:"AE_Consumption_M",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"AE Methanol consumption"},{name:"AE_Consumption_E",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"AE Ethanol consumption"},{name:"Boiler_Consumption_HFO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Boiler HFO consumption"},{name:"Boiler_Consumption_LFO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Boiler LFO consumption"},{name:"Boiler_Consumption_MGO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Boiler MGO consumption"},{name:"Boiler_Consumption_MDO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Boiler MDO consumption"},{name:"Boiler_Consumption_O",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Boiler other fuels consumption"},{name:"Boiler_Consumption_O_type",type:"Text",maxLength:30,relevantFor:"mandatory for MRV&DCS",description:"Boiler other fuels type"},{name:"Boiler_Consumption_LPGP",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Boiler LPG Propane consumption"},{name:"Boiler_Consumption_LPGB",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Boiler LPG Butane consumption"},{name:"Boiler_Consumption_LNG",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Boiler LNG consumption"},{name:"Boiler_Consumption_M",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Boiler Methanol consumption"},{name:"Boiler_Consumption_E",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Boiler Ethanol consumption"},{name:"Inert_gas_Consumption_HFO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Inert_gas_Consumption_HFO"},{name:"Inert_gas_Consumption_LFO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Inert_gas_Consumption_LFO"},{name:"Inert_gas_Consumption_MGO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Inert_gas_Consumption_MGO"},{name:"Inert_gas_Consumption_MDO",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Inert_gas_Consumption_MDO"},{name:"Inert_gas_Consumption_O",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Inert_gas_Consumption_O"},{name:"Inert_gas_Consumption_O_type",type:"Text",maxLength:30,relevantFor:"mandatory for MRV&DCS",description:"Inert_gas_Consumption_O_type"},{name:"Inert_gas_Consumption_LPGP",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Inert_gas_Consumption_LPGP"},{name:"Inert_gas_Consumption_LPGB",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Inert_gas_Consumption_LPGB"},{name:"Inert_gas_Consumption_LNG",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Inert_gas_Consumption_LNG"},{name:"Inert_gas_Consumption_M",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Inert_gas_Consumption_M"},{name:"Inert_gas_Consumption_E",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Inert_gas_Consumption_E"},{name:"HFO_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"mandatory for MRV&DCS",description:"HFO"},{name:"LFO_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"mandatory for MRV&DCS",description:"LFO"},{name:"MGO_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"mandatory for MRV&DCS",description:"MGO"},{name:"MDO_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"mandatory for MRV&DCS",description:"MDO"},{name:"LPGP_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"mandatory for MRV&DCS",description:"LPG Propane"},{name:"LPGB_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"mandatory for MRV&DCS",description:"LPG Butane"},{name:"LNG_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"mandatory for MRV&DCS",description:"LNG"},{name:"Methanol_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"mandatory for MRV&DCS",description:"Methanol"},{name:"Ethanol_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"mandatory for MRV&DCS",description:"Ethanol"},{name:"O_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"mandatory for MRV&DCS",description:"Other fuel"},{name:"O_ROB_type",type:"Text",maxLength:30,relevantFor:"mandatory for MRV&DCS",description:"Other fuel type"},{name:"Reefer_Work",type:"DecimalNumber",unit:"kWh",relevantFor:"for CII correction, voluntary wrt MRV",description:"Work"},{name:"Reefer_SFOC",type:"DecimalNumber",unit:"g/kWh",relevantFor:"for CII correction, voluntary wrt MRV",description:"SFOC"},{name:"Reefer_Fuel_Type",type:"Text",maxLength:30,relevantFor:"for CII correction, voluntary wrt MRV",description:"Fuel type"},{name:"Reefer_Fuel_BDN",type:"Text",maxLength:50,relevantFor:"for CII correction, voluntary wrt MRV",description:"Fuel BDN"},{name:"Cargo_Cooling_Work",type:"DecimalNumber",unit:"kWh",relevantFor:"for CII correction, voluntary wrt MRV",description:"Work"},{name:"Cargo_Cooling_SFOC",type:"DecimalNumber",unit:"g/kWh",relevantFor:"for CII correction, voluntary wrt MRV",description:"SFOC"},{name:"Cargo_Cooling_Fuel_Type",type:"Text",maxLength:30,relevantFor:"for CII correction, voluntary wrt MRV",description:"Fuel type"},{name:"Cargo_Cooling_Fuel_BDN",type:"Text",maxLength:50,relevantFor:"for CII correction, voluntary wrt MRV",description:"Fuel BDN"},{name:"Discharge_Pump_Work",type:"DecimalNumber",unit:"kWh",relevantFor:"for CII correction, voluntary wrt MRV",description:"Work"},{name:"Discharge_Pump_SFOC",type:"DecimalNumber",unit:"g/kWh",relevantFor:"for CII correction, voluntary wrt MRV",description:"SFOC"},{name:"Discharge_Pump_Fuel_Type",type:"Text",maxLength:30,relevantFor:"for CII correction, voluntary wrt MRV",description:"Fuel type"},{name:"Discharge_Pump_Fuel_BDN",type:"Text",maxLength:50,relevantFor:"for CII correction, voluntary wrt MRV",description:"Fuel BDN"},{name:"Shore_Side_Electricity_Reception",type:"DecimalNumber",unit:"kWh",relevantFor:"mandatory for FEUM and in case of no fuel consumption for any verification",description:"Work"},{name:"Cargo_heating_Consumption_HFO",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"Cargo heating HFO consumption"},{name:"Cargo_heating_Consumption_LFO",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"Cargo heating LFO consumption"},{name:"Cargo_heating_Consumption_MGO",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"Cargo heating MGO consumption"},{name:"Cargo_heating_Consumption_MDO",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"Cargo heating MDO consumption"},{name:"Cargo_heating_Consumption_LPGP",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"Cargo heating LPG Propane consumption"},{name:"Cargo_heating_Consumption_LPGB",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"Cargo heating LPG Butane consumption"},{name:"Cargo_heating_Consumption_LNG",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"Cargo heating LNG consumption"},{name:"Cargo_heating_Consumption_M",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"Cargo heating Methanol consumption"},{name:"Cargo_heating_Consumption_E",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"Cargo heating Ethanol consumption"},{name:"Cargo_heating_Consumption_O",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"Cargo heating other fuels consumption"},{name:"Cargo_heating_Consumption_O_type",type:"Text",maxLength:30,relevantFor:"for CII correction, voluntary wrt MRV",description:"Cargo heating other fuels type"},{name:"Cargo_Heating_Consumption_BDN",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"Cargo heating consumption"},{name:"Cargo_Heating_Fuel_BDN",type:"Text",maxLength:50,relevantFor:"for CII correction, voluntary wrt MRV",description:"Fuel BDN used for cargo heating consumption"},{name:"DPP_Cargo_Pump_Consumption_MDO",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"DPP cargo pump MDO consumption"},{name:"DPP_Cargo_Pump_Consumption_O",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"DPP cargo pump other fuels consumption"},{name:"DPP_Cargo_Pump_Consumption_O_type",type:"Text",maxLength:30,relevantFor:"for CII correction, voluntary wrt MRV",description:"DPP cargo pump other fuels consumption"},{name:"DPP_Cargo_Pump_Consumption_BDN",type:"DecimalNumber",unit:"mt",relevantFor:"for CII correction, voluntary wrt MRV",description:"DPP cargo pump consumption"},{name:"DPP_Cargo_Pump_Fuel_BDN",type:"Text",maxLength:50,relevantFor:"for CII correction, voluntary wrt MRV",description:"Fuel BDN used for DPP consumption"},{name:"ME_Fuel_BDN",type:"Text",maxLength:50,relevantFor:"mandatory for MRV&DCS",mandatory:!0,description:"Primary fuel"},{name:"ME_Consumption",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Consumption (sum of all MEs) primary fuel"},{name:"ME_Fuel_BDN_2",type:"Text",maxLength:50,relevantFor:"optional input",description:"2nd fuel"},{name:"ME_Consumption_BDN_2",type:"DecimalNumber",unit:"mt",relevantFor:"optional input",description:"Consumption (sum of all MEs) 2nd fuel"},{name:"ME_Fuel_BDN_3",type:"Text",maxLength:50,relevantFor:"optional input",description:"3rd fuel"},{name:"ME_Consumption_BDN_3",type:"DecimalNumber",unit:"mt",relevantFor:"optional input",description:"Consumption (sum of all MEs) 3rd fuel"},{name:"ME_Fuel_BDN_4",type:"Text",maxLength:50,relevantFor:"optional input",description:"4th fuel"},{name:"ME_Consumption_BDN_4",type:"DecimalNumber",unit:"mt",relevantFor:"optional input",description:"Consumption (sum of all MEs) 4th fuel"},{name:"AE_Fuel_BDN",type:"Text",maxLength:50,relevantFor:"mandatory for MRV&DCS",mandatory:!0,description:"Primary fuel"},{name:"AE_Consumption",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Consumption (sum of all AEs) primary fuel"},{name:"Boiler_Consumption",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Boiler consumption (sum of all boilers)"},{name:"DPP_Consumption",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Consumption (sum of all DPPs) primary fuel"},{name:"IGG_Consumption",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Consumption (sum of all IGGs) primary fuel"},{name:"GCU_Consumption",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Consumption (sum of all GCUs) primary fuel"},{name:"Incinerator_Consumption",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",description:"Consumption (sum of all Incinerators) primary fuel"},{name:"AE_Fuel_BDN_2",type:"Text",maxLength:50,relevantFor:"optional input",description:"2nd fuel"},{name:"AE_Consumption_BDN_2",type:"DecimalNumber",unit:"mt",relevantFor:"optional input",description:"Consumption (sum of all AEs) 2nd fuel"},{name:"Boiler_Consumption_BDN_2",type:"DecimalNumber",unit:"mt",relevantFor:"optional input",description:"Consumption (sum of all boilers) 2nd fuel"},{name:"AE_Fuel_BDN_3",type:"Text",maxLength:50,relevantFor:"optional input",description:"3rd fuel"},{name:"AE_Consumption_BDN_3",type:"DecimalNumber",unit:"mt",relevantFor:"optional input",description:"Consumption (sum of all AEs) 3rd fuel"},{name:"Boiler_Consumption_BDN_3",type:"DecimalNumber",unit:"mt",relevantFor:"optional input",description:"Consumption (sum of all boilers) 3rd fuel"},{name:"AE_Fuel_BDN_4",type:"Text",maxLength:50,relevantFor:"optional input",description:"4th fuel"},{name:"AE_Consumption_BDN_4",type:"DecimalNumber",unit:"mt",relevantFor:"optional input",description:"Consumption (sum of all AEs) 4th fuel"},{name:"Boiler_Consumption_BDN_4",type:"DecimalNumber",unit:"mt",relevantFor:"optional input",description:"Consumption (sum of all boilers) 4th fuel"},{name:"ROB_Fuel_BDN",type:"Text",maxLength:50,relevantFor:"mandatory for MRV&DCS",mandatory:!0,description:"Reference number (BDN) from bunker reporting for the fuel used since last report"},{name:"BDN_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"mandatory for MRV&DCS",description:"Only data fields for the fuels actually used since last report need to be included."},{name:"ROB_Fuel_BDN_2",type:"Text",maxLength:50,relevantFor:"optional input"},{name:"BDN_2_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"optional input"},{name:"ROB_Fuel_BDN_3",type:"Text",maxLength:50,relevantFor:"optional input"},{name:"BDN_3_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"optional input"},{name:"ROB_Fuel_BDN_4",type:"Text",maxLength:50,relevantFor:"optional input"},{name:"BDN_4_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"optional input"},{name:"ROB_Fuel_BDN_5",type:"Text",maxLength:50,relevantFor:"optional input"},{name:"BDN_5_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"optional input"},{name:"ROB_Fuel_BDN_6",type:"Text",maxLength:50,relevantFor:"optional input"},{name:"BDN_6_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"optional input"},{name:"ROB_Fuel_BDN_7",type:"Text",maxLength:50,relevantFor:"optional input"},{name:"BDN_7_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"optional input"},{name:"ROB_Fuel_BDN_8",type:"Text",maxLength:50,relevantFor:"optional input"},{name:"BDN_8_ROB",type:"DecimalNumber",unit:"MT",relevantFor:"optional input"},{name:"ROB_Fuel_Total",type:"DecimalNumber",unit:"MT",relevantFor:"mandatory for MRV&DCS",description:"Total fuel ROB (sum of all fuel masses onboard at the event time)"},{name:"Remarks",type:"Text",maxLength:250,relevantFor:"out of scope for GHG verification",description:"Any comment/note/explanation to be recorded"}]);f(this,"bunkerReportDefs",[{name:"IMO",type:"WholeNumber",rule:"exact7digits",relevantFor:"mandatory for MRV&DCS",mandatory:!0,description:"IMO number"},{name:"BDN_Number",type:"Text",maxLength:50,relevantFor:"mandatory for MRV&DCS",mandatory:!0,description:"Bunker Delivery Note Number"},{name:"Used_By_BDN",type:"Text",maxLength:50,unit:"-",relevantFor:"out of scope for GHG verification",mandatory:!0,description:"BDN number of the resulting fuel blend."},{name:"Coming_From_BDN",type:"Text",maxLength:50,relevantFor:"out of scope for GHG verification",mandatory:!0,description:"BDN number of parent fuel"},{name:"Bunker_Delivery_Date",type:"Date",relevantFor:"mandatory for MRV&DCS",mandatory:!0,description:"Bunker Delivery Date"},{name:"Bunker_Delivery_Time",type:"Time",relevantFor:"mandatory for MRV&DCS",mandatory:!0,description:"Bunker Delivery Time"},{name:"Fuel_Type",type:"Text",maxLength:30,relevantFor:"mandatory for MRV&DCS",mandatory:!0,description:"Fuel Type"},{name:"Mass",type:"DecimalNumber",unit:"mt",relevantFor:"mandatory for MRV&DCS",mandatory:!0,description:"Mass"},{name:"EU_Lower_Calorific_Value",type:"DecimalNumber",unit:"MJ/kg",relevantFor:"Mandatory for biofuels for FuelEU Maritime",description:"Lower Calorific Value (EU)"},{name:"EU_GHG_Intensity",type:"DecimalNumber",unit:"gCO2eq/MJ",relevantFor:"Mandatory for biofuels and e-fuels for FuelEU Maritime",description:"EU GHG emission intensity"},{name:"Sustainability",type:"Text",maxLength:256,relevantFor:"Mandatory for biofuels for MRV/DCS and FuelEU Maritime",description:"Sustainability"},{name:"Lower_Heating_Value",type:"DecimalNumber",unit:"MJ/kg",relevantFor:"Mandatory for biofuels for DCS",description:"Lower heating value"},{name:"IMO_GHG_Intensity",type:"DecimalNumber",unit:"gCO2eq/MJ",relevantFor:"Mandatory for biofuels under IMO DCS/CII scheme until LCA guidelines are applied in IMO reporting scheme",description:"IMO GHG emission intensity"},{name:"FLL_Energy_Share",type:"DecimalNumber",unit:"%",relevantFor:"out of scope for GHG verification",description:"Energy share in fuel blend"},{name:"IMO_Fuel_Pathway_Code",type:"Text",maxLength:50,relevantFor:"out of scope for GHG verification",description:"Fuel pathway code"},{name:"Density_At_15dg",type:"DecimalNumber",unit:"mt/m³",relevantFor:"out of scope for GHG verification",description:"Density @ 15 °C"},{name:"Sulphur_Content",type:"DecimalNumber",unit:"% m/m",relevantFor:"out of scope for GHG verification",description:"Sulphur Content"},{name:"Viscosity",type:"DecimalNumber",unit:"cSt",relevantFor:"out of scope for GHG verification",description:"Viscosity"},{name:"Water_Content",type:"DecimalNumber",unit:"% V/V",relevantFor:"out of scope for GHG verification",description:"Water content"},{name:"Higher_Heating_Value",type:"DecimalNumber",unit:"MJ/kg",relevantFor:"out of scope for GHG verification",description:"Higher heating value"},{name:"Bunker_Port",type:"Text",maxLength:5,unit:"UN/LOCODE",relevantFor:"out of scope for GHG verification",description:"Bunker port"},{name:"Grade",type:"Text",maxLength:10,relevantFor:"out of scope for GHG verification",description:"Grade"},{name:"TtW_CO2_CF",type:"DecimalNumber",unit:"gCO2/g",relevantFor:"out of scope for GHG verification",description:"Tank-to-Wake CO2 conversion factor"}])}fieldDefs(o){return o==="OVDBR"?this.bunkerReportDefs:this.logAbstractDefs}}m.CCS_OIL_GROUPS=k,m.CCS_TM_PATTERN=D,m.CcsAdjustType=E,m.CcsConsumerType=S,m.CcsCorrectType=I,m.CcsEemsClient=x,m.CcsEemsTemplate=B,m.CcsExemptionType=R,m.CcsIsEu=N,m.CcsLoadingType=h,m.CcsOilCode=y,m.CcsOilNames=w,m.CcsPeriodType=L,m.CcsPortWork=F,m.CcsRecordType=g,m.OvdEventType=O,m.OvdFieldType=b,m.OvdFuelType=G,m.OvdInterfaceCode=V,m.OvdPortCallPurpose=v,m.OvdTemplate=T,m.OvdTemplateV313=Z,m.VeracityOVDClient=z,m.ccsEemsTemplate=Y,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export type OVDInterfaceCode = 'OVDLA' | 'OVDBR' | 'OVDCN' | 'OVDCP' | 'OVDEL';
|
|
2
|
+
export type OVDDocumentType = 'Bunker' | 'Electricity' | 'Cargo';
|
|
3
|
+
export type BunkerCategory = 'Biofuel' | 'Debunkering' | 'BdnSampling';
|
|
4
|
+
export interface OVDResponse {
|
|
5
|
+
CompanyId: string;
|
|
6
|
+
InterfaceCode: OVDInterfaceCode;
|
|
7
|
+
ValidLines: number;
|
|
8
|
+
InvalidLines: number;
|
|
9
|
+
ImportedLines: number;
|
|
10
|
+
Warnings?: string[];
|
|
11
|
+
Errors?: string[];
|
|
12
|
+
OperationTime: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class VeracityOVDClient {
|
|
15
|
+
private accessKey;
|
|
16
|
+
private companyId;
|
|
17
|
+
private baseUrl;
|
|
18
|
+
private client;
|
|
19
|
+
private jwtToken;
|
|
20
|
+
constructor(accessKey: string, companyId: string, baseUrl?: string);
|
|
21
|
+
/**
|
|
22
|
+
* 获取 JWT 令牌
|
|
23
|
+
* 使用 AccessKey 交换有效期 60 分钟的 Token
|
|
24
|
+
*/
|
|
25
|
+
authenticate(): Promise<string>;
|
|
26
|
+
/**
|
|
27
|
+
* 设置通用 Header
|
|
28
|
+
*/
|
|
29
|
+
private getHeaders;
|
|
30
|
+
/**
|
|
31
|
+
* 上传 OVD 数据
|
|
32
|
+
* @param interfaceCode 接口类型 (如 OVDLA)
|
|
33
|
+
* @param data 包含表头的数据二维数组
|
|
34
|
+
* @param tag 可选标签,用于替换旧数据
|
|
35
|
+
*/
|
|
36
|
+
uploadData(interfaceCode: OVDInterfaceCode, data: string[][], tag?: string): Promise<OVDResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* 删除特定范围的数据
|
|
39
|
+
*/
|
|
40
|
+
deleteData(params: {
|
|
41
|
+
interfaceCode: OVDInterfaceCode;
|
|
42
|
+
vesselIMOs: string[];
|
|
43
|
+
from?: string;
|
|
44
|
+
to?: string;
|
|
45
|
+
tag?: string;
|
|
46
|
+
}): Promise<any>;
|
|
47
|
+
/**
|
|
48
|
+
* 上传 OVD 相关文档 (PDF/JPG)
|
|
49
|
+
*/
|
|
50
|
+
uploadDocument(params: {
|
|
51
|
+
filePath: string;
|
|
52
|
+
vesselIMO: string;
|
|
53
|
+
docType: OVDDocumentType;
|
|
54
|
+
bunkerCategory?: BunkerCategory;
|
|
55
|
+
bdnNumbers?: string[];
|
|
56
|
+
}): Promise<any>;
|
|
57
|
+
/**
|
|
58
|
+
* 获取服务健康状态
|
|
59
|
+
*/
|
|
60
|
+
checkHealth(): Promise<boolean>;
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DNV OVD (Operational Vessel Data) Log Abstract 模板
|
|
3
|
+
* 接口文档: OVD Interface Description 3.13
|
|
4
|
+
* 字段元数据(type/unit/relevantFor/mandatory)来自文档 Log Abstract 工作表; DNV 不支持的字段已剔除
|
|
5
|
+
*/
|
|
6
|
+
/// <reference types="node" />
|
|
7
|
+
/// <reference types="node" />
|
|
8
|
+
export declare enum OvdFieldType {
|
|
9
|
+
Date = "Date",
|
|
10
|
+
Time = "Time",
|
|
11
|
+
DateTime = "Date-Time",
|
|
12
|
+
WholeNumber = "WholeNumber",
|
|
13
|
+
DecimalNumber = "DecimalNumber",
|
|
14
|
+
Text = "Text"
|
|
15
|
+
}
|
|
16
|
+
export interface OvdField {
|
|
17
|
+
name: string;
|
|
18
|
+
type: OvdFieldType;
|
|
19
|
+
rule?: string;
|
|
20
|
+
maxLength?: number;
|
|
21
|
+
unit?: string;
|
|
22
|
+
relevantFor?: string;
|
|
23
|
+
mandatory?: boolean;
|
|
24
|
+
description?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface OvdValidateError {
|
|
27
|
+
row: number;
|
|
28
|
+
field: string;
|
|
29
|
+
value: string;
|
|
30
|
+
reason: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 事件类型, 值为 OVD 推荐的事件名拼写 (文档 "Event types" 工作表)
|
|
34
|
+
* 注意: 仅 Arrival/Departure/BOSP/EOSP 等带 * 标记的为 OVD 已知事件名
|
|
35
|
+
*/
|
|
36
|
+
export declare enum OvdEventType {
|
|
37
|
+
Arrival = "Arrival",
|
|
38
|
+
Departure = "Departure",
|
|
39
|
+
ArrivalSts = "ArrivalSTS",
|
|
40
|
+
DepartureSts = "DepartureSTS",
|
|
41
|
+
Sts = "STS",
|
|
42
|
+
Bosp = "BOSP",
|
|
43
|
+
Eosp = "EOSP",
|
|
44
|
+
BeginOfSeaPassage = "BeginOfSeaPassage",
|
|
45
|
+
EndOfSeaPassage = "EndOfSeaPassage",
|
|
46
|
+
Faop = "FAOP",
|
|
47
|
+
FullAheadOnPassage = "FullAheadOnPassage",
|
|
48
|
+
BeginOfShifting = "BeginOfShifting",
|
|
49
|
+
EndOfShifting = "EndOfShifting",
|
|
50
|
+
BeginCanalPassage = "Begin canal passage",
|
|
51
|
+
EndCanalPassage = "End canal passage",
|
|
52
|
+
BeginAnchoringDrifting = "Begin Anchoring/Drifting",
|
|
53
|
+
EndAnchoringDrifting = "End Anchoring/Drifting",
|
|
54
|
+
NoonSeaPassage = "Noon (Position) - Sea passage",
|
|
55
|
+
NoonPort = "Noon (Position) - Port",
|
|
56
|
+
NoonRiver = "Noon (Position) - River",
|
|
57
|
+
NoonStoppage = "Noon (Position) - Stoppage",
|
|
58
|
+
EtaUpdate = "ETA update",
|
|
59
|
+
BeginFuelChangeOver = "Begin fuel change over",
|
|
60
|
+
EndFuelChangeOver = "End fuel change over",
|
|
61
|
+
ChangeDestinationDeviation = "Change destination (Deviation)",
|
|
62
|
+
BeginOfDeviation = "Begin of deviation",
|
|
63
|
+
EndOfDeviation = "End of deviation",
|
|
64
|
+
EnteringSpecialArea = "Entering special area",
|
|
65
|
+
LeavingSpecialArea = "Leaving special area",
|
|
66
|
+
OtherEvent = "Other event",
|
|
67
|
+
BeginOfOffhire = "Beginofoffhire",
|
|
68
|
+
EndOfOffhire = "Endofoffhire",
|
|
69
|
+
PerformanceSnapshot = "Performance snapshot"
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 挂靠目的, 用于 Purposes_Of_Call 字段, 多个以逗号分隔 (文档 "Port call purposes" 工作表, IMO 0172 编码)
|
|
73
|
+
*/
|
|
74
|
+
export declare enum OvdPortCallPurpose {
|
|
75
|
+
CargoOperations = "CargoOperations",
|
|
76
|
+
PassengerMovement = "PassengerMovement",
|
|
77
|
+
TakingBunkers = "TakingBunkers",
|
|
78
|
+
ChangingCrew = "ChangingCrew",
|
|
79
|
+
GoodWillVisit = "GoodWillVisit",
|
|
80
|
+
TakingSupplies = "TakingSupplies",
|
|
81
|
+
Repair = "Repair",
|
|
82
|
+
LaidUp = "LaidUp",
|
|
83
|
+
AwaitingOrders = "AwaitingOrders",
|
|
84
|
+
Miscellaneous = "Miscellaneous",
|
|
85
|
+
CrewMovement = "CrewMovement",
|
|
86
|
+
CruiseLeisureRecreation = "CruiseLeisureRecreation",
|
|
87
|
+
UnderGovernmentOrder = "UnderGovernmentOrder",
|
|
88
|
+
QuarantineInspection = "QuarantineInspection",
|
|
89
|
+
Refuge = "Refuge",
|
|
90
|
+
UnloadingCargo = "UnloadingCargo",
|
|
91
|
+
LoadingCargo = "LoadingCargo",
|
|
92
|
+
RepairInDryDock = "RepairInDryDock",
|
|
93
|
+
RepairInWetDock = "RepairInWetDock",
|
|
94
|
+
CargoTankCleaning = "CargoTankCleaning",
|
|
95
|
+
MeansOfTransportCustomsClearance = "MeansOfTransportCustomsClearance",
|
|
96
|
+
DeGassing = "DeGassing",
|
|
97
|
+
WasteDisposal = "WasteDisposal",
|
|
98
|
+
OffshoreMobilizationOperations = "OffshoreMobilizationOperations",
|
|
99
|
+
TransferOfPersonnel = "TransferOfPersonnel",
|
|
100
|
+
PassThrough = "PassThrough"
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* 燃油类型 (文档 "Fuel types" 工作表)
|
|
104
|
+
*/
|
|
105
|
+
export declare enum OvdFuelType {
|
|
106
|
+
HFO = "HFO",
|
|
107
|
+
LFO = "LFO",
|
|
108
|
+
MGO = "MGO",
|
|
109
|
+
MDO = "MDO",
|
|
110
|
+
LPGP = "LPGP",
|
|
111
|
+
LPGB = "LPGB",
|
|
112
|
+
LNG = "LNG",
|
|
113
|
+
LngN2 = "LNGN2",
|
|
114
|
+
Methanol = "Methanol",
|
|
115
|
+
Ethanol = "Ethanol",
|
|
116
|
+
Ethane = "Ethane",
|
|
117
|
+
Blend = "Blend",
|
|
118
|
+
EMdo = "eMDO",
|
|
119
|
+
EMgo = "eMGO",
|
|
120
|
+
ELpg = "eLPG",
|
|
121
|
+
EDme = "eDME",
|
|
122
|
+
HVO = "HVO",
|
|
123
|
+
FAME = "FAME",
|
|
124
|
+
BioDiesel = "BioDiesel",
|
|
125
|
+
BioLNG = "BioLNG",
|
|
126
|
+
ELNG = "eLNG",
|
|
127
|
+
BioMethanol = "BioMethanol",
|
|
128
|
+
EMethanol = "eMethanol",
|
|
129
|
+
NH3 = "NH3",
|
|
130
|
+
H2 = "H2",
|
|
131
|
+
BioH2 = "BioH2",
|
|
132
|
+
EH2 = "eH2",
|
|
133
|
+
ENh3 = "eNH3",
|
|
134
|
+
LBG = "LBG",
|
|
135
|
+
OtherBio = "OtherBio",
|
|
136
|
+
LSHFO = "LSHFO",
|
|
137
|
+
LSLFO = "LSLFO",
|
|
138
|
+
LSMGO = "LSMGO",
|
|
139
|
+
ULSFO2020 = "ULSFO2020",
|
|
140
|
+
ULSLFO2020 = "ULSLFO2020",
|
|
141
|
+
ULSMDO2020 = "ULSMDO2020",
|
|
142
|
+
ULSMGO2020 = "ULSMGO2020",
|
|
143
|
+
VLSFO = "VLSFO",
|
|
144
|
+
VLSFO2020 = "VLSFO2020",
|
|
145
|
+
VLSLFO2020 = "VLSLFO2020",
|
|
146
|
+
B100LFO = "B100LFO",
|
|
147
|
+
B100MGO = "B100MGO",
|
|
148
|
+
B10LFO = "B10LFO",
|
|
149
|
+
B10MGO = "B10MGO",
|
|
150
|
+
B20LFO = "B20LFO",
|
|
151
|
+
B24LFO = "B24LFO",
|
|
152
|
+
B30LFO = "B30LFO",
|
|
153
|
+
B50MGO = "B50MGO",
|
|
154
|
+
BioLFO = "BioLFO",
|
|
155
|
+
BioMGO = "BioMGO",
|
|
156
|
+
Other = "Other"
|
|
157
|
+
}
|
|
158
|
+
export declare enum OvdInterfaceCode {
|
|
159
|
+
OVDLA = "OVDLA",
|
|
160
|
+
OVDBR = "OVDBR"
|
|
161
|
+
}
|
|
162
|
+
export declare abstract class OvdTemplate {
|
|
163
|
+
abstract get version(): string;
|
|
164
|
+
abstract fieldDefs(code: OvdInterfaceCode): OvdField[];
|
|
165
|
+
/** 表头字段名, 顺序与文档一致 */
|
|
166
|
+
fields(code: OvdInterfaceCode): string[];
|
|
167
|
+
/**
|
|
168
|
+
* 度分格式 + 半球标识 (OVD 要求 dd° mm.mm' N/S/E/W)
|
|
169
|
+
*/
|
|
170
|
+
formatCoordinate(value: number, type: 'lat' | 'lng'): {
|
|
171
|
+
hemisphere: string;
|
|
172
|
+
degrees: number;
|
|
173
|
+
minutes: string;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Noon 报告类型 → OVD 事件名 (BOSP/EOSP 为 OVD 已知事件名, 其余原样透传)
|
|
177
|
+
*/
|
|
178
|
+
mapEvent(type: string): string;
|
|
179
|
+
/**
|
|
180
|
+
* 船报 PortActivity 文本 → OVD 挂靠目的 (Purposes_Of_Call 仅接受文档支持的关键字)
|
|
181
|
+
* 无法识别的取值返回 '' (如 ARMED GUARDS), 避免上传非法关键字
|
|
182
|
+
*/
|
|
183
|
+
mapPortCallPurpose(value: string): string;
|
|
184
|
+
/**
|
|
185
|
+
* 按字段类型校验数据(首行为表头), 返回校验错误列表, 空数组表示通过
|
|
186
|
+
* 校验规则: 日期/时间格式, 数值类型, 文本长度, 文本中不允许出现单双引号(OVD 3.10 起), IMO 7位整数
|
|
187
|
+
*/
|
|
188
|
+
validate(data: string[][], code?: OvdInterfaceCode): OvdValidateError[];
|
|
189
|
+
toCsv(data: string[][]): Buffer;
|
|
190
|
+
}
|
|
191
|
+
export declare class OvdTemplateV313 extends OvdTemplate {
|
|
192
|
+
readonly version = "3.13";
|
|
193
|
+
fieldDefs(code: OvdInterfaceCode): OvdField[];
|
|
194
|
+
private readonly logAbstractDefs;
|
|
195
|
+
private readonly bunkerReportDefs;
|
|
196
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orm-plugin/ghg-data-converter",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "orm plugin for GHG data conversion & reporting (veracity/ccs)",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"orm",
|
|
9
|
+
"ghg",
|
|
10
|
+
"veracity",
|
|
11
|
+
"ccs"
|
|
12
|
+
],
|
|
13
|
+
"author": "chenheng@idmwx.com",
|
|
14
|
+
"contributors": [
|
|
15
|
+
"ChenHeng"
|
|
16
|
+
],
|
|
17
|
+
"license": "GPL-3.0",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"main": "./dist/index.umd.cjs",
|
|
22
|
+
"module": "./dist/index.js",
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "vite --config ./build/base.config.ts",
|
|
26
|
+
"build": "vite build --config ./build/lib.config.ts",
|
|
27
|
+
"lint:fix": "eslint --fix --ext .js,.ts,.",
|
|
28
|
+
"prettier": "yarn lint:fix && prettier --write '**/*.{js,ts}'",
|
|
29
|
+
"release": "yarn build && yarn publish --access public"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"axios": "^1.7.9",
|
|
33
|
+
"crypto-js": "^4.2.0",
|
|
34
|
+
"form-data": "^4.0.0",
|
|
35
|
+
"moment": "^2.30.1"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/crypto-js": "^4.2.2",
|
|
39
|
+
"@types/jest": "^29.5.14",
|
|
40
|
+
"@types/node": "^18.14.2",
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^5.53.0",
|
|
42
|
+
"@typescript-eslint/parser": "^5.53.0",
|
|
43
|
+
"eslint": "^8.35.0",
|
|
44
|
+
"eslint-config-prettier": "^8.6.0",
|
|
45
|
+
"eslint-define-config": "^1.15.0",
|
|
46
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
47
|
+
"jest": "^29.7.0",
|
|
48
|
+
"lint-staged": "^13.1.2",
|
|
49
|
+
"prettier": "^2.8.4",
|
|
50
|
+
"simple-git-hooks": "^2.8.1",
|
|
51
|
+
"ts-jest": "^29.2.5",
|
|
52
|
+
"typescript": "^4.9.3",
|
|
53
|
+
"vite": "^4.1.0",
|
|
54
|
+
"vite-plugin-dts": "^3.9.0"
|
|
55
|
+
},
|
|
56
|
+
"lint-staged": {
|
|
57
|
+
"*.{ts,tsx,js}": "eslint --fix",
|
|
58
|
+
"*.{ts,tsx,js,scss}": "prettier --write"
|
|
59
|
+
},
|
|
60
|
+
"simple-git-hooks": {
|
|
61
|
+
"pre-commit": "yarn exec lint-staged"
|
|
62
|
+
}
|
|
63
|
+
}
|