@nuraly/runtime 0.1.7 → 0.1.9
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 +83 -765
- package/components/ui/components/Event/EventValue/EventValue.ts +13 -8
- package/components/ui/components/ToastContainer/ToastContainer.ts +1 -1
- package/components/ui/components/advanced/AIChat/AIChat.ts +1 -2
- package/components/ui/components/advanced/Collapse/Collapse.ts +5 -2
- package/components/ui/components/advanced/Collections/Collections.ts +2 -2
- package/components/ui/components/advanced/MicroApp/MicroApp.ts +3 -11
- package/components/ui/components/advanced/RefComponent/RefComponent.ts +2 -2
- package/components/ui/components/advanced/RichText/RichText.ts +5 -4
- package/components/ui/components/advanced/RichText/RichTextEditor.ts +0 -167
- package/components/ui/components/base/BaseElement/base-change-detection.ts +1 -5
- package/components/ui/components/base/BaseElement.ts +229 -610
- package/components/ui/components/base/FormRegisterable.ts +83 -0
- package/components/ui/components/base/controllers/DragDropController.ts +175 -0
- package/components/ui/components/base/controllers/ErrorController.ts +180 -0
- package/components/ui/components/base/controllers/EventController.ts +112 -0
- package/components/ui/components/base/controllers/InputHandlerController.ts +298 -0
- package/components/ui/components/base/controllers/SelectionController.ts +323 -0
- package/components/ui/components/base/controllers/StyleHandlerController.ts +286 -0
- package/components/ui/components/base/controllers/index.ts +11 -0
- package/components/ui/components/base/mixins/EditorModeMixin.ts +185 -0
- package/components/ui/components/base/mixins/index.ts +6 -0
- package/components/ui/components/base/types/base-element.types.ts +138 -0
- package/components/ui/components/base/types/index.ts +21 -0
- package/components/ui/components/base/utils/event-debouncer.ts +209 -0
- package/components/ui/components/base/utils/index.ts +11 -0
- package/components/ui/components/base/utils/style-cache.ts +94 -0
- package/components/ui/components/display/BoxModel/BoxModel.ts +177 -116
- package/components/ui/components/display/Code/Code.ts +40 -26
- package/components/ui/components/display/Divider/Divider.ts +2 -2
- package/components/ui/components/display/Icon/Icon.ts +2 -3
- package/components/ui/components/display/Image/Image.ts +72 -46
- package/components/ui/components/display/Tag/Tag.ts +2 -3
- package/components/ui/components/display/Video/Video.ts +91 -31
- package/components/ui/components/inputs/Button/Button.ts +2 -2
- package/components/ui/components/inputs/Checkbox/Checkbox.ts +14 -40
- package/components/ui/components/inputs/ColorPicker/colorpicker.ts +9 -4
- package/components/ui/components/inputs/DatePicker/DatePicker.ts +47 -25
- package/components/ui/components/inputs/Dropdown/Dropdown.ts +2 -2
- package/components/ui/components/inputs/Form/Form.style.ts +26 -0
- package/components/ui/components/inputs/Form/Form.ts +360 -0
- package/components/ui/components/inputs/IconPicker/IconPicker.ts +22 -18
- package/components/ui/components/inputs/InsertDropdown/InsertDropdown.ts +0 -20
- package/components/ui/components/inputs/NumberInput/NumberInput.ts +0 -4
- package/components/ui/components/inputs/RadioButton/Radio-button.ts +17 -13
- package/components/ui/components/inputs/Select/Select.ts +44 -24
- package/components/ui/components/inputs/TextInput/TextInput.ts +15 -9
- package/components/ui/components/inputs/Textarea/Textarea.ts +30 -30
- package/components/ui/components/inputs/UsersDropdown/UsersDropdown.ts +1 -1
- package/components/ui/components/layout/Card/Card.ts +112 -10
- package/components/ui/components/layout/Containers/Container.style.ts +18 -0
- package/components/ui/components/layout/Containers/Container.ts +11 -5
- package/components/ui/components/layout/Grid/Col.style.ts +27 -0
- package/components/ui/components/layout/Grid/Col.ts +213 -0
- package/components/ui/components/layout/Grid/Row.style.ts +73 -0
- package/components/ui/components/layout/Grid/Row.ts +170 -0
- package/components/ui/components/layout/Grid/index.ts +7 -0
- package/components/ui/components/layout/Panel/Panel.ts +2 -2
- package/components/ui/components/layout/Tabs/Tabs.ts +0 -1
- package/components/ui/components/navigation/EmbedURL/EmbedURL.ts +62 -26
- package/components/ui/components/navigation/Link/Link.ts +27 -16
- package/components/ui/components/navigation/Menu/Menu.ts +26 -48
- package/components/ui/components/runtime/MicroApp/MicroApp.ts +7 -147
- package/components/ui/components/runtime/MicroApp/MicroAppDataLoader.ts +6 -2
- package/components/ui/components/studio/FunctionsPanel/FunctionsPanel.ts +484 -0
- package/components/ui/components/studio/FunctionsPanel/index.ts +1 -0
- package/components/ui/components/utility/AccessRoles/AccessRoles.style.ts +242 -0
- package/components/ui/components/utility/AccessRoles/AccessRoles.ts +476 -0
- package/components/ui/components/utility/Border/Border.ts +0 -14
- package/components/ui/components/utility/BorderManager/BorderManager.style.ts +237 -0
- package/components/ui/components/utility/BorderManager/BorderManager.ts +503 -0
- package/components/ui/components/utility/BoxShadow/BoxShadow.ts +0 -16
- package/components/ui/components/utility/Document/Document.ts +54 -25
- package/components/ui/components/utility/Export-Import/Export-Import.ts +8 -7
- package/components/ui/components/utility/Handlers/Handlers.ts +14 -17
- package/components/ui/components/utility/ValidationRules/ValidationRules.ts +440 -0
- package/components/ui/components/wrappers/GenerikWrapper/DragWrapper/DragWrapper.ts +1 -0
- package/components/ui/components/wrappers/GenerikWrapper/GenerikWrapper.ts +1 -24
- package/components/ui/nuraly-ui/src/components/badge/badge.style.ts +4 -3
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.component.ts +2 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.component.ts +12 -6
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.style.ts +23 -0
- package/dist/{index-B4yIOSMd.js → BaseElement-BNBn_IJk.js} +2920 -267
- package/dist/{CodeEditor-YsOapSut.js → CodeEditor-B1gNuvPb.js} +84127 -76319
- package/dist/{CodeEditor-BiNku87K.js → CodeEditor-Cpph-xRc.js} +7 -7
- package/dist/{abap-B2diVmjb.js → abap-D0Neqhq6.js} +91 -1
- package/dist/{apex-3NuJ-nsI.js → apex-B5LhxkeG.js} +18 -1
- package/dist/assets/editor.worker-DcwbJ0PV.js +12 -0
- package/dist/assets/html.worker-BTMxskjR.js +461 -0
- package/dist/assets/json.worker-D3vTGdf_.js +49 -0
- package/dist/assets/ts.worker-BsM1BXac.js +51334 -0
- package/dist/{azcli-XGXuUsMB.js → azcli-BrBH0QTU.js} +1 -1
- package/dist/{bat-B8Vhm634.js → bat-BfzAov64.js} +12 -1
- package/dist/{bicep-Cc8X5S_k.js → bicep-C3bCSWel.js} +1 -1
- package/dist/{cameligo-Bo3wBh9T.js → cameligo-sFL5plcd.js} +13 -1
- package/dist/{clojure-CPoQlpIK.js → clojure-CfeExRz0.js} +14 -1
- package/dist/{coffee-BxvTGz39.js → coffee-Xws5K0WL.js} +11 -1
- package/dist/{cpp-5RpEV7vC.js → cpp-CqOUEpxN.js} +28 -23
- package/dist/{csharp-slXXP3fo.js → csharp-DVLiBOZb.js} +13 -1
- package/dist/{csp-B98p6-gH.js → csp-DVFp9bw5.js} +3 -1
- package/dist/{css-BDsDSAin.js → css-DwARn2R6.js} +8 -1
- package/dist/cssMode-D82-gS78.js +1577 -0
- package/dist/{cypher-Dc4IMouD.js → cypher-uY0Mffat.js} +8 -1
- package/dist/{dart-LhvE3yD2.js → dart-D27H-mX_.js} +18 -1
- package/dist/{dockerfile-CwzplJeZ.js → dockerfile-CmV85WZK.js} +5 -1
- package/dist/{ecl-DxW3FiJi.js → ecl--fKn7yzB.js} +9 -1
- package/dist/{elixir-BI40g7TU.js → elixir-DUhH17ON.js} +87 -1
- package/dist/{flow9-tR2v0bGz.js → flow9-B3Dx2LLe.js} +8 -1
- package/dist/{freemarker2-Bfqhwyij.js → freemarker2-CYRLpyjt.js} +359 -7
- package/dist/{fsharp-BLAma0OT.js → fsharp-SyqBfUAR.js} +14 -1
- package/dist/{go-nYcD3y4Z.js → go-BbMR2tdT.js} +17 -1
- package/dist/{graphql-Dp1cHWmP.js → graphql-DDJE6tIl.js} +17 -1
- package/dist/{handlebars-DCgKNBmn.js → handlebars-R8Efxi60.js} +38 -4
- package/dist/{hcl-6NT8Kbna.js → hcl-YBvpaUqf.js} +13 -1
- package/dist/{html-C6wR7sMB.js → html-czhjovcp.js} +37 -4
- package/dist/htmlMode-DpyKDYYs.js +1587 -0
- package/dist/{ini-BZCOLrEc.js → ini-Ct73dBtM.js} +10 -1
- package/dist/{java-DAMcfJbX.js → java-C_jlkwoG.js} +18 -1
- package/dist/{javascript-D1L5MTmg.js → javascript-DwqkMEdb.js} +3 -2
- package/dist/jsonMode-Cmxxe0W9.js +2002 -0
- package/dist/{julia-CQ46G71H.js → julia-D8WE5U1e.js} +22 -1
- package/dist/{kotlin-CEjVo_6E.js → kotlin-Zy9aq5yB.js} +15 -1
- package/dist/{less-DreV99nP.js → less-sZ0iHtE8.js} +1 -1
- package/dist/{lexon-DBVJhqLb.js → lexon-CsdNL29A.js} +13 -1
- package/dist/{liquid-D_pDYIs1.js → liquid-2spuEcBh.js} +12 -4
- package/dist/{lua-Dcc_j6L-.js → lua-C2YJo0zw.js} +12 -1
- package/dist/{m3-B9SlZL4n.js → m3-CPLP40SG.js} +7 -1
- package/dist/{markdown-CuGw9_MP.js → markdown-B1mf5e0R.js} +34 -1
- package/dist/{mdx-CKsJ3cF4.js → mdx-BjBXyEeR.js} +2 -2
- package/dist/{micro-app-entry-xdTX5-ut.js → micro-app-entry-DYAnCRDo.js} +8132 -9649
- package/dist/micro-app.bundle.js +3 -3
- package/dist/micro-app.js +3565 -6710
- package/dist/{mips-BUWqP-OH.js → mips-DA33BZX1.js} +11 -1
- package/dist/{msdax-DtkouYCg.js → msdax-CCYFIQsP.js} +5 -1
- package/dist/{mysql-IkAsWSmF.js → mysql-hjmIjL-D.js} +11 -3
- package/dist/{objective-c-B2-ronfg.js → objective-c-RRCpEmqC.js} +2 -1
- package/dist/{pascal-Bsnz2eJA.js → pascal-CeV8XfxB.js} +13 -1
- package/dist/{pascaligo-D_sMUn0Q.js → pascaligo-IEEGVJAJ.js} +13 -1
- package/dist/{perl-BPzHt9SS.js → perl-B5-QbHq_.js} +34 -1
- package/dist/{pgsql-DlTJB0PD.js → pgsql-s6kqEJmi.js} +14 -4
- package/dist/{php-Dmq5OjwK.js → php-CWWqzOo8.js} +36 -1
- package/dist/{pla-HJcccrBy.js → pla-FSvb_YP_.js} +13 -1
- package/dist/{postiats-OQn6DKv-.js → postiats-DQdscQXO.js} +370 -1
- package/dist/{powerquery-DKaMYC8w.js → powerquery-CtA5JA1I.js} +7 -1
- package/dist/{powershell-DWeJHik1.js → powershell-DglEq96N.js} +13 -1
- package/dist/{protobuf-CBn_IseU.js → protobuf-BSepub3e.js} +5 -1
- package/dist/{pug-BoRpCINl.js → pug-B1847F4G.js} +16 -1
- package/dist/{python-zPpZYwLF.js → python-DLI1ji08.js} +59 -11
- package/dist/{qsharp-4rGyVZOw.js → qsharp-D4i0Nqg9.js} +28 -3
- package/dist/{r-DsgLhBOb.js → r-cdRigKxa.js} +5 -1
- package/dist/{razor-B_fCUeGX.js → razor-oAnIJsrL.js} +48 -4
- package/dist/{redis-B2fdL4Bg.js → redis-D9MFxvE8.js} +16 -6
- package/dist/{redshift-DoaeyCkH.js → redshift-CmCnsvL-.js} +13 -4
- package/dist/{restructuredtext-D-6OFBY9.js → restructuredtext-CWy8J51t.js} +19 -1
- package/dist/{ruby-D1DD6baV.js → ruby-WP-c36m5.js} +76 -3
- package/dist/runtime.js +34 -45
- package/dist/{rust-DssUV39M.js → rust-Q9FLdYpu.js} +13 -1
- package/dist/{sb-Dmb6tAdv.js → sb-C54-JBGT.js} +12 -1
- package/dist/{scala-Co3ETaym.js → scala-CzbFImc5.js} +24 -1
- package/dist/{scheme-CMrqXTty.js → scheme-BhfDmYN3.js} +1 -1
- package/dist/{scss-DkGudv8Q.js → scss-CEmiBXpS.js} +25 -1
- package/dist/{shell-BHN2BI4L.js → shell-Bmc1VhG0.js} +4 -1
- package/dist/{solidity-b-R-raGB.js → solidity-C9Q2I8Hh.js} +23 -1
- package/dist/{sophia-Y4GjyxNB.js → sophia-jWa1UyKz.js} +16 -1
- package/dist/{sparql-CDAPZb88.js → sparql-CM7jctbc.js} +15 -1
- package/dist/{sql-DkkpPiUq.js → sql-WzihTkbg.js} +42 -1
- package/dist/{st-CSPV91Ej.js → st-6y7_3aup.js} +8 -1
- package/dist/style.css +1 -1
- package/dist/{swift-DdSC5O48.js → swift-k-0zxG_D.js} +4 -1
- package/dist/{systemverilog-CI03XpAv.js → systemverilog-Pnr5_rIP.js} +29 -3
- package/dist/{tcl-B8DayMSI.js → tcl-fNPXval8.js} +7 -1
- package/dist/tsMode-D_PMsbjK.js +976 -0
- package/dist/{twig-B1AUPVB_.js → twig-L2MkztkV.js} +76 -1
- package/dist/{typescript-DrlYcCUn.js → typescript-Bu3ZbtQI.js} +23 -2
- package/dist/typespec-Cqqo-3Pt.js +123 -0
- package/dist/{vb-BIC7ccdG.js → vb-B5YC2xN9.js} +15 -1
- package/dist/{wgsl-C9yjop46.js → wgsl-D9BRtftY.js} +26 -1
- package/dist/{xml-BzP9D0eZ.js → xml-CNSSkPqy.js} +8 -2
- package/dist/{yaml-CT7GOvXu.js → yaml-5RF_PGNe.js} +30 -2
- package/handlers/compiler.ts +196 -16
- package/handlers/context-setup.ts +10 -5
- package/handlers/handler-api-factory.ts +358 -0
- package/handlers/handler-api.ts +379 -0
- package/handlers/handler-executor.ts +25 -5
- package/handlers/handler-scope.ts +398 -0
- package/handlers/index.ts +34 -2
- package/handlers/runtime-api/component-properties.ts +0 -8
- package/handlers/runtime-api/index.ts +1 -1
- package/handlers/runtime-api/toast.ts +1 -1
- package/index.ts +14 -115
- package/micro-app/README.md +10 -10
- package/micro-app/state/MicroAppRuntimeContext.ts +1 -28
- package/micro-app-entry.ts +0 -5
- package/package.json +22 -1
- package/redux/actions/application/index.ts +0 -1
- package/redux/actions/component/addComponentAction.ts +15 -4
- package/redux/actions/component/moveDraggedComponent.ts +1 -2
- package/redux/actions/component/update-component-name.ts +1 -1
- package/redux/actions/component/updateComponentAttributes.ts +7 -2
- package/redux/handlers/functions/build-function-handler.ts +11 -3
- package/redux/handlers/functions/deploy-function-handler.ts +11 -3
- package/redux/handlers/functions/invoke-function-handler.ts +11 -3
- package/redux/handlers/functions/load-functions-handler.ts +2 -1
- package/redux/handlers/functions/update-function-handler.ts +2 -1
- package/redux/store/component/component.interface.ts +8 -2
- package/redux/store/component/store.ts +1 -4
- package/state/runtime-context.ts +1 -23
- package/utils/RuntimeContextHelpers.ts +221 -90
- package/utils/change-detection.ts +125 -1
- package/utils/clipboard-utils.ts +18 -8
- package/utils/component-registry.ts +118 -0
- package/utils/index.ts +14 -1
- package/utils/naming-generator.ts +3 -1
- package/utils/randomness.ts +3 -1
- package/utils/register-components.ts +21 -29
- package/utils/render-util.ts +27 -48
- package/utils/toast.ts +97 -0
- package/vite.config.ts +29 -12
- package/components/ui/components/Event/EventAttribute/EventAttribute.style.ts +0 -11
- package/components/ui/components/Event/EventAttribute/EventAttribute.ts +0 -28
- package/components/ui/components/base/BaseElement/calculateStyles.ts +0 -31
- package/components/ui/components/base/BaseElement/drag-events.helpers.ts +0 -71
- package/components/ui/components/base/BaseElement/execute-event.helpers.ts +0 -45
- package/components/ui/components/base/BaseElement/interactions.helpers.ts +0 -14
- package/components/ui/components/wrappers/ComponentTitle/ComponentTitle.ts +0 -95
- package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.style.ts +0 -102
- package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.ts +0 -258
- package/components/ui/components/wrappers/PreviewWrapper.ts +0 -28
- package/components/ui/components/wrappers/RectangleSelection/RectangleSelection.ts +0 -154
- package/components/ui/nuraly-ui/packages/common/dist/constants/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/constants/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/constants.d.ts +0 -17
- package/components/ui/nuraly-ui/packages/common/dist/constants.js +0 -7
- package/components/ui/nuraly-ui/packages/common/dist/controllers/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/controllers/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/controllers.d.ts +0 -21
- package/components/ui/nuraly-ui/packages/common/dist/controllers.js +0 -22
- package/components/ui/nuraly-ui/packages/common/dist/index.d.ts +0 -25
- package/components/ui/nuraly-ui/packages/common/dist/index.js +0 -27
- package/components/ui/nuraly-ui/packages/common/dist/mixins/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/mixins/index.js +0 -3
- package/components/ui/nuraly-ui/packages/common/dist/mixins.d.ts +0 -26
- package/components/ui/nuraly-ui/packages/common/dist/mixins.js +0 -29
- package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.d.ts +0 -42
- package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.js +0 -38
- package/components/ui/nuraly-ui/packages/common/dist/shared/constants.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/constants.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.d.ts +0 -77
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.js +0 -341
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.d.ts +0 -37
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.d.ts +0 -4
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.js +0 -4
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.d.ts +0 -48
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.js +0 -133
- package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.d.ts +0 -37
- package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.js +0 -141
- package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.d.ts +0 -64
- package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.js +0 -95
- package/components/ui/nuraly-ui/packages/common/dist/shared/index.d.ts +0 -13
- package/components/ui/nuraly-ui/packages/common/dist/shared/index.js +0 -17
- package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.d.ts +0 -78
- package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.js +0 -194
- package/components/ui/nuraly-ui/packages/common/dist/shared/themes.d.ts +0 -44
- package/components/ui/nuraly-ui/packages/common/dist/shared/themes.js +0 -85
- package/components/ui/nuraly-ui/packages/common/dist/shared/utils.d.ts +0 -60
- package/components/ui/nuraly-ui/packages/common/dist/shared/utils.js +0 -85
- package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.d.ts +0 -108
- package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.js +0 -17
- package/components/ui/nuraly-ui/packages/common/dist/themes/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/themes/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/themes.d.ts +0 -22
- package/components/ui/nuraly-ui/packages/common/dist/themes.js +0 -23
- package/components/ui/nuraly-ui/packages/common/dist/utils/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/utils/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/utils.d.ts +0 -21
- package/components/ui/nuraly-ui/packages/common/dist/utils.js +0 -22
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/LICENSE +0 -15
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/README.md +0 -294
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy-sync.js +0 -171
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy.js +0 -175
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/index.js +0 -7
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/empty/index.js +0 -39
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/file.js +0 -66
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/index.js +0 -23
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/link.js +0 -64
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/fs/index.js +0 -146
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/index.js +0 -16
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/index.js +0 -16
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json.js +0 -12
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/index.js +0 -7
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move-sync.js +0 -55
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move.js +0 -59
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/output-file/index.js +0 -31
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/path-exists/index.js +0 -12
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/remove/index.js +0 -17
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/async.js +0 -29
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/stat.js +0 -159
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/utimes.js +0 -36
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/LICENSE +0 -15
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/README.md +0 -294
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy-sync.js +0 -171
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy.js +0 -175
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/index.js +0 -7
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/empty/index.js +0 -39
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/file.js +0 -66
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/index.js +0 -23
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/link.js +0 -64
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/fs/index.js +0 -146
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/index.js +0 -16
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/index.js +0 -16
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json.js +0 -12
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/index.js +0 -7
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move-sync.js +0 -55
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move.js +0 -59
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/output-file/index.js +0 -31
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/path-exists/index.js +0 -12
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/remove/index.js +0 -17
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/async.js +0 -29
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/stat.js +0 -159
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/utimes.js +0 -36
- package/dist/SmartAttributeHandler-C4EliaG0.js +0 -153
- package/dist/SmartAttributeHandler-u-ZHGueR.js +0 -193
- package/dist/assets/editor.worker-C_S4Avdt.js +0 -11
- package/dist/assets/html.worker-DfuQASUV.js +0 -458
- package/dist/assets/json.worker-Cucz4wxY.js +0 -42
- package/dist/assets/ts.worker-Dme6S0YK.js +0 -37021
- package/dist/cssMode-CqMQ6Xsa.js +0 -1443
- package/dist/htmlMode-KglxyZXm.js +0 -1453
- package/dist/jsonMode-B3rqxD-b.js +0 -1863
- package/dist/tsMode-DEiq8fQ0.js +0 -800
- package/redux/actions/application/loadApplicationPermissionAction.ts +0 -10
- package/utils/styleUtil.ts +0 -7
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const u = require('universalify').fromPromise
|
|
4
|
-
const path = require('path')
|
|
5
|
-
const fs = require('../fs')
|
|
6
|
-
const mkdir = require('../mkdirs')
|
|
7
|
-
|
|
8
|
-
async function createFile (file) {
|
|
9
|
-
let stats
|
|
10
|
-
try {
|
|
11
|
-
stats = await fs.stat(file)
|
|
12
|
-
} catch { }
|
|
13
|
-
if (stats && stats.isFile()) return
|
|
14
|
-
|
|
15
|
-
const dir = path.dirname(file)
|
|
16
|
-
|
|
17
|
-
let dirStats = null
|
|
18
|
-
try {
|
|
19
|
-
dirStats = await fs.stat(dir)
|
|
20
|
-
} catch (err) {
|
|
21
|
-
// if the directory doesn't exist, make it
|
|
22
|
-
if (err.code === 'ENOENT') {
|
|
23
|
-
await mkdir.mkdirs(dir)
|
|
24
|
-
await fs.writeFile(file, '')
|
|
25
|
-
return
|
|
26
|
-
} else {
|
|
27
|
-
throw err
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (dirStats.isDirectory()) {
|
|
32
|
-
await fs.writeFile(file, '')
|
|
33
|
-
} else {
|
|
34
|
-
// parent is not a directory
|
|
35
|
-
// This is just to cause an internal ENOTDIR error to be thrown
|
|
36
|
-
await fs.readdir(dir)
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function createFileSync (file) {
|
|
41
|
-
let stats
|
|
42
|
-
try {
|
|
43
|
-
stats = fs.statSync(file)
|
|
44
|
-
} catch { }
|
|
45
|
-
if (stats && stats.isFile()) return
|
|
46
|
-
|
|
47
|
-
const dir = path.dirname(file)
|
|
48
|
-
try {
|
|
49
|
-
if (!fs.statSync(dir).isDirectory()) {
|
|
50
|
-
// parent is not a directory
|
|
51
|
-
// This is just to cause an internal ENOTDIR error to be thrown
|
|
52
|
-
fs.readdirSync(dir)
|
|
53
|
-
}
|
|
54
|
-
} catch (err) {
|
|
55
|
-
// If the stat call above failed because the directory doesn't exist, create it
|
|
56
|
-
if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)
|
|
57
|
-
else throw err
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
fs.writeFileSync(file, '')
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
module.exports = {
|
|
64
|
-
createFile: u(createFile),
|
|
65
|
-
createFileSync
|
|
66
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { createFile, createFileSync } = require('./file')
|
|
4
|
-
const { createLink, createLinkSync } = require('./link')
|
|
5
|
-
const { createSymlink, createSymlinkSync } = require('./symlink')
|
|
6
|
-
|
|
7
|
-
module.exports = {
|
|
8
|
-
// file
|
|
9
|
-
createFile,
|
|
10
|
-
createFileSync,
|
|
11
|
-
ensureFile: createFile,
|
|
12
|
-
ensureFileSync: createFileSync,
|
|
13
|
-
// link
|
|
14
|
-
createLink,
|
|
15
|
-
createLinkSync,
|
|
16
|
-
ensureLink: createLink,
|
|
17
|
-
ensureLinkSync: createLinkSync,
|
|
18
|
-
// symlink
|
|
19
|
-
createSymlink,
|
|
20
|
-
createSymlinkSync,
|
|
21
|
-
ensureSymlink: createSymlink,
|
|
22
|
-
ensureSymlinkSync: createSymlinkSync
|
|
23
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const u = require('universalify').fromPromise
|
|
4
|
-
const path = require('path')
|
|
5
|
-
const fs = require('../fs')
|
|
6
|
-
const mkdir = require('../mkdirs')
|
|
7
|
-
const { pathExists } = require('../path-exists')
|
|
8
|
-
const { areIdentical } = require('../util/stat')
|
|
9
|
-
|
|
10
|
-
async function createLink (srcpath, dstpath) {
|
|
11
|
-
let dstStat
|
|
12
|
-
try {
|
|
13
|
-
dstStat = await fs.lstat(dstpath)
|
|
14
|
-
} catch {
|
|
15
|
-
// ignore error
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
let srcStat
|
|
19
|
-
try {
|
|
20
|
-
srcStat = await fs.lstat(srcpath)
|
|
21
|
-
} catch (err) {
|
|
22
|
-
err.message = err.message.replace('lstat', 'ensureLink')
|
|
23
|
-
throw err
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (dstStat && areIdentical(srcStat, dstStat)) return
|
|
27
|
-
|
|
28
|
-
const dir = path.dirname(dstpath)
|
|
29
|
-
|
|
30
|
-
const dirExists = await pathExists(dir)
|
|
31
|
-
|
|
32
|
-
if (!dirExists) {
|
|
33
|
-
await mkdir.mkdirs(dir)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
await fs.link(srcpath, dstpath)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function createLinkSync (srcpath, dstpath) {
|
|
40
|
-
let dstStat
|
|
41
|
-
try {
|
|
42
|
-
dstStat = fs.lstatSync(dstpath)
|
|
43
|
-
} catch {}
|
|
44
|
-
|
|
45
|
-
try {
|
|
46
|
-
const srcStat = fs.lstatSync(srcpath)
|
|
47
|
-
if (dstStat && areIdentical(srcStat, dstStat)) return
|
|
48
|
-
} catch (err) {
|
|
49
|
-
err.message = err.message.replace('lstat', 'ensureLink')
|
|
50
|
-
throw err
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const dir = path.dirname(dstpath)
|
|
54
|
-
const dirExists = fs.existsSync(dir)
|
|
55
|
-
if (dirExists) return fs.linkSync(srcpath, dstpath)
|
|
56
|
-
mkdir.mkdirsSync(dir)
|
|
57
|
-
|
|
58
|
-
return fs.linkSync(srcpath, dstpath)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
module.exports = {
|
|
62
|
-
createLink: u(createLink),
|
|
63
|
-
createLinkSync
|
|
64
|
-
}
|
package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-paths.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const path = require('path')
|
|
4
|
-
const fs = require('../fs')
|
|
5
|
-
const { pathExists } = require('../path-exists')
|
|
6
|
-
|
|
7
|
-
const u = require('universalify').fromPromise
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Function that returns two types of paths, one relative to symlink, and one
|
|
11
|
-
* relative to the current working directory. Checks if path is absolute or
|
|
12
|
-
* relative. If the path is relative, this function checks if the path is
|
|
13
|
-
* relative to symlink or relative to current working directory. This is an
|
|
14
|
-
* initiative to find a smarter `srcpath` to supply when building symlinks.
|
|
15
|
-
* This allows you to determine which path to use out of one of three possible
|
|
16
|
-
* types of source paths. The first is an absolute path. This is detected by
|
|
17
|
-
* `path.isAbsolute()`. When an absolute path is provided, it is checked to
|
|
18
|
-
* see if it exists. If it does it's used, if not an error is returned
|
|
19
|
-
* (callback)/ thrown (sync). The other two options for `srcpath` are a
|
|
20
|
-
* relative url. By default Node's `fs.symlink` works by creating a symlink
|
|
21
|
-
* using `dstpath` and expects the `srcpath` to be relative to the newly
|
|
22
|
-
* created symlink. If you provide a `srcpath` that does not exist on the file
|
|
23
|
-
* system it results in a broken symlink. To minimize this, the function
|
|
24
|
-
* checks to see if the 'relative to symlink' source file exists, and if it
|
|
25
|
-
* does it will use it. If it does not, it checks if there's a file that
|
|
26
|
-
* exists that is relative to the current working directory, if does its used.
|
|
27
|
-
* This preserves the expectations of the original fs.symlink spec and adds
|
|
28
|
-
* the ability to pass in `relative to current working direcotry` paths.
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
async function symlinkPaths (srcpath, dstpath) {
|
|
32
|
-
if (path.isAbsolute(srcpath)) {
|
|
33
|
-
try {
|
|
34
|
-
await fs.lstat(srcpath)
|
|
35
|
-
} catch (err) {
|
|
36
|
-
err.message = err.message.replace('lstat', 'ensureSymlink')
|
|
37
|
-
throw err
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return {
|
|
41
|
-
toCwd: srcpath,
|
|
42
|
-
toDst: srcpath
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const dstdir = path.dirname(dstpath)
|
|
47
|
-
const relativeToDst = path.join(dstdir, srcpath)
|
|
48
|
-
|
|
49
|
-
const exists = await pathExists(relativeToDst)
|
|
50
|
-
if (exists) {
|
|
51
|
-
return {
|
|
52
|
-
toCwd: relativeToDst,
|
|
53
|
-
toDst: srcpath
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
try {
|
|
58
|
-
await fs.lstat(srcpath)
|
|
59
|
-
} catch (err) {
|
|
60
|
-
err.message = err.message.replace('lstat', 'ensureSymlink')
|
|
61
|
-
throw err
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return {
|
|
65
|
-
toCwd: srcpath,
|
|
66
|
-
toDst: path.relative(dstdir, srcpath)
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function symlinkPathsSync (srcpath, dstpath) {
|
|
71
|
-
if (path.isAbsolute(srcpath)) {
|
|
72
|
-
const exists = fs.existsSync(srcpath)
|
|
73
|
-
if (!exists) throw new Error('absolute srcpath does not exist')
|
|
74
|
-
return {
|
|
75
|
-
toCwd: srcpath,
|
|
76
|
-
toDst: srcpath
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const dstdir = path.dirname(dstpath)
|
|
81
|
-
const relativeToDst = path.join(dstdir, srcpath)
|
|
82
|
-
const exists = fs.existsSync(relativeToDst)
|
|
83
|
-
if (exists) {
|
|
84
|
-
return {
|
|
85
|
-
toCwd: relativeToDst,
|
|
86
|
-
toDst: srcpath
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const srcExists = fs.existsSync(srcpath)
|
|
91
|
-
if (!srcExists) throw new Error('relative srcpath does not exist')
|
|
92
|
-
return {
|
|
93
|
-
toCwd: srcpath,
|
|
94
|
-
toDst: path.relative(dstdir, srcpath)
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
module.exports = {
|
|
99
|
-
symlinkPaths: u(symlinkPaths),
|
|
100
|
-
symlinkPathsSync
|
|
101
|
-
}
|
package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-type.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const fs = require('../fs')
|
|
4
|
-
const u = require('universalify').fromPromise
|
|
5
|
-
|
|
6
|
-
async function symlinkType (srcpath, type) {
|
|
7
|
-
if (type) return type
|
|
8
|
-
|
|
9
|
-
let stats
|
|
10
|
-
try {
|
|
11
|
-
stats = await fs.lstat(srcpath)
|
|
12
|
-
} catch {
|
|
13
|
-
return 'file'
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return (stats && stats.isDirectory()) ? 'dir' : 'file'
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function symlinkTypeSync (srcpath, type) {
|
|
20
|
-
if (type) return type
|
|
21
|
-
|
|
22
|
-
let stats
|
|
23
|
-
try {
|
|
24
|
-
stats = fs.lstatSync(srcpath)
|
|
25
|
-
} catch {
|
|
26
|
-
return 'file'
|
|
27
|
-
}
|
|
28
|
-
return (stats && stats.isDirectory()) ? 'dir' : 'file'
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
module.exports = {
|
|
32
|
-
symlinkType: u(symlinkType),
|
|
33
|
-
symlinkTypeSync
|
|
34
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const u = require('universalify').fromPromise
|
|
4
|
-
const path = require('path')
|
|
5
|
-
const fs = require('../fs')
|
|
6
|
-
|
|
7
|
-
const { mkdirs, mkdirsSync } = require('../mkdirs')
|
|
8
|
-
|
|
9
|
-
const { symlinkPaths, symlinkPathsSync } = require('./symlink-paths')
|
|
10
|
-
const { symlinkType, symlinkTypeSync } = require('./symlink-type')
|
|
11
|
-
|
|
12
|
-
const { pathExists } = require('../path-exists')
|
|
13
|
-
|
|
14
|
-
const { areIdentical } = require('../util/stat')
|
|
15
|
-
|
|
16
|
-
async function createSymlink (srcpath, dstpath, type) {
|
|
17
|
-
let stats
|
|
18
|
-
try {
|
|
19
|
-
stats = await fs.lstat(dstpath)
|
|
20
|
-
} catch { }
|
|
21
|
-
|
|
22
|
-
if (stats && stats.isSymbolicLink()) {
|
|
23
|
-
const [srcStat, dstStat] = await Promise.all([
|
|
24
|
-
fs.stat(srcpath),
|
|
25
|
-
fs.stat(dstpath)
|
|
26
|
-
])
|
|
27
|
-
|
|
28
|
-
if (areIdentical(srcStat, dstStat)) return
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const relative = await symlinkPaths(srcpath, dstpath)
|
|
32
|
-
srcpath = relative.toDst
|
|
33
|
-
const toType = await symlinkType(relative.toCwd, type)
|
|
34
|
-
const dir = path.dirname(dstpath)
|
|
35
|
-
|
|
36
|
-
if (!(await pathExists(dir))) {
|
|
37
|
-
await mkdirs(dir)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return fs.symlink(srcpath, dstpath, toType)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function createSymlinkSync (srcpath, dstpath, type) {
|
|
44
|
-
let stats
|
|
45
|
-
try {
|
|
46
|
-
stats = fs.lstatSync(dstpath)
|
|
47
|
-
} catch { }
|
|
48
|
-
if (stats && stats.isSymbolicLink()) {
|
|
49
|
-
const srcStat = fs.statSync(srcpath)
|
|
50
|
-
const dstStat = fs.statSync(dstpath)
|
|
51
|
-
if (areIdentical(srcStat, dstStat)) return
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const relative = symlinkPathsSync(srcpath, dstpath)
|
|
55
|
-
srcpath = relative.toDst
|
|
56
|
-
type = symlinkTypeSync(relative.toCwd, type)
|
|
57
|
-
const dir = path.dirname(dstpath)
|
|
58
|
-
const exists = fs.existsSync(dir)
|
|
59
|
-
if (exists) return fs.symlinkSync(srcpath, dstpath, type)
|
|
60
|
-
mkdirsSync(dir)
|
|
61
|
-
return fs.symlinkSync(srcpath, dstpath, type)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
module.exports = {
|
|
65
|
-
createSymlink: u(createSymlink),
|
|
66
|
-
createSymlinkSync
|
|
67
|
-
}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
// This is adapted from https://github.com/normalize/mz
|
|
3
|
-
// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
|
|
4
|
-
const u = require('universalify').fromCallback
|
|
5
|
-
const fs = require('graceful-fs')
|
|
6
|
-
|
|
7
|
-
const api = [
|
|
8
|
-
'access',
|
|
9
|
-
'appendFile',
|
|
10
|
-
'chmod',
|
|
11
|
-
'chown',
|
|
12
|
-
'close',
|
|
13
|
-
'copyFile',
|
|
14
|
-
'cp',
|
|
15
|
-
'fchmod',
|
|
16
|
-
'fchown',
|
|
17
|
-
'fdatasync',
|
|
18
|
-
'fstat',
|
|
19
|
-
'fsync',
|
|
20
|
-
'ftruncate',
|
|
21
|
-
'futimes',
|
|
22
|
-
'glob',
|
|
23
|
-
'lchmod',
|
|
24
|
-
'lchown',
|
|
25
|
-
'lutimes',
|
|
26
|
-
'link',
|
|
27
|
-
'lstat',
|
|
28
|
-
'mkdir',
|
|
29
|
-
'mkdtemp',
|
|
30
|
-
'open',
|
|
31
|
-
'opendir',
|
|
32
|
-
'readdir',
|
|
33
|
-
'readFile',
|
|
34
|
-
'readlink',
|
|
35
|
-
'realpath',
|
|
36
|
-
'rename',
|
|
37
|
-
'rm',
|
|
38
|
-
'rmdir',
|
|
39
|
-
'stat',
|
|
40
|
-
'statfs',
|
|
41
|
-
'symlink',
|
|
42
|
-
'truncate',
|
|
43
|
-
'unlink',
|
|
44
|
-
'utimes',
|
|
45
|
-
'writeFile'
|
|
46
|
-
].filter(key => {
|
|
47
|
-
// Some commands are not available on some systems. Ex:
|
|
48
|
-
// fs.cp was added in Node.js v16.7.0
|
|
49
|
-
// fs.statfs was added in Node v19.6.0, v18.15.0
|
|
50
|
-
// fs.glob was added in Node.js v22.0.0
|
|
51
|
-
// fs.lchown is not available on at least some Linux
|
|
52
|
-
return typeof fs[key] === 'function'
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
// Export cloned fs:
|
|
56
|
-
Object.assign(exports, fs)
|
|
57
|
-
|
|
58
|
-
// Universalify async methods:
|
|
59
|
-
api.forEach(method => {
|
|
60
|
-
exports[method] = u(fs[method])
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
// We differ from mz/fs in that we still ship the old, broken, fs.exists()
|
|
64
|
-
// since we are a drop-in replacement for the native module
|
|
65
|
-
exports.exists = function (filename, callback) {
|
|
66
|
-
if (typeof callback === 'function') {
|
|
67
|
-
return fs.exists(filename, callback)
|
|
68
|
-
}
|
|
69
|
-
return new Promise(resolve => {
|
|
70
|
-
return fs.exists(filename, resolve)
|
|
71
|
-
})
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// fs.read(), fs.write(), fs.readv(), & fs.writev() need special treatment due to multiple callback args
|
|
75
|
-
|
|
76
|
-
exports.read = function (fd, buffer, offset, length, position, callback) {
|
|
77
|
-
if (typeof callback === 'function') {
|
|
78
|
-
return fs.read(fd, buffer, offset, length, position, callback)
|
|
79
|
-
}
|
|
80
|
-
return new Promise((resolve, reject) => {
|
|
81
|
-
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
|
|
82
|
-
if (err) return reject(err)
|
|
83
|
-
resolve({ bytesRead, buffer })
|
|
84
|
-
})
|
|
85
|
-
})
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// Function signature can be
|
|
89
|
-
// fs.write(fd, buffer[, offset[, length[, position]]], callback)
|
|
90
|
-
// OR
|
|
91
|
-
// fs.write(fd, string[, position[, encoding]], callback)
|
|
92
|
-
// We need to handle both cases, so we use ...args
|
|
93
|
-
exports.write = function (fd, buffer, ...args) {
|
|
94
|
-
if (typeof args[args.length - 1] === 'function') {
|
|
95
|
-
return fs.write(fd, buffer, ...args)
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return new Promise((resolve, reject) => {
|
|
99
|
-
fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
|
|
100
|
-
if (err) return reject(err)
|
|
101
|
-
resolve({ bytesWritten, buffer })
|
|
102
|
-
})
|
|
103
|
-
})
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// Function signature is
|
|
107
|
-
// s.readv(fd, buffers[, position], callback)
|
|
108
|
-
// We need to handle the optional arg, so we use ...args
|
|
109
|
-
exports.readv = function (fd, buffers, ...args) {
|
|
110
|
-
if (typeof args[args.length - 1] === 'function') {
|
|
111
|
-
return fs.readv(fd, buffers, ...args)
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return new Promise((resolve, reject) => {
|
|
115
|
-
fs.readv(fd, buffers, ...args, (err, bytesRead, buffers) => {
|
|
116
|
-
if (err) return reject(err)
|
|
117
|
-
resolve({ bytesRead, buffers })
|
|
118
|
-
})
|
|
119
|
-
})
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Function signature is
|
|
123
|
-
// s.writev(fd, buffers[, position], callback)
|
|
124
|
-
// We need to handle the optional arg, so we use ...args
|
|
125
|
-
exports.writev = function (fd, buffers, ...args) {
|
|
126
|
-
if (typeof args[args.length - 1] === 'function') {
|
|
127
|
-
return fs.writev(fd, buffers, ...args)
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return new Promise((resolve, reject) => {
|
|
131
|
-
fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {
|
|
132
|
-
if (err) return reject(err)
|
|
133
|
-
resolve({ bytesWritten, buffers })
|
|
134
|
-
})
|
|
135
|
-
})
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// fs.realpath.native sometimes not available if fs is monkey-patched
|
|
139
|
-
if (typeof fs.realpath.native === 'function') {
|
|
140
|
-
exports.realpath.native = u(fs.realpath.native)
|
|
141
|
-
} else {
|
|
142
|
-
process.emitWarning(
|
|
143
|
-
'fs.realpath.native is not a function. Is fs being monkey-patched?',
|
|
144
|
-
'Warning', 'fs-extra-WARN0003'
|
|
145
|
-
)
|
|
146
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
// Export promiseified graceful-fs:
|
|
5
|
-
...require('./fs'),
|
|
6
|
-
// Export extra methods:
|
|
7
|
-
...require('./copy'),
|
|
8
|
-
...require('./empty'),
|
|
9
|
-
...require('./ensure'),
|
|
10
|
-
...require('./json'),
|
|
11
|
-
...require('./mkdirs'),
|
|
12
|
-
...require('./move'),
|
|
13
|
-
...require('./output-file'),
|
|
14
|
-
...require('./path-exists'),
|
|
15
|
-
...require('./remove')
|
|
16
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const u = require('universalify').fromPromise
|
|
4
|
-
const jsonFile = require('./jsonfile')
|
|
5
|
-
|
|
6
|
-
jsonFile.outputJson = u(require('./output-json'))
|
|
7
|
-
jsonFile.outputJsonSync = require('./output-json-sync')
|
|
8
|
-
// aliases
|
|
9
|
-
jsonFile.outputJSON = jsonFile.outputJson
|
|
10
|
-
jsonFile.outputJSONSync = jsonFile.outputJsonSync
|
|
11
|
-
jsonFile.writeJSON = jsonFile.writeJson
|
|
12
|
-
jsonFile.writeJSONSync = jsonFile.writeJsonSync
|
|
13
|
-
jsonFile.readJSON = jsonFile.readJson
|
|
14
|
-
jsonFile.readJSONSync = jsonFile.readJsonSync
|
|
15
|
-
|
|
16
|
-
module.exports = jsonFile
|
package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json-sync.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { stringify } = require('jsonfile/utils')
|
|
4
|
-
const { outputFileSync } = require('../output-file')
|
|
5
|
-
|
|
6
|
-
function outputJsonSync (file, data, options) {
|
|
7
|
-
const str = stringify(data, options)
|
|
8
|
-
|
|
9
|
-
outputFileSync(file, str, options)
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
module.exports = outputJsonSync
|
package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { stringify } = require('jsonfile/utils')
|
|
4
|
-
const { outputFile } = require('../output-file')
|
|
5
|
-
|
|
6
|
-
async function outputJson (file, data, options = {}) {
|
|
7
|
-
const str = stringify(data, options)
|
|
8
|
-
|
|
9
|
-
await outputFile(file, str, options)
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
module.exports = outputJson
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
const u = require('universalify').fromPromise
|
|
3
|
-
const { makeDir: _makeDir, makeDirSync } = require('./make-dir')
|
|
4
|
-
const makeDir = u(_makeDir)
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
mkdirs: makeDir,
|
|
8
|
-
mkdirsSync: makeDirSync,
|
|
9
|
-
// alias
|
|
10
|
-
mkdirp: makeDir,
|
|
11
|
-
mkdirpSync: makeDirSync,
|
|
12
|
-
ensureDir: makeDir,
|
|
13
|
-
ensureDirSync: makeDirSync
|
|
14
|
-
}
|
package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/make-dir.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
const fs = require('../fs')
|
|
3
|
-
const { checkPath } = require('./utils')
|
|
4
|
-
|
|
5
|
-
const getMode = options => {
|
|
6
|
-
const defaults = { mode: 0o777 }
|
|
7
|
-
if (typeof options === 'number') return options
|
|
8
|
-
return ({ ...defaults, ...options }).mode
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
module.exports.makeDir = async (dir, options) => {
|
|
12
|
-
checkPath(dir)
|
|
13
|
-
|
|
14
|
-
return fs.mkdir(dir, {
|
|
15
|
-
mode: getMode(options),
|
|
16
|
-
recursive: true
|
|
17
|
-
})
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
module.exports.makeDirSync = (dir, options) => {
|
|
21
|
-
checkPath(dir)
|
|
22
|
-
|
|
23
|
-
return fs.mkdirSync(dir, {
|
|
24
|
-
mode: getMode(options),
|
|
25
|
-
recursive: true
|
|
26
|
-
})
|
|
27
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// Adapted from https://github.com/sindresorhus/make-dir
|
|
2
|
-
// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
3
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
-
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
5
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
6
|
-
'use strict'
|
|
7
|
-
const path = require('path')
|
|
8
|
-
|
|
9
|
-
// https://github.com/nodejs/node/issues/8987
|
|
10
|
-
// https://github.com/libuv/libuv/pull/1088
|
|
11
|
-
module.exports.checkPath = function checkPath (pth) {
|
|
12
|
-
if (process.platform === 'win32') {
|
|
13
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
|
|
14
|
-
|
|
15
|
-
if (pathHasInvalidWinCharacters) {
|
|
16
|
-
const error = new Error(`Path contains invalid characters: ${pth}`)
|
|
17
|
-
error.code = 'EINVAL'
|
|
18
|
-
throw error
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|