@tachybase/plugin-i18n-editor 0.23.8
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/.turbo/turbo-build.log +14 -0
- package/README.md +35 -0
- package/client.d.ts +3 -0
- package/client.js +65 -0
- package/dist/client/Localization.d.ts +2 -0
- package/dist/client/index.d.ts +5 -0
- package/dist/client/index.js +1 -0
- package/dist/client/locale/index.d.ts +2 -0
- package/dist/client/schemas/localization.d.ts +2 -0
- package/dist/externalVersion.js +14 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +39 -0
- package/dist/locale/en-US.json +24 -0
- package/dist/locale/ko_KR.json +23 -0
- package/dist/locale/zh-CN.json +24 -0
- package/dist/node_modules/deepmerge/.editorconfig +7 -0
- package/dist/node_modules/deepmerge/.eslintcache +1 -0
- package/dist/node_modules/deepmerge/dist/cjs.js +1 -0
- package/dist/node_modules/deepmerge/dist/umd.js +139 -0
- package/dist/node_modules/deepmerge/index.d.ts +20 -0
- package/dist/node_modules/deepmerge/index.js +106 -0
- package/dist/node_modules/deepmerge/license.txt +21 -0
- package/dist/node_modules/deepmerge/package.json +1 -0
- package/dist/node_modules/deepmerge/rollup.config.js +22 -0
- package/dist/server/actions/localization.d.ts +11 -0
- package/dist/server/actions/localization.js +225 -0
- package/dist/server/actions/localizationTexts.d.ts +5 -0
- package/dist/server/actions/localizationTexts.js +130 -0
- package/dist/server/collections/localization-texts.d.ts +2 -0
- package/dist/server/collections/localization-texts.js +86 -0
- package/dist/server/collections/localization-translations.d.ts +2 -0
- package/dist/server/collections/localization-translations.js +84 -0
- package/dist/server/constans.d.ts +8 -0
- package/dist/server/constans.js +48 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +33 -0
- package/dist/server/migrations/20230706200900-roles-add-translation.d.ts +6 -0
- package/dist/server/migrations/20230706200900-roles-add-translation.js +50 -0
- package/dist/server/migrations/20231206161851-fix-module.d.ts +6 -0
- package/dist/server/migrations/20231206161851-fix-module.js +91 -0
- package/dist/server/plugin.d.ts +15 -0
- package/dist/server/plugin.js +162 -0
- package/dist/server/resources.d.ts +19 -0
- package/dist/server/resources.js +86 -0
- package/dist/server/utils.d.ts +3 -0
- package/dist/server/utils.js +79 -0
- package/dist/swagger/index.json +156 -0
- package/package.json +34 -0
- package/server.d.ts +3 -0
- package/server.js +65 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @tachybase/plugin-i18n-editor@0.23.2 build /Users/seal/Documents/projects/tachybase/packages/plugin-i18n-editor
|
|
4
|
+
> tachybase-build --no-dts @tachybase/plugin-i18n-editor
|
|
5
|
+
|
|
6
|
+
[33m[33mThe CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.[39m[39m
|
|
7
|
+
[4m[95m@tachybase/plugin-i18n-editor[39m[24m: [1mplugin-i18n-editor[22m build start
|
|
8
|
+
[4m[95m@tachybase/plugin-i18n-editor[39m[24m: build plugin client
|
|
9
|
+
[4m[95m@tachybase/plugin-i18n-editor[39m[24m: build plugin server source
|
|
10
|
+
[4m[95m@tachybase/plugin-i18n-editor[39m[24m: delete server files
|
|
11
|
+
[4m[95m@tachybase/plugin-i18n-editor[39m[24m: build plugin server dependencies
|
|
12
|
+
[4m[95m@tachybase/plugin-i18n-editor[39m[24m: These packages [33mdeepmerge[39m will be [3mbundled[23m to dist/node_modules. These packages [33m@tachybase/database, @tachybase/module-ui-schema, @tachybase/server, @tachybase/cache, @tachybase/actions[39m will be [3mexclude[23m.
|
|
13
|
+
[4m[95m@tachybase/plugin-i18n-editor[39m[24m: write external version
|
|
14
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Localization Management
|
|
2
|
+
|
|
3
|
+
支持管理应用程序的多语言资源。
|
|
4
|
+
|
|
5
|
+
## 使用方法
|
|
6
|
+
|
|
7
|
+
### 在`应用配置`中添加对应语言
|
|
8
|
+
|
|
9
|
+
<img src="https://s2.loli.net/2023/07/17/1t958NfkEyMjhsm.png" width="550" />
|
|
10
|
+
|
|
11
|
+
### 切换到对应语言
|
|
12
|
+
|
|
13
|
+
<img src="https://s2.loli.net/2023/07/17/npNT1EsIAQcGH3W.png" width="300" />
|
|
14
|
+
|
|
15
|
+
### 管理多语言资源
|
|
16
|
+
|
|
17
|
+
1. 同步需要翻译的原文内容
|
|
18
|
+
|
|
19
|
+
<img src="https://s2.loli.net/2023/07/17/3Uqzdt6mfvauDEP.png" width="300" />
|
|
20
|
+
|
|
21
|
+
- 目前支持的内容
|
|
22
|
+
- 菜单
|
|
23
|
+
- 系统和插件提供的语言包
|
|
24
|
+
- 数据表名、字段名、字段选项标签
|
|
25
|
+
|
|
26
|
+
> **Note**
|
|
27
|
+
> 新增菜单、数据表名、字段名、字段选项标签会自动同步
|
|
28
|
+
> 已有内容需要点击同步按钮手动同步
|
|
29
|
+
|
|
30
|
+
2. 编辑翻译内容,点击`发布`按钮即可生效
|
|
31
|
+
|
|
32
|
+
<img src="https://s2.loli.net/2023/07/17/TVzmJt6ZNYg4fSo.png" width="400" />
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
package/client.d.ts
ADDED
package/client.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
4
|
+
if (typeof WeakMap !== 'function') return null;
|
|
5
|
+
var cacheBabelInterop = new WeakMap();
|
|
6
|
+
var cacheNodeInterop = new WeakMap();
|
|
7
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
8
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
9
|
+
})(nodeInterop);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
13
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
14
|
+
return obj;
|
|
15
|
+
}
|
|
16
|
+
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
|
17
|
+
return { default: obj };
|
|
18
|
+
}
|
|
19
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
20
|
+
if (cache && cache.has(obj)) {
|
|
21
|
+
return cache.get(obj);
|
|
22
|
+
}
|
|
23
|
+
var newObj = {};
|
|
24
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
25
|
+
for (var key in obj) {
|
|
26
|
+
if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
27
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
28
|
+
if (desc && (desc.get || desc.set)) {
|
|
29
|
+
Object.defineProperty(newObj, key, desc);
|
|
30
|
+
} else {
|
|
31
|
+
newObj[key] = obj[key];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
newObj.default = obj;
|
|
36
|
+
if (cache) {
|
|
37
|
+
cache.set(obj, newObj);
|
|
38
|
+
}
|
|
39
|
+
return newObj;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var _index = _interopRequireWildcard(require('./dist/client'));
|
|
43
|
+
|
|
44
|
+
Object.defineProperty(exports, '__esModule', {
|
|
45
|
+
value: true,
|
|
46
|
+
});
|
|
47
|
+
var _exportNames = {};
|
|
48
|
+
Object.defineProperty(exports, 'default', {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _index.default;
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
Object.keys(_index).forEach(function (key) {
|
|
56
|
+
if (key === 'default' || key === '__esModule') return;
|
|
57
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
58
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
59
|
+
Object.defineProperty(exports, key, {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function get() {
|
|
62
|
+
return _index[key];
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@tachybase/client"),require("react-i18next"),require("react/jsx-runtime"),require("react"),require("@tachybase/schema"),require("@ant-design/icons"),require("ahooks"),require("antd")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","react-i18next","react/jsx-runtime","react","@tachybase/schema","@ant-design/icons","ahooks","antd"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n["@tachybase/plugin-i18n-editor"]={},n["@tachybase/client"],n["react-i18next"],n.jsxRuntime,n.react,n["@tachybase/schema"],n["@ant-design/icons"],n.ahooks,n.antd))})(this,function(n,e,i,o,d,m,v,C,r){"use strict";var U=Object.defineProperty,_=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var z=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var P=(n,e,i)=>e in n?U(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i,A=(n,e)=>{for(var i in e||(e={}))$.call(e,i)&&P(n,i,e[i]);if(z)for(var i of z(e))J.call(e,i)&&P(n,i,e[i]);return n},b=(n,e)=>_(n,H(e));var g=(n,e,i)=>new Promise((o,d)=>{var m=r=>{try{C(i.next(r))}catch(y){d(y)}},v=r=>{try{C(i.throw(r))}catch(y){d(y)}},C=r=>r.done?o(r.value):Promise.resolve(r.value).then(m,v);C((i=i.apply(n,e)).next())});const y="localization-management",f=()=>i.useTranslation([y,"core"],{nsMode:"fallback"}),S={name:"localization",fields:[{interface:"input",type:"string",name:"text",uiSchema:{type:"string",title:'{{t("Text")}}',"x-component":"Input.TextArea",required:!0}},{interface:"input",type:"string",name:"translation",uiSchema:{type:"string",title:'{{t("Translation")}}',"x-component":"Input.TextArea"}},{interface:"select",type:"string",name:"moduleTitle",uiSchema:{type:"string",title:'{{t("Module")}}',"x-component":"Select",enum:[{value:"Menu",label:'{{t("Menu")}}'},{value:"Collections & Fields",label:'{{t("Collections & Fields", {ns:"localization-management"})}}'}]}}]},L={type:"void",name:"localization","x-decorator":"ResourceActionProvider","x-decorator-props":{collection:S,resourceName:"localizationTexts",request:{resource:"localizationTexts",action:"list",params:{pageSize:50}}},"x-component":"CollectionProvider_deprecated","x-component-props":{collection:S},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{currentLang:{type:"void","x-align":"left","x-component":"CurrentLang"},filter:{type:"void",title:'{{t("Filter")}}',"x-align":"left","x-component":"Filter"},deleteTranslation:{type:"void",title:'{{t("Delete translation")}}',"x-component":"Action","x-component-props":{icon:"DeleteOutlined",useAction:"{{ useBulkDestroyTranslationAction }}",confirm:{title:"{{t('Delete translation')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},sync:{type:"void",title:'{{t("Sync")}}',"x-component":"Sync"},publish:{type:"void",title:'{{t("Publish")}}',"x-component":"Action","x-component-props":{icon:"UploadOutlined",type:"primary",useAction:"{{ usePublishAction }}"}}}},table:{type:"void","x-uid":"input","x-component":"Table.Void","x-component-props":{rowKey:"translationId",rowSelection:{type:"checkbox"},useDataSource:"{{ cm.useDataSourceFromRAC }}"},properties:{text:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{text:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},translation:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{translation:{type:"string","x-component":"CollectionField","x-component-props":{component:"TranslationField"},"x-read-pretty":!0}}},moduleTitle:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{moduleTitle:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"Table.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{update:{type:"void",title:'{{t("Edit")}}',"x-component":"Action.Link","x-component-props":{type:"primary"},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues:"{{ cm.useValuesFromRecord }}"},title:'{{t("Edit")}}',properties:{moduleTitle:{"x-component":"CollectionField","x-decorator":"FormItem","x-read-pretty":!0},text:{"x-component":"CollectionField","x-decorator":"FormItem","x-read-pretty":!0},translation:{"x-component":"CollectionField","x-decorator":"FormItem",required:!0},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ useUpdateTranslationAction }}"}}}}}}}},deleteTranslation:{type:"void",title:'{{ t("Delete translation") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Delete translation')}}",content:"{{t('Are you sure you want to delete it?')}}"},useAction:"{{useDestroyTranslationAction}}"},"x-visible":"{{useHasTranslation()}}"}}}}}}}}},{Text:I}=r.Typography,D=()=>{const t=m.useField(),l=m.useForm(),a=e.useActionContext(),{refresh:c}=e.useResourceActionContext(),{targetKey:u}=e.useResourceContext(),{[u]:s}=e.useRecord(),p=e.useAPIClient(),x=p.auth.getLocale();return{run(){return g(this,null,function*(){yield l.submit(),t.data=t.data||{},t.data.loading=!0;try{yield p.resource("localizationTranslations").updateOrCreate({filterKeys:["textId","locale"],values:{textId:s,locale:x,translation:l.values.translation}}),a.setVisible(!1),yield l.reset(),c()}catch(T){console.log(T)}finally{t.data.loading=!1}})}}},M=()=>{const{refresh:t}=e.useResourceActionContext(),l=e.useAPIClient(),{translationId:a}=e.useRecord();return{run(){return g(this,null,function*(){yield l.resource("localizationTranslations").destroy({filterByTk:a}),t()})}}},q=()=>{const{state:t,setState:l,refresh:a}=e.useResourceActionContext(),c=e.useAPIClient(),{t:u}=f();return{run(){return g(this,null,function*(){var p;if(!((p=t==null?void 0:t.selectedRowKeys)!=null&&p.length))return r.message.error(u("Please select the records you want to delete"));yield c.resource("localizationTranslations").destroy({filterByTk:t==null?void 0:t.selectedRowKeys}),l==null||l({selectedRowKeys:[]}),a()})}}},B=()=>{const t=e.useAPIClient();return{run(){return g(this,null,function*(){yield t.resource("localization").publish(),window.location.reload()})}}},K=()=>{const{t}=f(),{refresh:l}=e.useResourceActionContext(),a=e.useAPIClient(),[c,u]=d.useState(!1),s=["local","menu","db"],[p,x]=d.useState(s),[j,T]=d.useState(!1),[E,k]=d.useState(!0),G=h=>{x(h),T(!!h.length&&h.length<s.length),k(h.length===s.length)},N=h=>{x(h.target.checked?s:[]),T(!1),k(h.target.checked)};return o.jsx(e.StablePopover,{placement:"bottomRight",content:o.jsxs(o.Fragment,{children:[o.jsx(r.Checkbox,{indeterminate:j,onChange:N,checked:E,children:t("All")}),o.jsx(r.Divider,{style:{margin:"5px 0"}}),o.jsx(r.Checkbox.Group,{onChange:G,value:p,children:o.jsxs(r.Col,{children:[o.jsx(r.Row,{children:o.jsx(r.Checkbox,{value:"local",children:t("System & Plugins")})}),o.jsx(r.Row,{children:o.jsx(r.Checkbox,{value:"db",children:t("Collections & Fields")})}),o.jsx(r.Row,{children:o.jsx(r.Checkbox,{value:"menu",children:t("Menu")})})]})})]}),children:o.jsx(r.Button,{icon:o.jsx(v.SyncOutlined,{}),loading:c,onClick:()=>g(this,null,function*(){if(!p.length)return r.message.error(t("Please select the resources you want to synchronize"));u(!0),yield a.resource("localization").sync({values:{type:p}}),u(!1),l()}),children:t("Sync")})})},w=()=>{var c;const{t}=f(),l=C.useMemoizedFn(t),{data:a}=e.useResourceActionContext();return d.useMemo(()=>{var u,s;return((s=(u=a==null?void 0:a.meta)==null?void 0:u.modules)==null?void 0:s.map(p=>({value:p.value,label:l(p.label)})))||[]},[(c=a==null?void 0:a.meta)==null?void 0:c.modules,l])},O=()=>{const{t}=f(),{run:l}=e.useResourceActionContext(),a=w(),c=d.useMemo(()=>m.createForm({initialValues:{hasTranslation:!0}}),[]),u=s=>{l(A({},s||c.values))};return d.useEffect(()=>{const s=c.query("module").take();s.dataSource=a},[c,a]),o.jsx(e.FormProvider,{form:c,children:o.jsxs("div",{style:{display:"flex"},children:[o.jsx(m.FieldComponent,{name:"module",dataSource:a,component:[e.Select,{allowClear:!0,placeholder:t("Module"),onChange:s=>u(b(A({},c.values),{module:s}))}]}),o.jsx(m.FieldComponent,{name:"keyword",component:[r.Input.Search,{placeholder:t("Keyword"),allowClear:!0,style:{marginLeft:"8px",width:"fit-content"},onSearch:s=>u(b(A({},c.values),{keyword:s}))}]}),o.jsx(m.FieldComponent,{name:"hasTranslation",dataSource:[{label:t("All"),value:!0},{label:t("No translation"),value:!1}],component:[e.Radio.Group,{defaultValue:!0,style:{marginLeft:"8px",width:"fit-content"},optionType:"button",onChange:()=>u()}]})]})})},V=()=>{var p;const{t}=f(),a=e.useAPIClient().auth.getLocale(),c=((p=e.locale[a])==null?void 0:p.label)||a,u=()=>o.jsxs(r.Typography,{children:[o.jsx(I,{strong:!0,children:t("Current language")}),o.jsx(r.Tag,{style:{marginLeft:"10px"},children:c})]}),s=x=>x.value!==void 0?o.jsx(e.Input.TextArea,A({},x)):o.jsx("div",{});return o.jsx(r.Card,{bordered:!1,children:o.jsx(e.SchemaComponent,{schema:L,components:{TranslationField:s,CurrentLang:u,Sync:K,Filter:O},scope:{t,useDestroyTranslationAction:M,useBulkDestroyTranslationAction:q,useUpdateTranslationAction:D,usePublishAction:B,useModules:w}})})};class F extends e.Plugin{load(){return g(this,null,function*(){this.app.systemSettingsManager.add("system-services."+y,{title:`{{t("Localization", { ns: "${y}" })}}`,icon:"GlobalOutlined",Component:V,aclSnippet:"pm.localization-management.localization"})})}}n.LocalizationManagementPlugin=F,n.default=F,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
"react": "18.3.1",
|
|
3
|
+
"@tachybase/client": "0.23.8",
|
|
4
|
+
"@tachybase/schema": "0.23.8",
|
|
5
|
+
"@ant-design/icons": "5.5.2",
|
|
6
|
+
"ahooks": "3.8.4",
|
|
7
|
+
"antd": "5.22.5",
|
|
8
|
+
"@tachybase/database": "0.23.8",
|
|
9
|
+
"@tachybase/module-ui-schema": "0.23.8",
|
|
10
|
+
"@tachybase/server": "0.23.8",
|
|
11
|
+
"@tachybase/cache": "0.23.8",
|
|
12
|
+
"react-i18next": "15.2.0",
|
|
13
|
+
"@tachybase/actions": "0.23.8"
|
|
14
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var src_exports = {};
|
|
30
|
+
__export(src_exports, {
|
|
31
|
+
default: () => import_server.default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(src_exports);
|
|
34
|
+
__reExport(src_exports, require("./server"), module.exports);
|
|
35
|
+
var import_server = __toESM(require("./server"));
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
...require("./server")
|
|
39
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add new": "Add new",
|
|
3
|
+
"All": "All",
|
|
4
|
+
"Collections & Fields": "Collections & Fields",
|
|
5
|
+
"Current language": "Current language",
|
|
6
|
+
"Delete text": "Delete text",
|
|
7
|
+
"Delete translation": "Delete translation",
|
|
8
|
+
"Edit": "Edit",
|
|
9
|
+
"Keyword": "Keyword",
|
|
10
|
+
"Localization": "Localization",
|
|
11
|
+
"Localization management": "Localization management",
|
|
12
|
+
"Menu": "Menu",
|
|
13
|
+
"Module": "Module",
|
|
14
|
+
"No data": "No data",
|
|
15
|
+
"No translation": "No translation",
|
|
16
|
+
"Please select the resources you want to synchronize": "Please select the resources you want to synchronize",
|
|
17
|
+
"Publish": "Publish",
|
|
18
|
+
"Sync": "Sync",
|
|
19
|
+
"System & Plugins": "System & Plugins",
|
|
20
|
+
"Text": "Text",
|
|
21
|
+
"Translation": "Translation",
|
|
22
|
+
"Translations": "Translations",
|
|
23
|
+
"User interfaces": "User interfaces"
|
|
24
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add new": "새로 추가",
|
|
3
|
+
"All": "모두",
|
|
4
|
+
"Collections & Fields": "컬렉션 및 필드",
|
|
5
|
+
"Current language": "현재 언어",
|
|
6
|
+
"Delete text": "원본 삭제",
|
|
7
|
+
"Delete translation": "번역 삭제",
|
|
8
|
+
"Edit": "편집",
|
|
9
|
+
"Keyword": "키워드",
|
|
10
|
+
"Localization management": "다국어 관리",
|
|
11
|
+
"Menu": "메뉴",
|
|
12
|
+
"Module": "모듈",
|
|
13
|
+
"No data": "데이터 없음",
|
|
14
|
+
"No translation": "번역 없음",
|
|
15
|
+
"Please select the resources you want to synchronize": "동기화하려는 리소스를 선택하세요",
|
|
16
|
+
"Publish": "게시",
|
|
17
|
+
"Sync": "동기화",
|
|
18
|
+
"System & Plugins": "시스템 및 플러그인",
|
|
19
|
+
"Text": "원본 텍스트",
|
|
20
|
+
"Translation": "번역",
|
|
21
|
+
"Translations": "번역",
|
|
22
|
+
"User interfaces": "사용자 인터페이스"
|
|
23
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add new": "新增",
|
|
3
|
+
"All": "全部",
|
|
4
|
+
"Collections & Fields": "数据表和字段",
|
|
5
|
+
"Current language": "当前语言",
|
|
6
|
+
"Delete text": "删除原文",
|
|
7
|
+
"Delete translation": "删除译文",
|
|
8
|
+
"Edit": "编辑",
|
|
9
|
+
"Keyword": "关键字",
|
|
10
|
+
"Localization": "本地化",
|
|
11
|
+
"Localization management": "本地化管理",
|
|
12
|
+
"Menu": "菜单",
|
|
13
|
+
"Module": "模块",
|
|
14
|
+
"No data": "暂无数据",
|
|
15
|
+
"No translation": "待翻译",
|
|
16
|
+
"Please select the resources you want to synchronize": "请选择需要同步的资源",
|
|
17
|
+
"Publish": "发布",
|
|
18
|
+
"Sync": "同步",
|
|
19
|
+
"System & Plugins": "系统和插件",
|
|
20
|
+
"Text": "原文",
|
|
21
|
+
"Translation": "译文",
|
|
22
|
+
"Translations": "翻译",
|
|
23
|
+
"User interfaces": "用户界面配置"
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"/Users/joshduff/code/deepmerge/test/custom-is-mergeable-object.js":"1"},{"size":1990,"mtime":1679007485753,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","suppressedMessages":"6","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"ktjd5k","/Users/joshduff/code/deepmerge/test/custom-is-mergeable-object.js",[],[]]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){"use strict";var e={167:function(e){var r=function isMergeableObject(e){return isNonNullObject(e)&&!isSpecial(e)};function isNonNullObject(e){return!!e&&typeof e==="object"}function isSpecial(e){var r=Object.prototype.toString.call(e);return r==="[object RegExp]"||r==="[object Date]"||isReactElement(e)}var t=typeof Symbol==="function"&&Symbol.for;var n=t?Symbol.for("react.element"):60103;function isReactElement(e){return e.$$typeof===n}function emptyTarget(e){return Array.isArray(e)?[]:{}}function cloneUnlessOtherwiseSpecified(e,r){return r.clone!==false&&r.isMergeableObject(e)?deepmerge(emptyTarget(e),e,r):e}function defaultArrayMerge(e,r,t){return e.concat(r).map((function(e){return cloneUnlessOtherwiseSpecified(e,t)}))}function getMergeFunction(e,r){if(!r.customMerge){return deepmerge}var t=r.customMerge(e);return typeof t==="function"?t:deepmerge}function getEnumerableOwnPropertySymbols(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(r){return Object.propertyIsEnumerable.call(e,r)})):[]}function getKeys(e){return Object.keys(e).concat(getEnumerableOwnPropertySymbols(e))}function propertyIsOnObject(e,r){try{return r in e}catch(e){return false}}function propertyIsUnsafe(e,r){return propertyIsOnObject(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))}function mergeObject(e,r,t){var n={};if(t.isMergeableObject(e)){getKeys(e).forEach((function(r){n[r]=cloneUnlessOtherwiseSpecified(e[r],t)}))}getKeys(r).forEach((function(c){if(propertyIsUnsafe(e,c)){return}if(propertyIsOnObject(e,c)&&t.isMergeableObject(r[c])){n[c]=getMergeFunction(c,t)(e[c],r[c],t)}else{n[c]=cloneUnlessOtherwiseSpecified(r[c],t)}}));return n}function deepmerge(e,t,n){n=n||{};n.arrayMerge=n.arrayMerge||defaultArrayMerge;n.isMergeableObject=n.isMergeableObject||r;n.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var c=Array.isArray(t);var i=Array.isArray(e);var o=c===i;if(!o){return cloneUnlessOtherwiseSpecified(t,n)}else if(c){return n.arrayMerge(e,t,n)}else{return mergeObject(e,t,n)}}deepmerge.all=function deepmergeAll(e,r){if(!Array.isArray(e)){throw new Error("first argument should be an array")}return e.reduce((function(e,t){return deepmerge(e,t,r)}),{})};var c=deepmerge;e.exports=c}};var r={};function __nccwpck_require__(t){var n=r[t];if(n!==undefined){return n.exports}var c=r[t]={exports:{}};var i=true;try{e[t](c,c.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}return c.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(167);module.exports=t})();
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
|
+
(global = global || self, global.deepmerge = factory());
|
|
5
|
+
}(this, function () { 'use strict';
|
|
6
|
+
|
|
7
|
+
var isMergeableObject = function isMergeableObject(value) {
|
|
8
|
+
return isNonNullObject(value)
|
|
9
|
+
&& !isSpecial(value)
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
function isNonNullObject(value) {
|
|
13
|
+
return !!value && typeof value === 'object'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function isSpecial(value) {
|
|
17
|
+
var stringValue = Object.prototype.toString.call(value);
|
|
18
|
+
|
|
19
|
+
return stringValue === '[object RegExp]'
|
|
20
|
+
|| stringValue === '[object Date]'
|
|
21
|
+
|| isReactElement(value)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
25
|
+
var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
26
|
+
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
27
|
+
|
|
28
|
+
function isReactElement(value) {
|
|
29
|
+
return value.$$typeof === REACT_ELEMENT_TYPE
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function emptyTarget(val) {
|
|
33
|
+
return Array.isArray(val) ? [] : {}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
37
|
+
return (options.clone !== false && options.isMergeableObject(value))
|
|
38
|
+
? deepmerge(emptyTarget(value), value, options)
|
|
39
|
+
: value
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function defaultArrayMerge(target, source, options) {
|
|
43
|
+
return target.concat(source).map(function(element) {
|
|
44
|
+
return cloneUnlessOtherwiseSpecified(element, options)
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function getMergeFunction(key, options) {
|
|
49
|
+
if (!options.customMerge) {
|
|
50
|
+
return deepmerge
|
|
51
|
+
}
|
|
52
|
+
var customMerge = options.customMerge(key);
|
|
53
|
+
return typeof customMerge === 'function' ? customMerge : deepmerge
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function getEnumerableOwnPropertySymbols(target) {
|
|
57
|
+
return Object.getOwnPropertySymbols
|
|
58
|
+
? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
59
|
+
return Object.propertyIsEnumerable.call(target, symbol)
|
|
60
|
+
})
|
|
61
|
+
: []
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function getKeys(target) {
|
|
65
|
+
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function propertyIsOnObject(object, property) {
|
|
69
|
+
try {
|
|
70
|
+
return property in object
|
|
71
|
+
} catch(_) {
|
|
72
|
+
return false
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
77
|
+
function propertyIsUnsafe(target, key) {
|
|
78
|
+
return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
|
|
79
|
+
&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
|
|
80
|
+
&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function mergeObject(target, source, options) {
|
|
84
|
+
var destination = {};
|
|
85
|
+
if (options.isMergeableObject(target)) {
|
|
86
|
+
getKeys(target).forEach(function(key) {
|
|
87
|
+
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
getKeys(source).forEach(function(key) {
|
|
91
|
+
if (propertyIsUnsafe(target, key)) {
|
|
92
|
+
return
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
96
|
+
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
97
|
+
} else {
|
|
98
|
+
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
return destination
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function deepmerge(target, source, options) {
|
|
105
|
+
options = options || {};
|
|
106
|
+
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
107
|
+
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
108
|
+
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
109
|
+
// implementations can use it. The caller may not replace it.
|
|
110
|
+
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
111
|
+
|
|
112
|
+
var sourceIsArray = Array.isArray(source);
|
|
113
|
+
var targetIsArray = Array.isArray(target);
|
|
114
|
+
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
115
|
+
|
|
116
|
+
if (!sourceAndTargetTypesMatch) {
|
|
117
|
+
return cloneUnlessOtherwiseSpecified(source, options)
|
|
118
|
+
} else if (sourceIsArray) {
|
|
119
|
+
return options.arrayMerge(target, source, options)
|
|
120
|
+
} else {
|
|
121
|
+
return mergeObject(target, source, options)
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
deepmerge.all = function deepmergeAll(array, options) {
|
|
126
|
+
if (!Array.isArray(array)) {
|
|
127
|
+
throw new Error('first argument should be an array')
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return array.reduce(function(prev, next) {
|
|
131
|
+
return deepmerge(prev, next, options)
|
|
132
|
+
}, {})
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
var deepmerge_1 = deepmerge;
|
|
136
|
+
|
|
137
|
+
return deepmerge_1;
|
|
138
|
+
|
|
139
|
+
}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare function deepmerge<T>(x: Partial<T>, y: Partial<T>, options?: deepmerge.Options): T;
|
|
2
|
+
declare function deepmerge<T1, T2>(x: Partial<T1>, y: Partial<T2>, options?: deepmerge.Options): T1 & T2;
|
|
3
|
+
|
|
4
|
+
declare namespace deepmerge {
|
|
5
|
+
export interface Options {
|
|
6
|
+
arrayMerge?(target: any[], source: any[], options?: ArrayMergeOptions): any[];
|
|
7
|
+
clone?: boolean;
|
|
8
|
+
customMerge?: (key: string, options?: Options) => ((x: any, y: any) => any) | undefined;
|
|
9
|
+
isMergeableObject?(value: object): boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface ArrayMergeOptions {
|
|
12
|
+
isMergeableObject(value: object): boolean;
|
|
13
|
+
cloneUnlessOtherwiseSpecified(value: object, options?: Options): object;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function all (objects: object[], options?: Options): object;
|
|
17
|
+
export function all<T> (objects: Partial<T>[], options?: Options): T;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export = deepmerge;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
var defaultIsMergeableObject = require('is-mergeable-object')
|
|
2
|
+
|
|
3
|
+
function emptyTarget(val) {
|
|
4
|
+
return Array.isArray(val) ? [] : {}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
8
|
+
return (options.clone !== false && options.isMergeableObject(value))
|
|
9
|
+
? deepmerge(emptyTarget(value), value, options)
|
|
10
|
+
: value
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function defaultArrayMerge(target, source, options) {
|
|
14
|
+
return target.concat(source).map(function(element) {
|
|
15
|
+
return cloneUnlessOtherwiseSpecified(element, options)
|
|
16
|
+
})
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function getMergeFunction(key, options) {
|
|
20
|
+
if (!options.customMerge) {
|
|
21
|
+
return deepmerge
|
|
22
|
+
}
|
|
23
|
+
var customMerge = options.customMerge(key)
|
|
24
|
+
return typeof customMerge === 'function' ? customMerge : deepmerge
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function getEnumerableOwnPropertySymbols(target) {
|
|
28
|
+
return Object.getOwnPropertySymbols
|
|
29
|
+
? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
30
|
+
return Object.propertyIsEnumerable.call(target, symbol)
|
|
31
|
+
})
|
|
32
|
+
: []
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function getKeys(target) {
|
|
36
|
+
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function propertyIsOnObject(object, property) {
|
|
40
|
+
try {
|
|
41
|
+
return property in object
|
|
42
|
+
} catch(_) {
|
|
43
|
+
return false
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
48
|
+
function propertyIsUnsafe(target, key) {
|
|
49
|
+
return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
|
|
50
|
+
&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
|
|
51
|
+
&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function mergeObject(target, source, options) {
|
|
55
|
+
var destination = {}
|
|
56
|
+
if (options.isMergeableObject(target)) {
|
|
57
|
+
getKeys(target).forEach(function(key) {
|
|
58
|
+
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options)
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
getKeys(source).forEach(function(key) {
|
|
62
|
+
if (propertyIsUnsafe(target, key)) {
|
|
63
|
+
return
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
67
|
+
destination[key] = getMergeFunction(key, options)(target[key], source[key], options)
|
|
68
|
+
} else {
|
|
69
|
+
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options)
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
return destination
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function deepmerge(target, source, options) {
|
|
76
|
+
options = options || {}
|
|
77
|
+
options.arrayMerge = options.arrayMerge || defaultArrayMerge
|
|
78
|
+
options.isMergeableObject = options.isMergeableObject || defaultIsMergeableObject
|
|
79
|
+
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
80
|
+
// implementations can use it. The caller may not replace it.
|
|
81
|
+
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified
|
|
82
|
+
|
|
83
|
+
var sourceIsArray = Array.isArray(source)
|
|
84
|
+
var targetIsArray = Array.isArray(target)
|
|
85
|
+
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray
|
|
86
|
+
|
|
87
|
+
if (!sourceAndTargetTypesMatch) {
|
|
88
|
+
return cloneUnlessOtherwiseSpecified(source, options)
|
|
89
|
+
} else if (sourceIsArray) {
|
|
90
|
+
return options.arrayMerge(target, source, options)
|
|
91
|
+
} else {
|
|
92
|
+
return mergeObject(target, source, options)
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
deepmerge.all = function deepmergeAll(array, options) {
|
|
97
|
+
if (!Array.isArray(array)) {
|
|
98
|
+
throw new Error('first argument should be an array')
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return array.reduce(function(prev, next) {
|
|
102
|
+
return deepmerge(prev, next, options)
|
|
103
|
+
}, {})
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
module.exports = deepmerge
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2012 James Halliday, Josh Duff, and other contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"deepmerge","description":"A library for deep (recursive) merging of Javascript objects","keywords":["merge","deep","extend","copy","clone","recursive"],"version":"4.3.1","homepage":"https://github.com/TehShrike/deepmerge","repository":{"type":"git","url":"git://github.com/TehShrike/deepmerge.git"},"main":"dist/cjs.js","engines":{"node":">=0.10.0"},"scripts":{"build":"rollup -c","test":"npm run build && tape test/*.js && jsmd readme.md && npm run test:typescript","test:typescript":"tsc --noEmit test/typescript.ts && ts-node test/typescript.ts","size":"npm run build && uglifyjs --compress --mangle -- ./dist/umd.js | gzip -c | wc -c"},"devDependencies":{"@types/node":"^8.10.54","is-mergeable-object":"1.1.0","is-plain-object":"^5.0.0","jsmd":"^1.0.2","rollup":"^1.23.1","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","tape":"^4.11.0","ts-node":"7.0.1","typescript":"=2.2.2","uglify-js":"^3.6.1"},"license":"MIT","_lastModified":"2024-12-22T16:06:33.546Z"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import resolve from 'rollup-plugin-node-resolve'
|
|
2
|
+
import commonjs from 'rollup-plugin-commonjs'
|
|
3
|
+
import pkg from './package.json'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
input: `index.js`,
|
|
7
|
+
plugins: [
|
|
8
|
+
commonjs(),
|
|
9
|
+
resolve(),
|
|
10
|
+
],
|
|
11
|
+
output: [
|
|
12
|
+
{
|
|
13
|
+
file: pkg.main,
|
|
14
|
+
format: `cjs`
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'deepmerge',
|
|
18
|
+
file: 'dist/umd.js',
|
|
19
|
+
format: `umd`
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Context, Next } from '@tachybase/actions';
|
|
2
|
+
import { Database, Model } from '@tachybase/database';
|
|
3
|
+
export declare const getResources: (ctx: Context) => Promise<any>;
|
|
4
|
+
export declare const getUISchemas: (db: Database) => Promise<Model<any, any>[]>;
|
|
5
|
+
export declare const getTextsFromDB: (db: Database) => Promise<{}>;
|
|
6
|
+
export declare const getTextsFromMenu: (db: Database, migrate?: boolean) => Promise<{}>;
|
|
7
|
+
declare const _default: {
|
|
8
|
+
publish: (ctx: Context, next: Next) => Promise<void>;
|
|
9
|
+
sync: (ctx: Context, next: Next) => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|