@fangzhongya/vue-archive 0.0.68 → 0.0.69
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/node/index.cjs +15 -16
- package/dist/node/index.js +15 -16
- package/dist/packages/utils/common.cjs +1 -1
- package/dist/packages/utils/common.js +1 -3
- package/package.json +1 -1
package/dist/node/index.cjs
CHANGED
|
@@ -1249,22 +1249,21 @@ function getComponentsArr(urls, v, comRaw, com) {
|
|
|
1249
1249
|
value.component = com[value.key];
|
|
1250
1250
|
value.getRaw = getRawValue(comRaw, value.key);
|
|
1251
1251
|
arr.push(value);
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
}
|
|
1252
|
+
}
|
|
1253
|
+
if (v.comprops && isComprops("/" + k, v.comprops) || v.curprops && isCurprops("/" + k, v.curprops)) {
|
|
1254
|
+
let value2 = {};
|
|
1255
|
+
value2.url = zv;
|
|
1256
|
+
value2.comprops = v.comprops;
|
|
1257
|
+
value2.curprops = v.curprops;
|
|
1258
|
+
value2.value = k;
|
|
1259
|
+
value2.dir = v.dir;
|
|
1260
|
+
value2.cwd = v.cwd;
|
|
1261
|
+
value2.suffix = getSuffix2(key);
|
|
1262
|
+
value2.tdir = tdir;
|
|
1263
|
+
value2.key = key;
|
|
1264
|
+
value2.raw = "";
|
|
1265
|
+
value2.getRaw = getRawValue(comRaw, key);
|
|
1266
|
+
props2.push(value2);
|
|
1268
1267
|
}
|
|
1269
1268
|
});
|
|
1270
1269
|
return {
|
package/dist/node/index.js
CHANGED
|
@@ -1234,22 +1234,21 @@ function getComponentsArr(urls, v, comRaw, com) {
|
|
|
1234
1234
|
value.component = com[value.key];
|
|
1235
1235
|
value.getRaw = getRawValue(comRaw, value.key);
|
|
1236
1236
|
arr.push(value);
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
}
|
|
1237
|
+
}
|
|
1238
|
+
if (v.comprops && isComprops("/" + k, v.comprops) || v.curprops && isCurprops("/" + k, v.curprops)) {
|
|
1239
|
+
let value2 = {};
|
|
1240
|
+
value2.url = zv;
|
|
1241
|
+
value2.comprops = v.comprops;
|
|
1242
|
+
value2.curprops = v.curprops;
|
|
1243
|
+
value2.value = k;
|
|
1244
|
+
value2.dir = v.dir;
|
|
1245
|
+
value2.cwd = v.cwd;
|
|
1246
|
+
value2.suffix = getSuffix2(key);
|
|
1247
|
+
value2.tdir = tdir;
|
|
1248
|
+
value2.key = key;
|
|
1249
|
+
value2.raw = "";
|
|
1250
|
+
value2.getRaw = getRawValue(comRaw, key);
|
|
1251
|
+
props2.push(value2);
|
|
1253
1252
|
}
|
|
1254
1253
|
});
|
|
1255
1254
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./storage.cjs");require("@fangzhongya/utils/basic/object/mergeObject");require("@fangzhongya/utils/basic/array/toggleArray");const N=require("@fangzhongya/utils/name/humpToLine"),R=require("@fangzhongya/utils/name/lineToLargeHump");require("@fangzhongya/utils/basic/string/appearNum");require("@fangzhongya/utils/basic/string/firstLower");require("@fangzhongya/utils/basic/array/duplicateRemoval");require("@fangzhongya/utils/basic/array/asyncMergeArray");require("@fangzhongya/utils/basic/string/firstUpper");const w=require("@fangzhongya/utils/urls/getSuffix");require("@fangzhongya/utils/basic/array/replaceAfter");const g=require("@fangzhongya/utils/judge/matchsStart"),q=require("@fangzhongya/utils/judge/matchsEnd"),$=["vue","js","ts"];function O(t){let e=N.humpToLine(t.name),r=[];return t.alias&&r.push(t.alias+"-"+e),r}function T(t,e,r){const s=g.matchsStart(t,e);return s&&r&&r.length>0?!g.matchsStart(t,r):s}function U(t,e,r){const s=q.matchsEnd(t,e);return s&&r&&r.length>0?!q.matchsEnd(t,r):s}function v(t,e,r){e.lastIndex=0;const s=e.exec(t);if(!s)return!1;const i=s.index;return t.substring(0,i).endsWith(r)}function z(t,e){e.lastIndex=0;const r=e.exec(t);if(!r)return"";const s=r.index;return t.substring(0,s)}function I(t){const e=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`${e(t)}$`)}function m(t,e){if(e&&e.length>0)for(const r of e)if(typeof r=="string"){if(t.endsWith(r)){const s=t.replace(I(r),"");if(s){const i=new RegExp("^.*/([^/]+)$");let n=s.match(i);if(n)return n[1]}}}else{const s=z(t,r);if(s){const i=new RegExp("^.*/([^/]+)$");let n=s.match(i);if(n)return n[1]}}return""}function d(t,e,r){const s=e.dir.replace(/^\.\/|((\.\.\/)+)/,"/");let i=t.indexOf(s),n=e.dir.substring(0,e.dir.indexOf(s))+t.substring(i),a="";if(e.getNameValue)a=e.getNameValue(t,e);else{const u=e.matchextss;u?a=m(t,[u]):a=m(t,e.matchexts)}if(a){let u={suffix:w.getSuffix(t),name:R.lineToLargeHump(a),value:a,adir:"",alias:e.alias,aliasNames:[],raw:"",getRaw:null,mds:[],tests:void 0,url:n,comprops:e.comprops,curprops:e.curprops,dir:e.dir,cwd:e.cwd,tdir:r,key:t};return u.aliasNames=O(u),u}}function K(t,e,r){for(const s of e){const i="/"+s;if(r&&r.length>0){for(const n of r)if(typeof n=="string"){if(t.endsWith(i+n))return!0}else if(v(t,n,i))return!0}else if(t.includes(s))return!0}return!1}function M(t,e,r,s){const i=[],n=s.matchextss;return n&&i.push(n),t.filter(a=>K(a,[e],i))[0]||""}function E(t,e,r,s,i){if(T(t,e.matchs,e.nomatchs)){let n=!1;if(e.isMatch?n=e.isMatch(t,"",[],e):n=U(t,e.matchexts,e.nomatchexts),n){const a=e.getMatchs,u=m(s,e.matchexts);if(a){const l=a(r,u,"component",e);return d(l,e,i)}else if(e.matchextss){const f=M([s],u,"component",e)||M(r,u,"component",e);if(f)return d(f,e,i)}else return d(s,e,i)}}}function L(t){S.setSession("aside.key",t)}function V(){return S.getSession("aside.key")}function W(t){let e=t.match(/\/([^\/]+)\/$/);return e&&e.length>1?e[1]:""}function b(t,e){if(e)for(let r=0;r<e.length;r++){const s=e[r];if(typeof s=="string"){if(t.includes(s))return!0}else if(s.test(t))return!0}return!1}function A(t,e){if(e)for(let r=0;r<e.length;r++){const s=e[r];if(typeof s=="string"){if(t.endsWith(s))return!0}else if(s.test(t))return!0}return!1}function D(t,e,r,s){const i=[],n=[],a=W(e.dir);return t.forEach(u=>{const l=e.dir.replace(/^\.\/|((\.\.\/)+)/,"/");let f=u.indexOf(l),x=e.dir.substring(0,e.dir.indexOf(l))+u.substring(f);const C=new RegExp("^"+e.dir);let p=x.replace(C,""),o=E(p,e,t,u,a);if(o
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./storage.cjs");require("@fangzhongya/utils/basic/object/mergeObject");require("@fangzhongya/utils/basic/array/toggleArray");const N=require("@fangzhongya/utils/name/humpToLine"),R=require("@fangzhongya/utils/name/lineToLargeHump");require("@fangzhongya/utils/basic/string/appearNum");require("@fangzhongya/utils/basic/string/firstLower");require("@fangzhongya/utils/basic/array/duplicateRemoval");require("@fangzhongya/utils/basic/array/asyncMergeArray");require("@fangzhongya/utils/basic/string/firstUpper");const w=require("@fangzhongya/utils/urls/getSuffix");require("@fangzhongya/utils/basic/array/replaceAfter");const g=require("@fangzhongya/utils/judge/matchsStart"),q=require("@fangzhongya/utils/judge/matchsEnd"),$=["vue","js","ts"];function O(t){let e=N.humpToLine(t.name),r=[];return t.alias&&r.push(t.alias+"-"+e),r}function T(t,e,r){const s=g.matchsStart(t,e);return s&&r&&r.length>0?!g.matchsStart(t,r):s}function U(t,e,r){const s=q.matchsEnd(t,e);return s&&r&&r.length>0?!q.matchsEnd(t,r):s}function v(t,e,r){e.lastIndex=0;const s=e.exec(t);if(!s)return!1;const i=s.index;return t.substring(0,i).endsWith(r)}function z(t,e){e.lastIndex=0;const r=e.exec(t);if(!r)return"";const s=r.index;return t.substring(0,s)}function I(t){const e=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`${e(t)}$`)}function m(t,e){if(e&&e.length>0)for(const r of e)if(typeof r=="string"){if(t.endsWith(r)){const s=t.replace(I(r),"");if(s){const i=new RegExp("^.*/([^/]+)$");let n=s.match(i);if(n)return n[1]}}}else{const s=z(t,r);if(s){const i=new RegExp("^.*/([^/]+)$");let n=s.match(i);if(n)return n[1]}}return""}function d(t,e,r){const s=e.dir.replace(/^\.\/|((\.\.\/)+)/,"/");let i=t.indexOf(s),n=e.dir.substring(0,e.dir.indexOf(s))+t.substring(i),a="";if(e.getNameValue)a=e.getNameValue(t,e);else{const u=e.matchextss;u?a=m(t,[u]):a=m(t,e.matchexts)}if(a){let u={suffix:w.getSuffix(t),name:R.lineToLargeHump(a),value:a,adir:"",alias:e.alias,aliasNames:[],raw:"",getRaw:null,mds:[],tests:void 0,url:n,comprops:e.comprops,curprops:e.curprops,dir:e.dir,cwd:e.cwd,tdir:r,key:t};return u.aliasNames=O(u),u}}function K(t,e,r){for(const s of e){const i="/"+s;if(r&&r.length>0){for(const n of r)if(typeof n=="string"){if(t.endsWith(i+n))return!0}else if(v(t,n,i))return!0}else if(t.includes(s))return!0}return!1}function M(t,e,r,s){const i=[],n=s.matchextss;return n&&i.push(n),t.filter(a=>K(a,[e],i))[0]||""}function E(t,e,r,s,i){if(T(t,e.matchs,e.nomatchs)){let n=!1;if(e.isMatch?n=e.isMatch(t,"",[],e):n=U(t,e.matchexts,e.nomatchexts),n){const a=e.getMatchs,u=m(s,e.matchexts);if(a){const l=a(r,u,"component",e);return d(l,e,i)}else if(e.matchextss){const f=M([s],u,"component",e)||M(r,u,"component",e);if(f)return d(f,e,i)}else return d(s,e,i)}}}function L(t){S.setSession("aside.key",t)}function V(){return S.getSession("aside.key")}function W(t){let e=t.match(/\/([^\/]+)\/$/);return e&&e.length>1?e[1]:""}function b(t,e){if(e)for(let r=0;r<e.length;r++){const s=e[r];if(typeof s=="string"){if(t.includes(s))return!0}else if(s.test(t))return!0}return!1}function A(t,e){if(e)for(let r=0;r<e.length;r++){const s=e[r];if(typeof s=="string"){if(t.endsWith(s))return!0}else if(s.test(t))return!0}return!1}function D(t,e,r,s){const i=[],n=[],a=W(e.dir);return t.forEach(u=>{const l=e.dir.replace(/^\.\/|((\.\.\/)+)/,"/");let f=u.indexOf(l),x=e.dir.substring(0,e.dir.indexOf(l))+u.substring(f);const C=new RegExp("^"+e.dir);let p=x.replace(C,""),o=E(p,e,t,u,a);if(o&&(o.component=s[o.key],o.getRaw=h(r,o.key),n.push(o)),e.comprops&&b("/"+p,e.comprops)||e.curprops&&A("/"+p,e.curprops)){let c={};c.url=x,c.comprops=e.comprops,c.curprops=e.curprops,c.value=p,c.dir=e.dir,c.cwd=e.cwd,c.suffix=w.getSuffix(u),c.tdir=a,c.key=u,c.raw="",c.getRaw=h(r,u),i.push(c)}}),{props:i,components:n}}function h(t,e){return typeof t=="function"?t:t?t[e]:null}exports.defaultExtensions=$;exports.getAsideKey=V;exports.getComponentsArr=D;exports.getRawValue=h;exports.getUrlName=E;exports.isComprops=b;exports.isCurprops=A;exports.setAsideKey=L;
|
|
@@ -176,9 +176,7 @@ function ee(t, e, r, s) {
|
|
|
176
176
|
let c = u.indexOf(f), h = e.dir.substring(0, e.dir.indexOf(f)) + u.substring(c);
|
|
177
177
|
const E = new RegExp("^" + e.dir);
|
|
178
178
|
let p = h.replace(E, ""), l = W(p, e, t, u, o);
|
|
179
|
-
if (l)
|
|
180
|
-
l.component = s[l.key], l.getRaw = w(r, l.key), n.push(l);
|
|
181
|
-
else if (e.comprops && T("/" + p, e.comprops) || e.curprops && V("/" + p, e.curprops)) {
|
|
179
|
+
if (l && (l.component = s[l.key], l.getRaw = w(r, l.key), n.push(l)), e.comprops && T("/" + p, e.comprops) || e.curprops && V("/" + p, e.curprops)) {
|
|
182
180
|
let a = {};
|
|
183
181
|
a.url = h, a.comprops = e.comprops, a.curprops = e.curprops, a.value = p, a.dir = e.dir, a.cwd = e.cwd, a.suffix = b(u), a.tdir = o, a.key = u, a.raw = "", a.getRaw = w(r, u), i.push(a);
|
|
184
182
|
}
|