@calimero-network/mero-react 11.2.0 → 11.4.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 +13 -0
- package/dist/chunk-MMJOGIM5.js +256 -0
- package/dist/chunk-MMJOGIM5.js.map +1 -0
- package/dist/chunk-RRETZWNI.cjs +266 -0
- package/dist/chunk-RRETZWNI.cjs.map +1 -0
- package/dist/index.cjs +881 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +120 -2
- package/dist/index.d.ts +120 -2
- package/dist/index.js +875 -14
- package/dist/index.js.map +1 -1
- package/dist/node-shield.cjs +46 -213
- package/dist/node-shield.cjs.map +1 -1
- package/dist/node-shield.d.cts +10 -23
- package/dist/node-shield.d.ts +10 -23
- package/dist/node-shield.js +42 -209
- package/dist/node-shield.js.map +1 -1
- package/dist/nodeChecks-B_vMN73N.d.cts +37 -0
- package/dist/nodeChecks-B_vMN73N.d.ts +37 -0
- package/package.json +1 -1
- package/dist/chunk-4AKOWHG3.js +0 -30
- package/dist/chunk-4AKOWHG3.js.map +0 -1
- package/dist/chunk-PYCIYVHN.cjs +0 -33
- package/dist/chunk-PYCIYVHN.cjs.map +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CalimeroClient } from '@calimero-network/mero-js';
|
|
2
|
+
|
|
3
|
+
/** What the node shield says about a node, from the check mero-js ran: only what that check verified. */
|
|
4
|
+
|
|
5
|
+
/** Whether the node runs the app's code: `match` only when both hashes are present and equal; anything not checked is `unknown`. */
|
|
6
|
+
type AppCodeCheck = {
|
|
7
|
+
status: 'match';
|
|
8
|
+
appHash: string;
|
|
9
|
+
checkedAt: number;
|
|
10
|
+
package?: string;
|
|
11
|
+
version?: string;
|
|
12
|
+
} | {
|
|
13
|
+
status: 'mismatch';
|
|
14
|
+
appHash: string;
|
|
15
|
+
expected: string;
|
|
16
|
+
} | {
|
|
17
|
+
status: 'unknown';
|
|
18
|
+
reason: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** The app's own check that a node runs its code; memoise it, since a new function checks again. */
|
|
22
|
+
type AppCodeChecker = (client: CalimeroClient, url: string) => Promise<AppCodeCheck>;
|
|
23
|
+
/** The package release a review is about. */
|
|
24
|
+
interface ReviewRelease {
|
|
25
|
+
package: string;
|
|
26
|
+
version: string;
|
|
27
|
+
/** The service of a multi-service release; the card is per service. */
|
|
28
|
+
service?: string;
|
|
29
|
+
}
|
|
30
|
+
/** An app with no published release (a dev bundle, a package with no version): there is no signed card to read. */
|
|
31
|
+
interface UnreleasedApp {
|
|
32
|
+
package: string;
|
|
33
|
+
version?: undefined;
|
|
34
|
+
service?: undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type { AppCodeChecker as A, ReviewRelease as R, UnreleasedApp as U, AppCodeCheck as a };
|
package/package.json
CHANGED
package/dist/chunk-4AKOWHG3.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { createContext } from 'react';
|
|
2
|
-
|
|
3
|
-
// src/context/context.ts
|
|
4
|
-
var MeroContext = createContext(null);
|
|
5
|
-
|
|
6
|
-
// #style-inject:#style-inject
|
|
7
|
-
function styleInject(css, { insertAt } = {}) {
|
|
8
|
-
if (!css || typeof document === "undefined") return;
|
|
9
|
-
const head = document.head || document.getElementsByTagName("head")[0];
|
|
10
|
-
const style = document.createElement("style");
|
|
11
|
-
style.type = "text/css";
|
|
12
|
-
if (insertAt === "top") {
|
|
13
|
-
if (head.firstChild) {
|
|
14
|
-
head.insertBefore(style, head.firstChild);
|
|
15
|
-
} else {
|
|
16
|
-
head.appendChild(style);
|
|
17
|
-
}
|
|
18
|
-
} else {
|
|
19
|
-
head.appendChild(style);
|
|
20
|
-
}
|
|
21
|
-
if (style.styleSheet) {
|
|
22
|
-
style.styleSheet.cssText = css;
|
|
23
|
-
} else {
|
|
24
|
-
style.appendChild(document.createTextNode(css));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { MeroContext, styleInject };
|
|
29
|
-
//# sourceMappingURL=chunk-4AKOWHG3.js.map
|
|
30
|
-
//# sourceMappingURL=chunk-4AKOWHG3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/context/context.ts","#style-inject:#style-inject"],"names":[],"mappings":";;;AAIO,IAAM,WAAA,GAAc,cAAuC,IAAI;;;ACH7C,SAAR,YAA6B,GAAA,EAAK,EAAE,QAAA,EAAS,GAAI,EAAC,EAAG;AAC1D,EAAA,IAAI,CAAC,GAAA,IAAO,OAAO,QAAA,KAAa,WAAA,EAAa;AAE7C,EAAA,MAAM,OAAO,QAAA,CAAS,IAAA,IAAQ,SAAS,oBAAA,CAAqB,MAAM,EAAE,CAAC,CAAA;AACrE,EAAA,MAAM,KAAA,GAAQ,QAAA,CAAS,aAAA,CAAc,OAAO,CAAA;AAC5C,EAAA,KAAA,CAAM,IAAA,GAAO,UAAA;AAEb,EAAA,IAAI,aAAa,KAAA,EAAO;AACtB,IAAA,IAAI,KAAK,UAAA,EAAY;AACnB,MAAA,IAAA,CAAK,YAAA,CAAa,KAAA,EAAO,IAAA,CAAK,UAAU,CAAA;AAAA,IAC1C,CAAA,MAAO;AACL,MAAA,IAAA,CAAK,YAAY,KAAK,CAAA;AAAA,IACxB;AAAA,EACF,CAAA,MAAO;AACL,IAAA,IAAA,CAAK,YAAY,KAAK,CAAA;AAAA,EACxB;AAEA,EAAA,IAAI,MAAM,UAAA,EAAY;AACpB,IAAA,KAAA,CAAM,WAAW,OAAA,GAAU,GAAA;AAAA,EAC7B,CAAA,MAAO;AACL,IAAA,KAAA,CAAM,WAAA,CAAY,QAAA,CAAS,cAAA,CAAe,GAAG,CAAC,CAAA;AAAA,EAChD;AACF","file":"chunk-4AKOWHG3.js","sourcesContent":["import { createContext } from 'react';\nimport type { MeroContextValue } from '../types';\n\n// Its own module so the node-shield entry shares this one context object with the main entry.\nexport const MeroContext = createContext<MeroContextValue | null>(null);\n","\n export default function styleInject(css, { insertAt } = {}) {\n if (!css || typeof document === 'undefined') return\n \n const head = document.head || document.getElementsByTagName('head')[0]\n const style = document.createElement('style')\n style.type = 'text/css'\n \n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild)\n } else {\n head.appendChild(style)\n }\n } else {\n head.appendChild(style)\n }\n \n if (style.styleSheet) {\n style.styleSheet.cssText = css\n } else {\n style.appendChild(document.createTextNode(css))\n }\n }\n "]}
|
package/dist/chunk-PYCIYVHN.cjs
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var react = require('react');
|
|
4
|
-
|
|
5
|
-
// src/context/context.ts
|
|
6
|
-
var MeroContext = react.createContext(null);
|
|
7
|
-
|
|
8
|
-
// #style-inject:#style-inject
|
|
9
|
-
function styleInject(css, { insertAt } = {}) {
|
|
10
|
-
if (!css || typeof document === "undefined") return;
|
|
11
|
-
const head = document.head || document.getElementsByTagName("head")[0];
|
|
12
|
-
const style = document.createElement("style");
|
|
13
|
-
style.type = "text/css";
|
|
14
|
-
if (insertAt === "top") {
|
|
15
|
-
if (head.firstChild) {
|
|
16
|
-
head.insertBefore(style, head.firstChild);
|
|
17
|
-
} else {
|
|
18
|
-
head.appendChild(style);
|
|
19
|
-
}
|
|
20
|
-
} else {
|
|
21
|
-
head.appendChild(style);
|
|
22
|
-
}
|
|
23
|
-
if (style.styleSheet) {
|
|
24
|
-
style.styleSheet.cssText = css;
|
|
25
|
-
} else {
|
|
26
|
-
style.appendChild(document.createTextNode(css));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
exports.MeroContext = MeroContext;
|
|
31
|
-
exports.styleInject = styleInject;
|
|
32
|
-
//# sourceMappingURL=chunk-PYCIYVHN.cjs.map
|
|
33
|
-
//# sourceMappingURL=chunk-PYCIYVHN.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/context/context.ts","#style-inject:#style-inject"],"names":["createContext"],"mappings":";;;;;AAIO,IAAM,WAAA,GAAcA,oBAAuC,IAAI;;;ACH7C,SAAR,YAA6B,GAAA,EAAK,EAAE,QAAA,EAAS,GAAI,EAAC,EAAG;AAC1D,EAAA,IAAI,CAAC,GAAA,IAAO,OAAO,QAAA,KAAa,WAAA,EAAa;AAE7C,EAAA,MAAM,OAAO,QAAA,CAAS,IAAA,IAAQ,SAAS,oBAAA,CAAqB,MAAM,EAAE,CAAC,CAAA;AACrE,EAAA,MAAM,KAAA,GAAQ,QAAA,CAAS,aAAA,CAAc,OAAO,CAAA;AAC5C,EAAA,KAAA,CAAM,IAAA,GAAO,UAAA;AAEb,EAAA,IAAI,aAAa,KAAA,EAAO;AACtB,IAAA,IAAI,KAAK,UAAA,EAAY;AACnB,MAAA,IAAA,CAAK,YAAA,CAAa,KAAA,EAAO,IAAA,CAAK,UAAU,CAAA;AAAA,IAC1C,CAAA,MAAO;AACL,MAAA,IAAA,CAAK,YAAY,KAAK,CAAA;AAAA,IACxB;AAAA,EACF,CAAA,MAAO;AACL,IAAA,IAAA,CAAK,YAAY,KAAK,CAAA;AAAA,EACxB;AAEA,EAAA,IAAI,MAAM,UAAA,EAAY;AACpB,IAAA,KAAA,CAAM,WAAW,OAAA,GAAU,GAAA;AAAA,EAC7B,CAAA,MAAO;AACL,IAAA,KAAA,CAAM,WAAA,CAAY,QAAA,CAAS,cAAA,CAAe,GAAG,CAAC,CAAA;AAAA,EAChD;AACF","file":"chunk-PYCIYVHN.cjs","sourcesContent":["import { createContext } from 'react';\nimport type { MeroContextValue } from '../types';\n\n// Its own module so the node-shield entry shares this one context object with the main entry.\nexport const MeroContext = createContext<MeroContextValue | null>(null);\n","\n export default function styleInject(css, { insertAt } = {}) {\n if (!css || typeof document === 'undefined') return\n \n const head = document.head || document.getElementsByTagName('head')[0]\n const style = document.createElement('style')\n style.type = 'text/css'\n \n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild)\n } else {\n head.appendChild(style)\n }\n } else {\n head.appendChild(style)\n }\n \n if (style.styleSheet) {\n style.styleSheet.cssText = css\n } else {\n style.appendChild(document.createTextNode(css))\n }\n }\n "]}
|