webpb 0.0.27 → 0.0.29
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/dist/index.cjs +1 -1
- package/dist/index.mjs +26 -9
- package/package.json +1 -1
- package/proto/webpb/WebpbExtend.proto +1 -1
- package/webpb-version.properties +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function t(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function n(e){if(!t(e))return;let n=e;if(typeof n.toAlias==`function`)return n.toAlias.bind(e);if(typeof n.toWebpbAlias==`function`)return n.toWebpbAlias.bind(e)}function r(e){return n(e)!==void 0}function i(e){let t=n(e);return t?t():e}function a(n,r
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function t(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function n(e){if(!t(e))return;let n=e;if(typeof n.toAlias==`function`)return n.toAlias.bind(e);if(typeof n.toWebpbAlias==`function`)return n.toWebpbAlias.bind(e)}function r(e){return n(e)!==void 0}function i(e){let t=n(e);return t?t():e}function a(e){let t={};for(let[n,r]of Object.entries(e))typeof r!=`function`&&(t[n]=r);return t}function o(t){if(t==null)return null;if(e(t))return t;if(typeof t!=`object`||Array.isArray(t))return null;let n=t;if(typeof n.toWebpbAlias==`function`){let r=n.toWebpbAlias.call(t);if(e(r))return r}return a(t)}function s(e,n,r=[]){let i=o(e);if(!i||!t(n))return;let a=new Set(r);for(let[e,t]of Object.entries(i))t!==void 0&&!a.has(e)&&(n[e]=t)}function c(e,n){if(e==null)return null;let r=n.split(`.`).filter(e=>e.length>0);if(r.length===0)return e;let i=e;for(let e of r)if(!t(i)||(i=i[e],i==null))return null;return i}function l(t,n){let r=[],i=(e,t)=>{e&&t&&r.push(`${e}=${encodeURIComponent(t)}`)};for(let[t,r]of Object.entries(n))if(!(r==null||typeof r==`function`)){if(Array.isArray(r)){r.length>0&&i(t,r.join(`,`));continue}if(e(r)){for(let e of Object.keys(r)){let n=r[e];n==null||n===``?e&&i(t,e):e&&i(t,`${e},${n}`)}continue}i(t,String(r))}return r.length?`${t}${r.join(`&`)}`:``}function u(t,n){if(!e(t))return t;let a={};for(let[e,o]of Object.entries(t))r(o)?a[e]=i(o):n[e]?a[n[e]]=o:a[e]=o;return a}function d(t,n){return e(t)?Object.entries(t).reduce((e,[t,r])=>(e[t]=n(r),e),{}):{}}exports.assign=s,exports.getter=c,exports.mapValues=d,exports.query=l,exports.toAlias=u;
|
package/dist/index.mjs
CHANGED
|
@@ -20,12 +20,29 @@ function i(e) {
|
|
|
20
20
|
let t = n(e);
|
|
21
21
|
return t ? t() : e;
|
|
22
22
|
}
|
|
23
|
-
function a(
|
|
24
|
-
|
|
25
|
-
let
|
|
26
|
-
|
|
23
|
+
function a(e) {
|
|
24
|
+
let t = {};
|
|
25
|
+
for (let [n, r] of Object.entries(e)) typeof r != "function" && (t[n] = r);
|
|
26
|
+
return t;
|
|
27
27
|
}
|
|
28
|
-
function o(
|
|
28
|
+
function o(t) {
|
|
29
|
+
if (t == null) return null;
|
|
30
|
+
if (e(t)) return t;
|
|
31
|
+
if (typeof t != "object" || Array.isArray(t)) return null;
|
|
32
|
+
let n = t;
|
|
33
|
+
if (typeof n.toWebpbAlias == "function") {
|
|
34
|
+
let r = n.toWebpbAlias.call(t);
|
|
35
|
+
if (e(r)) return r;
|
|
36
|
+
}
|
|
37
|
+
return a(t);
|
|
38
|
+
}
|
|
39
|
+
function s(e, n, r = []) {
|
|
40
|
+
let i = o(e);
|
|
41
|
+
if (!i || !t(n)) return;
|
|
42
|
+
let a = new Set(r);
|
|
43
|
+
for (let [e, t] of Object.entries(i)) t !== void 0 && !a.has(e) && (n[e] = t);
|
|
44
|
+
}
|
|
45
|
+
function c(e, n) {
|
|
29
46
|
if (e == null) return null;
|
|
30
47
|
let r = n.split(".").filter((e) => e.length > 0);
|
|
31
48
|
if (r.length === 0) return e;
|
|
@@ -33,7 +50,7 @@ function o(e, n) {
|
|
|
33
50
|
for (let e of r) if (!t(i) || (i = i[e], i == null)) return null;
|
|
34
51
|
return i;
|
|
35
52
|
}
|
|
36
|
-
function
|
|
53
|
+
function l(t, n) {
|
|
37
54
|
let r = [], i = (e, t) => {
|
|
38
55
|
e && t && r.push(`${e}=${encodeURIComponent(t)}`);
|
|
39
56
|
};
|
|
@@ -53,14 +70,14 @@ function s(t, n) {
|
|
|
53
70
|
}
|
|
54
71
|
return r.length ? `${t}${r.join("&")}` : "";
|
|
55
72
|
}
|
|
56
|
-
function
|
|
73
|
+
function u(t, n) {
|
|
57
74
|
if (!e(t)) return t;
|
|
58
75
|
let a = {};
|
|
59
76
|
for (let [e, o] of Object.entries(t)) r(o) ? a[e] = i(o) : n[e] ? a[n[e]] = o : a[e] = o;
|
|
60
77
|
return a;
|
|
61
78
|
}
|
|
62
|
-
function
|
|
79
|
+
function d(t, n) {
|
|
63
80
|
return e(t) ? Object.entries(t).reduce((e, [t, r]) => (e[t] = n(r), e), {}) : {};
|
|
64
81
|
}
|
|
65
82
|
//#endregion
|
|
66
|
-
export {
|
|
83
|
+
export { s as assign, c as getter, d as mapValues, l as query, u as toAlias };
|
package/package.json
CHANGED
|
@@ -54,6 +54,7 @@ message OptMessageOpts {
|
|
|
54
54
|
repeated string implements = 1005;
|
|
55
55
|
optional string sub_type = 1006;
|
|
56
56
|
repeated string sub_values = 1007;
|
|
57
|
+
optional int32 alias_reserve = 1008;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
message JavaMessageOpts {
|
|
@@ -63,7 +64,6 @@ message JavaMessageOpts {
|
|
|
63
64
|
|
|
64
65
|
message TsMessageOpts {
|
|
65
66
|
optional bool auto_alias = 1000;
|
|
66
|
-
optional int32 alias_reserve = 1001;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// enum options
|
package/webpb-version.properties
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
webpbVersion=0.0.
|
|
1
|
+
webpbVersion=0.0.29
|
|
2
2
|
protobufVersion=4.35.0
|