Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@occtoo/destination-client

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@occtoo/destination-client - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15

2

dist/scripts/cli.js
#!/usr/bin/env node
var y=Object.create;var u=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var D=(o,n,e,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of C(n))!_.call(o,t)&&t!==e&&u(o,t,{get:()=>n[t],enumerable:!(s=O(n,t))||s.enumerable});return o};var r=(o,n,e)=>(e=o!=null?y(A(o)):{},D(n||!o||!o.__esModule?u(e,"default",{value:o,enumerable:!0}):e,o));var i=r(require("path")),c=r(require("fs-extra")),a=r(require("dotenv"));var f=r(require("path")),m=r(require("fs-extra")),g=r(require("openapi-typescript"));async function I(o,n){console.log("\u2615 Preparing types...");let e=await(0,g.default)(o),s=f.default.join(n,"types.d.ts");m.default.writeFileSync(s,e)}async function l(){console.log("\u2615 Building client...");let o=process.env.INIT_CWD||process.cwd(),n=a.default.config({path:i.default.join(o,".env")}).parsed?.OCCTOO_DESTINATION_URL+"/openapi",e=i.default.join(o,"node_modules","@occtoo","destination-client"),s=i.default.join(e,"dist"),t=i.default.join(o,"node_modules",".occtoo","destination-client");await c.default.copy(s,t).catch(console.error);let p=i.default.join(t,"index.js"),h=c.default.readFileSync(p,"utf8"),d=a.default.config({path:i.default.join(process.cwd(),".env")}).parsed,w=h.replace("DESTINATION_URL",d?.OCCTOO_DESTINATION_URL).replace("DESTINATION_ID",d?.OCCTOO_DESTINATION_ID);await c.default.writeFileSync(p,w,"utf8");let T=i.default.join(o,"node_modules",".occtoo","destination-client");await I(n,T),console.log("\u{1F680} Client successfully generated!")}async function N(){try{await l()}catch(o){console.error("Aborting installation..."),o instanceof Error?console.error(o):(console.error("An unknown error has occurred. Please open an issue on github with the below:"),console.log(o)),process.exit(1)}}N();var j=async()=>{await l()};j().catch(o=>{console.error("Aborting installation..."),o instanceof Error?console.error(o):(console.error("An unknown error has occurred. Please open an issue on github with the below:"),console.log(o)),process.exit(1)});
var w=Object.create;var p=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var h=(o,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of D(e))!_.call(o,i)&&i!==n&&p(o,i,{get:()=>e[i],enumerable:!(t=y(e,i))||t.enumerable});return o};var c=(o,e,n)=>(n=o!=null?w(N(o)):{},h(e||!o||!o.__esModule?p(n,"default",{value:o,enumerable:!0}):n,o));var s=c(require("path")),r=c(require("fs-extra")),l=c(require("dotenv"));var d=c(require("path")),I=c(require("fs-extra")),m=c(require("openapi-typescript"));async function f(o,e){console.log("\u2615 Preparing types...");let n=await(0,m.default)(o),t=d.default.join(e,"types.d.ts");I.default.writeFileSync(t,n)}async function g(){console.log("\u2615 Building client...");let o=process.env.INIT_CWD||process.cwd(),e=s.default.join(o,"node_modules","@occtoo","destination-client"),n=s.default.join(e,"dist"),t=s.default.join(o,"node_modules",".occtoo","destination-client");await r.default.copy(n,t).catch(console.error),console.log("DESTINATION_DIR:::",t);let i=s.default.join(t,"index.js"),u=r.default.readFileSync(i,"utf8"),a=l.default.config({path:s.default.join(process.cwd(),".env")}).parsed,T=u.replace("DESTINATION_URL",a?.OCCTOO_DESTINATION_URL).replace("DESTINATION_ID",a?.OCCTOO_DESTINATION_ID);await r.default.writeFileSync(i,T,"utf8");let O=s.default.join(o,"node_modules",".occtoo","destination-client"),C=l.default.config({path:s.default.join(process.env.INIT_CWD||process.cwd(),".env")}).parsed?.OCCTOO_DESTINATION_URL+"/openapi";await f(C,O),console.log("\u{1F680} Client successfully generated!")}var A=async()=>{await g()};A().catch(o=>{console.error("Aborting installation..."),o instanceof Error?console.error(o):(console.error("An unknown error has occurred. Please open an issue on github with the below:"),console.log(o)),process.exit(1)});
//# sourceMappingURL=cli.js.map

@@ -1,2 +0,2 @@

var w=Object.create;var c=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var A=(o,e)=>{for(var n in e)c(o,n,{get:e[n],enumerable:!0})},f=(o,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of _(e))!N.call(o,t)&&t!==n&&c(o,t,{get:()=>e[t],enumerable:!(s=C(e,t))||s.enumerable});return o};var r=(o,e,n)=>(n=o!=null?w(D(o)):{},f(e||!o||!o.__esModule?c(n,"default",{value:o,enumerable:!0}):n,o)),j=o=>f(c({},"__esModule",{value:!0}),o);var S={};A(S,{postinstall:()=>T});module.exports=j(S);var i=r(require("path")),a=r(require("fs-extra")),l=r(require("dotenv"));var m=r(require("path")),u=r(require("fs-extra")),I=r(require("openapi-typescript"));async function g(o,e){console.log("\u2615 Preparing types...");let n=await(0,I.default)(o),s=m.default.join(e,"types.d.ts");u.default.writeFileSync(s,n)}async function T(){console.log("\u2615 Building client...");let o=process.env.INIT_CWD||process.cwd(),e=l.default.config({path:i.default.join(o,".env")}).parsed?.OCCTOO_DESTINATION_URL+"/openapi",n=i.default.join(o,"node_modules","@occtoo","destination-client"),s=i.default.join(n,"dist"),t=i.default.join(o,"node_modules",".occtoo","destination-client");await a.default.copy(s,t).catch(console.error);let p=i.default.join(t,"index.js"),O=a.default.readFileSync(p,"utf8"),d=l.default.config({path:i.default.join(process.cwd(),".env")}).parsed,y=O.replace("DESTINATION_URL",d?.OCCTOO_DESTINATION_URL).replace("DESTINATION_ID",d?.OCCTOO_DESTINATION_ID);await a.default.writeFileSync(p,y,"utf8");let h=i.default.join(o,"node_modules",".occtoo","destination-client");await g(e,h),console.log("\u{1F680} Client successfully generated!")}async function F(){try{await T()}catch(o){console.error("Aborting installation..."),o instanceof Error?console.error(o):(console.error("An unknown error has occurred. Please open an issue on github with the below:"),console.log(o)),process.exit(1)}}F();0&&(module.exports={postinstall});
var D=Object.create;var c=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var j=(o,e)=>{for(var n in e)c(o,n,{get:e[n],enumerable:!0})},d=(o,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _(e))!A.call(o,i)&&i!==n&&c(o,i,{get:()=>e[i],enumerable:!(t=N(e,i))||t.enumerable});return o};var r=(o,e,n)=>(n=o!=null?D(h(o)):{},d(e||!o||!o.__esModule?c(n,"default",{value:o,enumerable:!0}):n,o)),x=o=>d(c({},"__esModule",{value:!0}),o);var S={};j(S,{postinstall:()=>g});module.exports=x(S);var s=r(require("path")),a=r(require("fs-extra")),l=r(require("dotenv"));var I=r(require("path")),f=r(require("fs-extra")),m=r(require("openapi-typescript"));async function u(o,e){console.log("\u2615 Preparing types...");let n=await(0,m.default)(o),t=I.default.join(e,"types.d.ts");f.default.writeFileSync(t,n)}async function T(){console.log("\u2615 Building client...");let o=process.env.INIT_CWD||process.cwd(),e=s.default.join(o,"node_modules","@occtoo","destination-client"),n=s.default.join(e,"dist"),t=s.default.join(o,"node_modules",".occtoo","destination-client");await a.default.copy(n,t).catch(console.error),console.log("DESTINATION_DIR:::",t);let i=s.default.join(t,"index.js"),C=a.default.readFileSync(i,"utf8"),p=l.default.config({path:s.default.join(process.cwd(),".env")}).parsed,O=C.replace("DESTINATION_URL",p?.OCCTOO_DESTINATION_URL).replace("DESTINATION_ID",p?.OCCTOO_DESTINATION_ID);await a.default.writeFileSync(i,O,"utf8");let w=s.default.join(o,"node_modules",".occtoo","destination-client"),y=l.default.config({path:s.default.join(process.env.INIT_CWD||process.cwd(),".env")}).parsed?.OCCTOO_DESTINATION_URL+"/openapi";await u(y,w),console.log("\u{1F680} Client successfully generated!")}async function g(){process.env.INIT_CWD===process.cwd()&&process.exit(),await T()}async function F(){try{await g()}catch(o){console.error("Aborting installation..."),o instanceof Error?console.error(o):(console.error("An unknown error has occurred. Please open an issue on github with the below:"),console.log(o)),process.exit(1)}}F();0&&(module.exports={postinstall});
//# sourceMappingURL=postinstall.js.map
{
"name": "@occtoo/destination-client",
"version": "0.0.14",
"version": "0.0.15",
"bin": {

@@ -5,0 +5,0 @@ "generate": "./dist/scripts/cli.js"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc