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