@jpmorganchase/mosaic-cli 0.1.0-beta.97 → 0.1.0-beta.98
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 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as n}from"./chunk-FCNWFPGR.mjs";import{a as s}from"./chunk-A623VBSD.mjs";import{a}from"./chunk-KX3ED265.mjs";import{a as c}from"./chunk-XZI6BLBY.mjs";import p from"fastify";import u from"cors";import g from"@fastify/middie";var l="_mosaic_",r=p({logger:!1,pluginTimeout:2e4});async function y(t,i,o){let m=await n(t);await r.register(g),await r.register(a,{config:t,scope:o,mosaic:m}),await r.register(c),await r.register(s,{prefix:l,enableSourcePush:t.enableSourcePush}),r.get("/actuator/keepalive",async(e,f)=>f.code(200).send("OK")),r.use(u()),await(async()=>{try{await r.listen({port:i}),console.log(`[Mosaic] Listening on port ${i}${Array.isArray(o)?` (scoped to ${o.join(", ")})`:""}`)}catch(e){r.log.error(e),process.exit(1)}})()}export{r as a,y as b};
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as
|
|
2
|
+
import{a as s}from"./chunk-5Q7PLJAC.mjs";import{b as e}from"./chunk-JEFKQLCN.mjs";import{a as n}from"./chunk-P3RXN7HU.mjs";import"./chunk-FCNWFPGR.mjs";import"./chunk-A623VBSD.mjs";import"./chunk-KX3ED265.mjs";import"./chunk-XZI6BLBY.mjs";import{program as r}from"commander";import t from"node:path";import{pathToFileURL as p}from"node:url";r.option("-c, --config <string>","Config path").option("-o, --out <string>","Output directory",".tmp/.mosaic-build").option("-s, --scope <strings>","Command separated namespaces").option("-p, --port <number>","Port to serve on","8080").option("-n, --name <string>","Snapshot name").option("-S, --snapshot <string>","Snapshot path");r.parse();var o=r.opts(),i;if(o.config!==void 0){if(i=await import(p(t.resolve(process.cwd(),o.config)).toString()),!i)throw new Error(`[Mosaic] could not find config file at ${t.resolve(process.cwd(),o.config)}.`)}else throw new Error("[Mosaic] no config file provided");r.args[0]==="build"&&s(i.default,t.resolve(process.cwd(),o.out),o);r.args[0]==="serve"&&e(i.default,o.port,o.scope&&o.scope.split(","));r.args[0]==="upload"&&n(t.resolve(process.cwd(),o.snapshot));
|
package/dist/serve.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-JEFKQLCN.mjs";import"./chunk-FCNWFPGR.mjs";import"./chunk-A623VBSD.mjs";import"./chunk-KX3ED265.mjs";import"./chunk-XZI6BLBY.mjs";export{b as default,a as server};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jpmorganchase/mosaic-cli",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.98",
|
|
4
4
|
"author": "",
|
|
5
5
|
"description": "Mosaic command line scripts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"directory": "packages/cli"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@jpmorganchase/mosaic-types": "^0.1.0-beta.
|
|
43
|
+
"@jpmorganchase/mosaic-types": "^0.1.0-beta.98",
|
|
44
44
|
"@types/ws": "^8.5.7",
|
|
45
45
|
"esbuild": "0.25.0",
|
|
46
46
|
"esbuild-node-externals": "^1.18.0",
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@aws-sdk/client-s3": "^3.859.0",
|
|
51
|
-
"@fastify/middie": "^9.
|
|
51
|
+
"@fastify/middie": "^9.1.0",
|
|
52
52
|
"@fastify/websocket": "^11.0.0",
|
|
53
|
-
"@jpmorganchase/mosaic-core": "^0.1.0-beta.
|
|
54
|
-
"@jpmorganchase/mosaic-plugins": "^0.1.0-beta.
|
|
55
|
-
"@jpmorganchase/mosaic-source-local-folder": "^0.1.0-beta.
|
|
53
|
+
"@jpmorganchase/mosaic-core": "^0.1.0-beta.98",
|
|
54
|
+
"@jpmorganchase/mosaic-plugins": "^0.1.0-beta.98",
|
|
55
|
+
"@jpmorganchase/mosaic-source-local-folder": "^0.1.0-beta.98",
|
|
56
56
|
"commander": "^9.4.1",
|
|
57
57
|
"cors": "^2.8.5",
|
|
58
58
|
"deepmerge": "^4.2.2",
|
|
59
|
-
"fastify": "^5.
|
|
59
|
+
"fastify": "^5.7.3",
|
|
60
60
|
"fastify-plugin": "^5.0.0",
|
|
61
61
|
"globby": "^13.1.3",
|
|
62
62
|
"md5": "*",
|
package/dist/chunk-4JWFWIG4.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"path";import{globby as w}from"globby";import o from"fs";async function j(r,s){let{mode:p,platform:c}=r.deployment;if(p==="snapshot-file"&&c==="vercel"){console.info("[Mosaic] deployment platform is vercel...adding snapshot files to site output trace");let i=process.cwd(),n=e.posix.join(i,".next"),l=s.out,f=s.name??new Date().toISOString();o.existsSync(n)||console.warn("[Mosaic] unable to update nextjs trace file. Build the site before generating the snapshot");let t=e.posix.join(n,"server","pages","[...route].js.nft.json"),m=await w(`**/${l}/${f}/**`,{cwd:i,onlyFiles:!0}),a=JSON.parse(await o.promises.readFile(t,"utf-8"));m.forEach(d=>{let u=e.posix.dirname(t),h=e.posix.relative(u,e.posix.resolve(d));a.files.push(h)}),await o.promises.writeFile(t,JSON.stringify(a))}}export{j as a};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* When deploying a mosaic site to vercel, snapshot files are ignored resulting in a 404 when a page is accessed from the site.
|
|
3
|
-
*
|
|
4
|
-
* Vercel uses output file tracing (https://nextjs.org/docs/advanced-features/output-file-tracing) to determine what files need to be deployed.
|
|
5
|
-
* Due to the dynamic nature of mosaic sites, files that are required, the snapshots, are not traced correctly.
|
|
6
|
-
*
|
|
7
|
-
* This script adds an entry into the [...route].js.nft.json file for each file in the provided snapshot ensuring that the snapshot files are deployed.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export declare function updateTraceFile(config: any, options: any): Promise<void>;
|
package/dist/vercel-snapshot.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-4JWFWIG4.mjs";export{a as updateTraceFile};
|