@cm-sigoo-temp/ui 0.2.16 → 0.2.18

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.
@@ -1,2 +1,2 @@
1
- import{createWriteStream as f,existsSync as p}from"node:fs";import{copyFile as _,mkdir as h,stat as T}from"node:fs/promises";import{get as S}from"node:https";import{tmpdir as O}from"node:os";import{dirname as b,join as m,resolve as l}from"node:path";import{fileURLToPath as v}from"node:url";var I=v(import.meta.url),M=b(I),U=O(),y="cm-sigoo-temp-ui-temp",a=m(U,y),s=m(a,"silent-check-sso.html"),x=new URL("/silent-check-sso.html","https://cm-sigoo-temp-ui-dev.firebaseapp.com"),c=async()=>{let t=f(s);await new Promise((e,i)=>S(x,r=>{r.pipe(t),t.on("finish",()=>e(null)),t.on("error",o=>i(o))}))},n=new Date;n.setHours(0);n.setMinutes(0);n.setSeconds(0);n.setMilliseconds(0);n.setDate(n.getDate()-1);var d=t=>async e=>{if(!t||e)return;p(a)||await h(a),p(s)||await c(),(await T(s)).birthtime<=n&&c();let r=l(M,"../../../../../","dist"),o=l(r,"silent-check-sso.html");await _(s,o)};function u(t){let e=r=>Array.isArray(t.build?.rollupOptions?.output)?{react:"react","react-dom":"react-dom"}:typeof t.build?.rollupOptions?.output?.globals=="function"?t.build.rollupOptions.output.globals(r):{...t.build?.rollupOptions?.output?.globals,react:"react","react-dom":"react-dom"},i=Array.isArray(t.build?.rollupOptions?.output)?[...t.build.rollupOptions.output,{globals:e}]:{...t.build?.rollupOptions?.output,globals:e};return{...t,build:{...t.build,rollupOptions:{...t.build?.rollupOptions,external:["react","react-dom"],output:i}}}}var g=(t,e)=>i=>{let o={tag:"script",attrs:{type:"importmap",content:JSON.stringify({react:"https://esm.sh/react@latest&dev","react-dom":"https://esm.sh/react-dom@latest&dev","@cm-sigoo-temp/ui":"https://cm-sigoo-temp-ui-dev.firebaseapp.com/lib/cm-sigoo-temp-ui.js"})},injectTo:"head-prepend"};return{html:i,tags:[{tag:"meta",attrs:{charset:"UTF-8"},injectTo:"head-prepend"},{tag:"meta",attrs:{name:"viewport",content:"width=device-width, initial-scale=1.0"},injectTo:"head-prepend"},{tag:"title",children:t,injectTo:"head-prepend"},{tag:"link",attrs:{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons"},injectTo:"head-prepend"},{tag:"link",attrs:{rel:"icon",type:"image/png",href:"https://cm-sigoo-temp-ui-dev.firebaseapp.com/favicon-96x96.png",sizes:"96x96"},injectTo:"head-prepend"},{tag:"link",attrs:{rel:"icon",type:"image/svg+xml",href:"https://cm-sigoo-temp-ui-dev.firebaseapp.com/favicon.svg"},injectTo:"head-prepend"},{tag:"link",attrs:{rel:"apple-touch-icon",sizes:"180x180",href:"https://cm-sigoo-temp-ui-dev.firebaseapp.com/apple-touch-icon.png"},injectTo:"head-prepend"},...e?[o]:[]]}};function $(t){let{nombre:e}=typeof t=="string"?{nombre:t}:t,i=`Sigoo ${e} - Coordinadora S.A`,r;return{name:"cm-sigoo-temp-ui-app",config:u,configResolved(o){r=o},transformIndexHtml(...o){return g(i,r.command==="build")(...o)},closeBundle(o){return d(r.command==="build")(o)}}}export{$ as default};
1
+ import{createWriteStream as f,existsSync as a}from"node:fs";import{copyFile as _,mkdir as h,stat as T}from"node:fs/promises";import{get as S}from"node:https";import{tmpdir as O}from"node:os";import{dirname as b,join as m,resolve as l}from"node:path";import{fileURLToPath as v}from"node:url";var I=v(import.meta.url),M=b(I),U=O(),y="cm-sigoo-temp-ui-temp",p=m(U,y),s=m(p,"silent-check-sso.html"),x=new URL("/silent-check-sso.html","https://cm-sigoo-temp-ui-dev.firebaseapp.com"),c=async()=>{let t=f(s);await new Promise((e,i)=>S(x,r=>{r.pipe(t),t.on("finish",()=>e(null)),t.on("error",o=>i(o))}))},n=new Date;n.setHours(0);n.setMinutes(0);n.setSeconds(0);n.setMilliseconds(0);n.setDate(n.getDate()-1);var d=t=>async e=>{if(!t||e)return;a(p)||await h(p),a(s)||await c(),(await T(s)).birthtime<=n&&c();let r=l(M,"../../../../../","dist"),o=l(r,"silent-check-sso.html");await _(s,o)};function u(t){let e=r=>Array.isArray(t.build?.rollupOptions?.output)?{react:"react","react-dom":"react-dom"}:typeof t.build?.rollupOptions?.output?.globals=="function"?t.build.rollupOptions.output.globals(r):{...t.build?.rollupOptions?.output?.globals,react:"react","react-dom":"react-dom"},i=Array.isArray(t.build?.rollupOptions?.output)?[...t.build.rollupOptions.output,{globals:e}]:{...t.build?.rollupOptions?.output,globals:e};return{...t,build:{...t.build,rollupOptions:{...t.build?.rollupOptions,external:["react","react-dom"],output:i}}}}var g=(t,e)=>i=>{let o={tag:"script",attrs:{type:"importmap"},children:JSON.stringify({imports:{react:"https://esm.sh/react@latest&dev","react-dom":"https://esm.sh/react-dom@latest&dev","@cm-sigoo-temp/ui":"https://cm-sigoo-temp-ui-dev.firebaseapp.com/lib/cm-sigoo-temp-ui.js"}}),injectTo:"head-prepend"};return{html:i,tags:[{tag:"meta",attrs:{charset:"UTF-8"},injectTo:"head-prepend"},{tag:"meta",attrs:{name:"viewport",content:"width=device-width, initial-scale=1.0"},injectTo:"head-prepend"},{tag:"title",children:t,injectTo:"head-prepend"},{tag:"link",attrs:{rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons"},injectTo:"head-prepend"},{tag:"link",attrs:{rel:"icon",type:"image/png",href:"https://cm-sigoo-temp-ui-dev.firebaseapp.com/favicon-96x96.png",sizes:"96x96"},injectTo:"head-prepend"},{tag:"link",attrs:{rel:"icon",type:"image/svg+xml",href:"https://cm-sigoo-temp-ui-dev.firebaseapp.com/favicon.svg"},injectTo:"head-prepend"},{tag:"link",attrs:{rel:"apple-touch-icon",sizes:"180x180",href:"https://cm-sigoo-temp-ui-dev.firebaseapp.com/apple-touch-icon.png"},injectTo:"head-prepend"},...e?[o]:[]]}};function $(t){let{nombre:e}=typeof t=="string"?{nombre:t}:t,i=`Sigoo ${e} - Coordinadora S.A`,r;return{name:"cm-sigoo-temp-ui-app",config:u,configResolved(o){r=o},transformIndexHtml(...o){return g(i,r.command==="build")(...o)},closeBundle(o){return d(r.command==="build")(o)}}}export{$ as default};
2
2
  //# sourceMappingURL=app.plugin.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../node/vite/app/closeBundle.ts","../../node/vite/app/config.ts","../../node/vite/app/transformIndexHtml.ts","../../node/vite/app/app.plugin.ts"],"sourcesContent":["import { createWriteStream, existsSync } from 'node:fs';\nimport { copyFile, mkdir, stat } from 'node:fs/promises';\nimport { get } from 'node:https';\nimport { tmpdir } from 'node:os';\nimport { dirname, join, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\nconst temp = tmpdir();\nconst tempDir = 'cm-sigoo-temp-ui-temp';\n\nconst rutaTemp = join(temp, tempDir);\nconst rutaSCSso = join(rutaTemp, 'silent-check-sso.html');\n\nconst urlSCSso = new URL(\n '/silent-check-sso.html',\n process.env.URL__CM_SIGOO_TEMP_UI,\n);\n\nconst downloadSCSso = async () => {\n const file = createWriteStream(rutaSCSso);\n await new Promise((resolve, reject) =>\n get(urlSCSso, (response) => {\n response.pipe(file);\n file.on('finish', () => resolve(null));\n file.on('error', (error) => reject(error));\n }),\n );\n};\n\nconst fechaComparacion = new Date();\nfechaComparacion.setHours(0);\nfechaComparacion.setMinutes(0);\nfechaComparacion.setSeconds(0);\nfechaComparacion.setMilliseconds(0);\nfechaComparacion.setDate(fechaComparacion.getDate() - 1);\n\nexport const getCloseBundle = (build: boolean) => async (error?: Error) => {\n if (!build || error) return;\n\n if (!existsSync(rutaTemp)) await mkdir(rutaTemp);\n if (!existsSync(rutaSCSso)) await downloadSCSso();\n\n const tempSCSsoStat = await stat(rutaSCSso);\n if (tempSCSsoStat.birthtime <= fechaComparacion) downloadSCSso();\n\n const rutaDist = resolve(__dirname, '../../../../../', 'dist');\n const rutaDistSCSso = resolve(rutaDist, 'silent-check-sso.html');\n\n await copyFile(rutaSCSso, rutaDistSCSso);\n};\n","import { UserConfig } from 'vite';\n\nexport function config(userConfig: UserConfig) {\n const globals = (name: string) =>\n Array.isArray(userConfig.build?.rollupOptions?.output)\n ? {\n react: 'react',\n 'react-dom': 'react-dom',\n }\n : typeof userConfig.build?.rollupOptions?.output?.globals === 'function'\n ? userConfig.build.rollupOptions.output.globals(name)\n : {\n ...userConfig.build?.rollupOptions?.output?.globals,\n react: 'react',\n 'react-dom': 'react-dom',\n };\n\n const output = Array.isArray(userConfig.build?.rollupOptions?.output)\n ? [...userConfig.build.rollupOptions.output, { globals }]\n : {\n ...userConfig.build?.rollupOptions?.output,\n globals,\n };\n\n return {\n ...userConfig,\n build: {\n ...userConfig.build,\n rollupOptions: {\n ...userConfig.build?.rollupOptions,\n external: ['react', 'react-dom'],\n output,\n },\n },\n } as UserConfig;\n}\n","import { HtmlTagDescriptor, IndexHtmlTransformHook } from 'vite';\n\nexport const getTransformIndexHtml =\n (titulo: string, build: boolean): IndexHtmlTransformHook =>\n (html) => {\n const importmap = {\n react: process.env.URL__IMPORTMAP__REACT,\n 'react-dom': process.env.URL__IMPORTMAP__REACT_DOM,\n '@cm-sigoo-temp/ui': `${process.env.URL__CM_SIGOO_TEMP_UI}/lib/cm-sigoo-temp-ui.js`,\n };\n\n const importmapScriptTag: HtmlTagDescriptor = {\n tag: 'script',\n attrs: {\n type: 'importmap',\n content: JSON.stringify(importmap),\n },\n injectTo: 'head-prepend',\n };\n\n return {\n html,\n tags: [\n {\n tag: 'meta',\n attrs: {\n charset: 'UTF-8',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'meta',\n attrs: {\n name: 'viewport',\n content: 'width=device-width, initial-scale=1.0',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'title',\n children: titulo,\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'stylesheet',\n href: 'https://fonts.googleapis.com/icon?family=Material+Icons',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'icon',\n type: 'image/png',\n href: `${process.env.URL__CM_SIGOO_TEMP_UI}/favicon-96x96.png`,\n sizes: '96x96',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'icon',\n type: 'image/svg+xml',\n href: `${process.env.URL__CM_SIGOO_TEMP_UI}/favicon.svg`,\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'apple-touch-icon',\n sizes: '180x180',\n href: `${process.env.URL__CM_SIGOO_TEMP_UI}/apple-touch-icon.png`,\n },\n injectTo: 'head-prepend',\n },\n ...(build ? [importmapScriptTag] : []),\n ],\n };\n };\n","import { Plugin, ResolvedConfig } from 'vite';\nimport { getCloseBundle } from './closeBundle.ts';\nimport { config } from './config.ts';\nimport { getTransformIndexHtml } from './transformIndexHtml.ts';\n\nexport type ViteAppPluginOptions =\n | {\n nombre: string;\n }\n | string;\n\nexport default function (options: ViteAppPluginOptions): Plugin {\n const { nombre } =\n typeof options === 'string' ? { nombre: options } : options;\n\n const titulo = `Sigoo ${nombre} - Coordinadora S.A`;\n\n let resolvedConfig: ResolvedConfig;\n\n return {\n name: 'cm-sigoo-temp-ui-app',\n\n config,\n\n configResolved(endConfig) {\n resolvedConfig = endConfig;\n },\n\n transformIndexHtml(...args) {\n return getTransformIndexHtml(\n titulo,\n resolvedConfig.command === 'build',\n )(...args);\n },\n\n closeBundle(error) {\n return getCloseBundle(resolvedConfig.command === 'build')(error);\n },\n };\n}\n"],"mappings":"AAAA,OAAS,qBAAAA,EAAmB,cAAAC,MAAkB,UAC9C,OAAS,YAAAC,EAAU,SAAAC,EAAO,QAAAC,MAAY,mBACtC,OAAS,OAAAC,MAAW,aACpB,OAAS,UAAAC,MAAc,UACvB,OAAS,WAAAC,EAAS,QAAAC,EAAM,WAAAC,MAAe,YACvC,OAAS,iBAAAC,MAAqB,WAE9B,IAAMC,EAAaD,EAAc,YAAY,GAAG,EAC1CE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,OAAOD,GAAY,SAAW,CAAE,OAAQA,CAAQ,EAAIA,EAEhDE,EAAS,SAASD,CAAM,sBAE1BE,EAEJ,MAAO,CACL,KAAM,uBAEN,OAAAC,EAEA,eAAeC,EAAW,CACxBF,EAAiBE,CACnB,EAEA,sBAAsBC,EAAM,CAC1B,OAAOC,EACLL,EACAC,EAAe,UAAY,OAC7B,EAAE,GAAGG,CAAI,CACX,EAEA,YAAYE,EAAO,CACjB,OAAOC,EAAeN,EAAe,UAAY,OAAO,EAAEK,CAAK,CACjE,CACF,CACF","names":["createWriteStream","existsSync","copyFile","mkdir","stat","get","tmpdir","dirname","join","resolve","fileURLToPath","__filename","__dirname","temp","tempDir","rutaTemp","rutaSCSso","urlSCSso","downloadSCSso","file","reject","response","error","fechaComparacion","getCloseBundle","build","rutaDist","rutaDistSCSso","config","userConfig","globals","name","output","getTransformIndexHtml","titulo","build","html","importmapScriptTag","app_plugin_default","options","nombre","titulo","resolvedConfig","config","endConfig","args","getTransformIndexHtml","error","getCloseBundle"]}
1
+ {"version":3,"sources":["../../node/vite/app/closeBundle.ts","../../node/vite/app/config.ts","../../node/vite/app/transformIndexHtml.ts","../../node/vite/app/app.plugin.ts"],"sourcesContent":["import { createWriteStream, existsSync } from 'node:fs';\nimport { copyFile, mkdir, stat } from 'node:fs/promises';\nimport { get } from 'node:https';\nimport { tmpdir } from 'node:os';\nimport { dirname, join, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\nconst temp = tmpdir();\nconst tempDir = 'cm-sigoo-temp-ui-temp';\n\nconst rutaTemp = join(temp, tempDir);\nconst rutaSCSso = join(rutaTemp, 'silent-check-sso.html');\n\nconst urlSCSso = new URL(\n '/silent-check-sso.html',\n process.env.URL__CM_SIGOO_TEMP_UI,\n);\n\nconst downloadSCSso = async () => {\n const file = createWriteStream(rutaSCSso);\n await new Promise((resolve, reject) =>\n get(urlSCSso, (response) => {\n response.pipe(file);\n file.on('finish', () => resolve(null));\n file.on('error', (error) => reject(error));\n }),\n );\n};\n\nconst fechaComparacion = new Date();\nfechaComparacion.setHours(0);\nfechaComparacion.setMinutes(0);\nfechaComparacion.setSeconds(0);\nfechaComparacion.setMilliseconds(0);\nfechaComparacion.setDate(fechaComparacion.getDate() - 1);\n\nexport const getCloseBundle = (build: boolean) => async (error?: Error) => {\n if (!build || error) return;\n\n if (!existsSync(rutaTemp)) await mkdir(rutaTemp);\n if (!existsSync(rutaSCSso)) await downloadSCSso();\n\n const tempSCSsoStat = await stat(rutaSCSso);\n if (tempSCSsoStat.birthtime <= fechaComparacion) downloadSCSso();\n\n const rutaDist = resolve(__dirname, '../../../../../', 'dist');\n const rutaDistSCSso = resolve(rutaDist, 'silent-check-sso.html');\n\n await copyFile(rutaSCSso, rutaDistSCSso);\n};\n","import { UserConfig } from 'vite';\n\nexport function config(userConfig: UserConfig) {\n const globals = (name: string) =>\n Array.isArray(userConfig.build?.rollupOptions?.output)\n ? {\n react: 'react',\n 'react-dom': 'react-dom',\n }\n : typeof userConfig.build?.rollupOptions?.output?.globals === 'function'\n ? userConfig.build.rollupOptions.output.globals(name)\n : {\n ...userConfig.build?.rollupOptions?.output?.globals,\n react: 'react',\n 'react-dom': 'react-dom',\n };\n\n const output = Array.isArray(userConfig.build?.rollupOptions?.output)\n ? [...userConfig.build.rollupOptions.output, { globals }]\n : {\n ...userConfig.build?.rollupOptions?.output,\n globals,\n };\n\n return {\n ...userConfig,\n build: {\n ...userConfig.build,\n rollupOptions: {\n ...userConfig.build?.rollupOptions,\n external: ['react', 'react-dom'],\n output,\n },\n },\n } as UserConfig;\n}\n","import { HtmlTagDescriptor, IndexHtmlTransformHook } from 'vite';\n\nexport const getTransformIndexHtml =\n (titulo: string, build: boolean): IndexHtmlTransformHook =>\n (html) => {\n const importmap = {\n imports: {\n react: process.env.URL__IMPORTMAP__REACT,\n 'react-dom': process.env.URL__IMPORTMAP__REACT_DOM,\n '@cm-sigoo-temp/ui': `${process.env.URL__CM_SIGOO_TEMP_UI}/lib/cm-sigoo-temp-ui.js`,\n },\n };\n\n const importmapScriptTag: HtmlTagDescriptor = {\n tag: 'script',\n attrs: {\n type: 'importmap',\n },\n children: JSON.stringify(importmap),\n injectTo: 'head-prepend',\n };\n\n return {\n html,\n tags: [\n {\n tag: 'meta',\n attrs: {\n charset: 'UTF-8',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'meta',\n attrs: {\n name: 'viewport',\n content: 'width=device-width, initial-scale=1.0',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'title',\n children: titulo,\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'stylesheet',\n href: 'https://fonts.googleapis.com/icon?family=Material+Icons',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'icon',\n type: 'image/png',\n href: `${process.env.URL__CM_SIGOO_TEMP_UI}/favicon-96x96.png`,\n sizes: '96x96',\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'icon',\n type: 'image/svg+xml',\n href: `${process.env.URL__CM_SIGOO_TEMP_UI}/favicon.svg`,\n },\n injectTo: 'head-prepend',\n },\n {\n tag: 'link',\n attrs: {\n rel: 'apple-touch-icon',\n sizes: '180x180',\n href: `${process.env.URL__CM_SIGOO_TEMP_UI}/apple-touch-icon.png`,\n },\n injectTo: 'head-prepend',\n },\n ...(build ? [importmapScriptTag] : []),\n ],\n };\n };\n","import { Plugin, ResolvedConfig } from 'vite';\nimport { getCloseBundle } from './closeBundle.ts';\nimport { config } from './config.ts';\nimport { getTransformIndexHtml } from './transformIndexHtml.ts';\n\nexport type ViteAppPluginOptions =\n | {\n nombre: string;\n }\n | string;\n\nexport default function (options: ViteAppPluginOptions): Plugin {\n const { nombre } =\n typeof options === 'string' ? { nombre: options } : options;\n\n const titulo = `Sigoo ${nombre} - Coordinadora S.A`;\n\n let resolvedConfig: ResolvedConfig;\n\n return {\n name: 'cm-sigoo-temp-ui-app',\n\n config,\n\n configResolved(endConfig) {\n resolvedConfig = endConfig;\n },\n\n transformIndexHtml(...args) {\n return getTransformIndexHtml(\n titulo,\n resolvedConfig.command === 'build',\n )(...args);\n },\n\n closeBundle(error) {\n return getCloseBundle(resolvedConfig.command === 'build')(error);\n },\n };\n}\n"],"mappings":"AAAA,OAAS,qBAAAA,EAAmB,cAAAC,MAAkB,UAC9C,OAAS,YAAAC,EAAU,SAAAC,EAAO,QAAAC,MAAY,mBACtC,OAAS,OAAAC,MAAW,aACpB,OAAS,UAAAC,MAAc,UACvB,OAAS,WAAAC,EAAS,QAAAC,EAAM,WAAAC,MAAe,YACvC,OAAS,iBAAAC,MAAqB,WAE9B,IAAMC,EAAaD,EAAc,YAAY,GAAG,EAC1CE,EAAYL,EAAQI,CAAU,EAE9BE,EAAOP,EAAO,EACdQ,EAAU,wBAEVC,EAAWP,EAAKK,EAAMC,CAAO,EAC7BE,EAAYR,EAAKO,EAAU,uBAAuB,EAElDE,EAAW,IAAI,IACnB,yBACA,8CACF,EAEMC,EAAgB,SAAY,CAChC,IAAMC,EAAOnB,EAAkBgB,CAAS,EACxC,MAAM,IAAI,QAAQ,CAACP,EAASW,IAC1Bf,EAAIY,EAAWI,GAAa,CAC1BA,EAAS,KAAKF,CAAI,EAClBA,EAAK,GAAG,SAAU,IAAMV,EAAQ,IAAI,CAAC,EACrCU,EAAK,GAAG,QAAUG,GAAUF,EAAOE,CAAK,CAAC,CAC3C,CAAC,CACH,CACF,EAEMC,EAAmB,IAAI,KAC7BA,EAAiB,SAAS,CAAC,EAC3BA,EAAiB,WAAW,CAAC,EAC7BA,EAAiB,WAAW,CAAC,EAC7BA,EAAiB,gBAAgB,CAAC,EAClCA,EAAiB,QAAQA,EAAiB,QAAQ,EAAI,CAAC,EAEhD,IAAMC,EAAkBC,GAAmB,MAAOH,GAAkB,CACzE,GAAI,CAACG,GAASH,EAAO,OAEhBrB,EAAWc,CAAQ,GAAG,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,SAAU,cACZ,EACA,CACE,IAAK,QACL,SAAUF,EACV,SAAU,cACZ,EACA,CACE,IAAK,OACL,MAAO,CACL,IAAK,aACL,KAAM,yDACR,EACA,SAAU,cACZ,EACA,CACE,IAAK,OACL,MAAO,CACL,IAAK,OACL,KAAM,YACN,KAAM,iEACN,MAAO,OACT,EACA,SAAU,cACZ,EACA,CACE,IAAK,OACL,MAAO,CACL,IAAK,OACL,KAAM,gBACN,KAAM,0DACR,EACA,SAAU,cACZ,EACA,CACE,IAAK,OACL,MAAO,CACL,IAAK,mBACL,MAAO,UACP,KAAM,mEACR,EACA,SAAU,cACZ,EACA,GAAIC,EAAQ,CAACE,CAAkB,EAAI,CAAC,CACtC,CACF,CACF,ECzEa,SAARC,EAAkBC,EAAuC,CAC9D,GAAM,CAAE,OAAAC,CAAO,EACb,OAAOD,GAAY,SAAW,CAAE,OAAQA,CAAQ,EAAIA,EAEhDE,EAAS,SAASD,CAAM,sBAE1BE,EAEJ,MAAO,CACL,KAAM,uBAEN,OAAAC,EAEA,eAAeC,EAAW,CACxBF,EAAiBE,CACnB,EAEA,sBAAsBC,EAAM,CAC1B,OAAOC,EACLL,EACAC,EAAe,UAAY,OAC7B,EAAE,GAAGG,CAAI,CACX,EAEA,YAAYE,EAAO,CACjB,OAAOC,EAAeN,EAAe,UAAY,OAAO,EAAEK,CAAK,CACjE,CACF,CACF","names":["createWriteStream","existsSync","copyFile","mkdir","stat","get","tmpdir","dirname","join","resolve","fileURLToPath","__filename","__dirname","temp","tempDir","rutaTemp","rutaSCSso","urlSCSso","downloadSCSso","file","reject","response","error","fechaComparacion","getCloseBundle","build","rutaDist","rutaDistSCSso","config","userConfig","globals","name","output","getTransformIndexHtml","titulo","build","html","importmapScriptTag","app_plugin_default","options","nombre","titulo","resolvedConfig","config","endConfig","args","getTransformIndexHtml","error","getCloseBundle"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cm-sigoo-temp/ui",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "type": "module",
5
5
  "main": "dist/lib/cm-sigoo-temp-ui.js",
6
6
  "types": "dist/lib/lib.d.ts",