@myagentroam/server 0.13.21 → 0.13.23
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/node_modules/@myagentroam/protocol/dist/index.d.ts +60 -2
- package/node_modules/@myagentroam/protocol/dist/index.js +23 -3
- package/node_modules/@myagentroam/protocol/dist/model-connection.d.ts +10 -0
- package/node_modules/@myagentroam/protocol/dist/model-connection.js +31 -0
- package/node_modules/@myagentroam/protocol/package.json +1 -1
- package/node_modules/@myagentroam/server-core/dist/git-skill-repository.d.ts +1 -3
- package/node_modules/@myagentroam/server-core/dist/git-skill-repository.js +7 -15
- package/node_modules/@myagentroam/server-core/dist/hosted-conversation-context.js +2 -2
- package/node_modules/@myagentroam/server-core/dist/mar-agent-model-routes.js +14 -0
- package/node_modules/@myagentroam/server-core/dist/mar-agent-model-service.d.ts +4 -0
- package/node_modules/@myagentroam/server-core/dist/mar-agent-model-service.js +25 -4
- package/node_modules/@myagentroam/server-core/dist/mar-agent-runtime-model-service.js +3 -0
- package/node_modules/@myagentroam/server-core/dist/model-settings.d.ts +3 -1
- package/node_modules/@myagentroam/server-core/dist/model-settings.js +12 -2
- package/node_modules/@myagentroam/server-core/dist/node-identity-control.d.ts +1 -0
- package/node_modules/@myagentroam/server-core/dist/run-model-payload.d.ts +2 -2
- package/node_modules/@myagentroam/server-core/dist/run-model-payload.js +5 -5
- package/node_modules/@myagentroam/server-core/dist/skill-bundle.js +11 -8
- package/node_modules/@myagentroam/server-core/dist/skill-favorite-service.js +9 -3
- package/node_modules/@myagentroam/server-core/package.json +4 -7
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/server-catalog.js +1 -1
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/server-http.js +4 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/node-control.d.ts +1 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/package.json +3 -3
- package/node_modules/argparse/LICENSE +254 -0
- package/node_modules/argparse/README.md +84 -0
- package/node_modules/argparse/argparse.js +3707 -0
- package/node_modules/argparse/lib/sub.js +67 -0
- package/node_modules/argparse/lib/textwrap.js +440 -0
- package/node_modules/argparse/package.json +31 -0
- package/node_modules/js-yaml/LICENSE +21 -0
- package/node_modules/js-yaml/README.md +233 -0
- package/node_modules/js-yaml/bin/js-yaml.js +117 -0
- package/node_modules/js-yaml/dist/js-yaml.js +3022 -0
- package/node_modules/js-yaml/dist/js-yaml.js.map +1 -0
- package/node_modules/js-yaml/dist/js-yaml.min.js +2 -0
- package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -0
- package/node_modules/js-yaml/dist/js-yaml.mjs +3082 -0
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -0
- package/node_modules/js-yaml/index.js +44 -0
- package/node_modules/js-yaml/lib/common.js +50 -0
- package/node_modules/js-yaml/lib/dumper.js +937 -0
- package/node_modules/js-yaml/lib/exception.js +51 -0
- package/node_modules/js-yaml/lib/index_vite_proxy.tmp.mjs +37 -0
- package/node_modules/js-yaml/lib/loader.js +1803 -0
- package/node_modules/js-yaml/lib/schema/core.js +9 -0
- package/node_modules/js-yaml/lib/schema/default.js +20 -0
- package/node_modules/js-yaml/lib/schema/failsafe.js +14 -0
- package/node_modules/js-yaml/lib/schema/json.js +17 -0
- package/node_modules/js-yaml/lib/schema.js +109 -0
- package/node_modules/js-yaml/lib/snippet.js +96 -0
- package/node_modules/js-yaml/lib/type/binary.js +122 -0
- package/node_modules/js-yaml/lib/type/bool.js +35 -0
- package/node_modules/js-yaml/lib/type/float.js +99 -0
- package/node_modules/js-yaml/lib/type/int.js +142 -0
- package/node_modules/js-yaml/lib/type/map.js +8 -0
- package/node_modules/js-yaml/lib/type/merge.js +12 -0
- package/node_modules/js-yaml/lib/type/null.js +35 -0
- package/node_modules/js-yaml/lib/type/omap.js +45 -0
- package/node_modules/js-yaml/lib/type/pairs.js +50 -0
- package/node_modules/js-yaml/lib/type/seq.js +8 -0
- package/node_modules/js-yaml/lib/type/set.js +29 -0
- package/node_modules/js-yaml/lib/type/str.js +8 -0
- package/node_modules/js-yaml/lib/type/timestamp.js +88 -0
- package/node_modules/js-yaml/lib/type.js +66 -0
- package/node_modules/js-yaml/package.json +83 -0
- package/package.json +10 -6
- package/web/assets/{AuditManagementPage-CQjdHoKj.js → AuditManagementPage-Bw2qCPJE.js} +1 -1
- package/web/assets/{BusyIndicator-DWs9rVuU.js → BusyIndicator-1kY9qfWN.js} +1 -1
- package/web/assets/{CodeFileEditor-CB0w7_Xo.js → CodeFileEditor-CTjcQ3tS.js} +3 -3
- package/web/assets/{ConversationTemplateManagementPage-BxtdYFvJ.js → ConversationTemplateManagementPage-DLTbR6Yx.js} +1 -1
- package/web/assets/{ConversationTemplateManagementPage-IhHqdvxX.js → ConversationTemplateManagementPage-Dwj-d6Nn.js} +1 -1
- package/web/assets/{EnterpriseUserManagementPage-z2l7-iV7.js → EnterpriseUserManagementPage-QcovmjTy.js} +1 -1
- package/web/assets/{EnvironmentSecretManager-BL9CtNeg.js → EnvironmentSecretManager-pWG9Ta0i.js} +1 -1
- package/web/assets/{FilePreviewLoading-BQuELp4B.js → FilePreviewLoading-DQICPNpH.js} +1 -1
- package/web/assets/{HtmlPreviewFrame-CIE8ew5m.js → HtmlPreviewFrame-M-5_Zs5R.js} +3 -3
- package/web/assets/{LicenseManagementPage-DfmYfSd2.js → LicenseManagementPage-D48IVDDN.js} +1 -1
- package/web/assets/{ManagementPagination-DbDc_aVj.js → ManagementPagination-Bz8x8Cc3.js} +1 -1
- package/web/assets/{MarAgentModelManagementPage-BOH1i2mm.js → MarAgentModelManagementPage-BI5YdxJ-.js} +1 -1
- package/web/assets/MarAgentModelManagementPage-BS80Nbaq.js +1 -0
- package/web/assets/{MarAgentModelManagementPage-DOfx5Yxv.css → MarAgentModelManagementPage-CE7LKVJJ.css} +1 -1
- package/web/assets/{MarIcon-CmyZmJYk.js → MarIcon-D-R_Iqgk.js} +1 -1
- package/web/assets/{MarkdownFilePreview-Dfm3Ar0_.js → MarkdownFilePreview-BqgPZaJH.js} +2 -2
- package/web/assets/{McpDetailsDialog-DfKdFx1F.js → McpDetailsDialog-CEV2RaAd.js} +1 -1
- package/web/assets/{McpSourceManagementPage-1lofzIlQ.js → McpSourceManagementPage-B-DunK-k.js} +1 -1
- package/web/assets/{McpSourceManagementPage-DO339k8a.js → McpSourceManagementPage-UAHr6Ok2.js} +1 -1
- package/web/assets/{NodeDetailsDialogs-j0gbiAPd.js → NodeDetailsDialogs-CqijTLuv.js} +1 -1
- package/web/assets/NodeManagementPage-BYaR6I4C.js +1 -0
- package/web/assets/NodeManagementPage-C03fC50W.js +1 -0
- package/web/assets/{OAuthManagementPage-BN71XE8-.js → OAuthManagementPage-0NLfuZER.js} +1 -1
- package/web/assets/{OrganizationManagementPage-BXGGLWrS.js → OrganizationManagementPage-CdMnKAYX.js} +1 -1
- package/web/assets/{RemoteDesktopPage-Bfb8abwZ.js → RemoteDesktopPage-9ca_pT3U.js} +1 -1
- package/web/assets/{ResourceManagementPanel-DKL5U50B.js → ResourceManagementPanel-DeUjzXb3.js} +1 -1
- package/web/assets/{ResourceManagementPanel.vue_vue_type_script_setup_true_lang-WBjha-Tc.js → ResourceManagementPanel.vue_vue_type_script_setup_true_lang-BFIdrnhO.js} +1 -1
- package/web/assets/{SecretManagementPage-CnHIaMtx.js → SecretManagementPage-B0fRviba.js} +1 -1
- package/web/assets/SecretManagementPage-wS5xi8d3.js +1 -0
- package/web/assets/{SecretManagementPage.vue_vue_type_script_setup_true_lang-BhozPpou.js → SecretManagementPage.vue_vue_type_script_setup_true_lang-CfKC1c5_.js} +1 -1
- package/web/assets/SessionSharePage-BHuLnFb7.js +2 -0
- package/web/assets/{SettingsContent-DBxyAPeh.js → SettingsContent-BggGrmlo.js} +1 -1
- package/web/assets/{SettingsContent-YtT-5NpY.js → SettingsContent-D4kVDroA.js} +1 -1
- package/web/assets/{SkillCenterPage-BGhfLABx.js → SkillCenterPage-Bdp4bpcM.js} +1 -1
- package/web/assets/SkillCenterPage-CYuxNkS5.js +1 -0
- package/web/assets/{SkillDetailsDialog-DE9JWBnK.js → SkillDetailsDialog-pW-gzST7.js} +1 -1
- package/web/assets/{SkillSourceManagementPage-C-LDA8J_.js → SkillSourceManagementPage-DNBsZ6O-.js} +1 -1
- package/web/assets/{SkillSourceManagementPage-CW9k3_3A.js → SkillSourceManagementPage-DrkNyd-t.js} +1 -1
- package/web/assets/{StandaloneFilePreviewPage-DJ6Y0MyI.js → StandaloneFilePreviewPage-_M9U5uhK.js} +1 -1
- package/web/assets/SystemConfigurationPage-C58GrNm7.js +1 -0
- package/web/assets/{SystemConfigurationPage-PV5wtvaT.js → SystemConfigurationPage-CNi1usck.js} +1 -1
- package/web/assets/{SystemInformationPage-S4lYwwoL.js → SystemInformationPage-AcLnM3_e.js} +1 -1
- package/web/assets/{TerminalTabView-Cge3UroH.js → TerminalTabView-BSt5L7Cx.js} +1 -1
- package/web/assets/{WorkbenchPage-_n_7hxCc.css → WorkbenchPage-CJyFEHjS.css} +1 -1
- package/web/assets/WorkbenchPage-CN2-OtCY.js +22 -0
- package/web/assets/WorkspaceManagementPage-D9su8n88.js +1 -0
- package/web/assets/WorkspaceManagementPage-POBkggih.js +1 -0
- package/web/assets/{_baseIteratee-DJhNCJNw.js → _baseIteratee-BvR4fgYp.js} +1 -1
- package/web/assets/{abnfDiagram-VCTEODGH-xfmnxCmN.js → abnfDiagram-VCTEODGH-XqHHyu1S.js} +1 -1
- package/web/assets/{advancedFormat-CJJz2sTJ.js → advancedFormat-5pJd8w41.js} +1 -1
- package/web/assets/{arc-DEZzeIBO.js → arc-DSvlVvZi.js} +1 -1
- package/web/assets/{architectureDiagram-5GKGNRK7-BNi0dwgT.js → architectureDiagram-5GKGNRK7-BrNH8-Zv.js} +1 -1
- package/web/assets/{blockDiagram-OSKFZWR5-B2GsTv-3.js → blockDiagram-OSKFZWR5-S5Tm192_.js} +1 -1
- package/web/assets/{c4Diagram-7LVT6UL2-O_2lQqz5.js → c4Diagram-7LVT6UL2-C3rFyPvl.js} +1 -1
- package/web/assets/{catalog-ownership-service-rlWhvKNA.js → catalog-ownership-service-r8rMesAo.js} +1 -1
- package/web/assets/{catalog-page-service-CkqDIxEg.js → catalog-page-service-ImDTaYk9.js} +1 -1
- package/web/assets/channel-bKuk0yLE.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-DZXE1fhC.js → chunk-2Q5K7J3B-DyNrqSQN.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-cFrUkUGU.js → chunk-5VM5RSS4-hmlRCeNP.js} +1 -1
- package/web/assets/{chunk-F27PBJKO-D1cN3vZu.js → chunk-F27PBJKO-oXaQTdFU.js} +1 -1
- package/web/assets/{chunk-HLEWEB6X-WaRVUFBO.js → chunk-HLEWEB6X-CkDhM82l.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-DRF7pCW6.js → chunk-JWPE2WC7-BYVjCscS.js} +1 -1
- package/web/assets/{chunk-POPQ4Y6H-Zb6ti5FG.js → chunk-POPQ4Y6H-DV1Qeoce.js} +1 -1
- package/web/assets/{chunk-SVP7TREG-Ds12Di6a.js → chunk-SVP7TREG-BaDWc9Z6.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-CcoQ0qW9.js → chunk-XXDRQBXY-5VHfjh5_.js} +1 -1
- package/web/assets/{chunk-ZLD2IHE6-Dw0cWR1G.js → chunk-ZLD2IHE6-CM_Qm9It.js} +1 -1
- package/web/assets/classDiagram-CYGNFDIV-B3_fkURU.js +1 -0
- package/web/assets/classDiagram-v2-TLXNO2FR-B3_fkURU.js +1 -0
- package/web/assets/{conversation-history-D6nBCIqC.js → conversation-history-B1iric-r.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-CTtE359q.js → cose-bilkent-JH36ORCC-yzV8qpJT.js} +1 -1
- package/web/assets/{cynefin-OW5HDTMX-CsclVsWI.js → cynefin-OW5HDTMX-vJHwwFfl.js} +1 -1
- package/web/assets/{cynefinDiagram-5FMLGOSQ-DywBdZC1.js → cynefinDiagram-5FMLGOSQ-E3dVCmUP.js} +1 -1
- package/web/assets/{dagre-OS7QT2EB-CZ-1PVmC.js → dagre-OS7QT2EB-C9kNlv7S.js} +1 -1
- package/web/assets/{diagram-S7CK7UJ4-Di5c-Alk.js → diagram-S7CK7UJ4-jiGI6C03.js} +1 -1
- package/web/assets/{diagram-UQ7AKVKN-EcElqajR.js → diagram-UQ7AKVKN-C0K-i8ED.js} +1 -1
- package/web/assets/{diagram-VSXAHHWV-BOCkXBMO.js → diagram-VSXAHHWV-C2Rly2XM.js} +1 -1
- package/web/assets/{diagram-VX7I27RA-qTAqPqVL.js → diagram-VX7I27RA-BuALvzqD.js} +1 -1
- package/web/assets/{diagram-Z3DM3KII-DwukLyul.js → diagram-Z3DM3KII-DS9jZbJb.js} +1 -1
- package/web/assets/{ebnfDiagram-PWID7BFC-Dyq-1U-b.js → ebnfDiagram-PWID7BFC-BJV1kfbb.js} +1 -1
- package/web/assets/{el-alert-qBz7nOrd.js → el-alert-DJpbWNhh.js} +1 -1
- package/web/assets/{el-cascader-CFG3yuh8.js → el-cascader-B5jhThMw.js} +1 -1
- package/web/assets/{el-checkbox-CSKqJHq8.js → el-checkbox-DImL2zoF.js} +1 -1
- package/web/assets/{el-date-picker-EkKtqBDU.js → el-date-picker-Dh20yzhd.js} +1 -1
- package/web/assets/{el-descriptions-R-pu0u83.js → el-descriptions-CdIUAmD2.js} +1 -1
- package/web/assets/{el-form-item-D1OYqLv-.js → el-form-item-DMdcLs15.js} +1 -1
- package/web/assets/{el-input-DjLPUsCB.js → el-input-B1Cujpyw.js} +2 -2
- package/web/assets/{el-input-number-DxAn4ugC.js → el-input-number-CroGg_6h.js} +1 -1
- package/web/assets/{el-radio-CgNcvYh_.js → el-radio-D1bF4tIj.js} +1 -1
- package/web/assets/{el-scrollbar-D90RhKaB.js → el-scrollbar-TQDjLC61.js} +1 -1
- package/web/assets/{el-select-QGxr1DpB.js → el-select-CZpYtkGN.js} +1 -1
- package/web/assets/{el-switch-DsdfnSGx.js → el-switch-6mmUesF6.js} +1 -1
- package/web/assets/{el-tab-pane-Dd-ZlxaR.js → el-tab-pane-CW9ZPWiP.js} +1 -1
- package/web/assets/{el-table-column-C3KqEEMR.js → el-table-column-CXO8el0X.js} +1 -1
- package/web/assets/{enterprise-management-service-CfH593_7.js → enterprise-management-service-D7KHJAwI.js} +1 -1
- package/web/assets/{erDiagram-2YWLMYGG-D6BDWpzl.js → erDiagram-2YWLMYGG-DdtykCQu.js} +1 -1
- package/web/assets/{error-presentation-CHq0FiSM.js → error-presentation-CHEcvm0D.js} +1 -1
- package/web/assets/{flowDiagram-T62WH6J4-BFmG8-tW.js → flowDiagram-T62WH6J4-B2nfZ2X1.js} +1 -1
- package/web/assets/{ganttDiagram-EL5Y4UJY-Ccl8YKX8.js → ganttDiagram-EL5Y4UJY-EDu-G9mJ.js} +1 -1
- package/web/assets/{gitGraphDiagram-WWUBYQGX-CVxBa6Qr.js → gitGraphDiagram-WWUBYQGX-DrnS_dnl.js} +1 -1
- package/web/assets/{hosted-conversation-template-client-DWAbYDNz.js → hosted-conversation-template-client-C0TwaEFs.js} +1 -1
- package/web/assets/{index-CKi7WQsj.js → index-5DADhXzG.js} +1 -1
- package/web/assets/{index-BD55NjPb.js → index-B0EMFtj6.js} +17 -17
- package/web/assets/{index-uj3eeq77.js → index-BJzym8xR.js} +1 -1
- package/web/assets/{index-_wclnKCo.js → index-BL_EJCN_.js} +1 -1
- package/web/assets/{index-B-l8DUyR.js → index-BVxjBNMr.js} +1 -1
- package/web/assets/{index-DRpwEN-6.js → index-Bar4zFnf.js} +1 -1
- package/web/assets/{index-BK8VrCVI.js → index-BhBDnC2V.js} +1 -1
- package/web/assets/{index-DWKMcbhX.js → index-BhCRSlnB.js} +1 -1
- package/web/assets/{index-W1juQ705.js → index-BibVMcOB.js} +1 -1
- package/web/assets/{index-BJmkhguc.js → index-Biy6YKtl.js} +1 -1
- package/web/assets/{index-DPYpmmUM.js → index-Bnq-G9SI.js} +1 -1
- package/web/assets/{index-oL2dL9NA.js → index-BuTaL5rV.js} +1 -1
- package/web/assets/{index-RDOAU4DT.js → index-CJMJumBr.js} +1 -1
- package/web/assets/{index-DY553-om.css → index-CKDzNVgx.css} +1 -1
- package/web/assets/{index-D0k6bN2d.js → index-CQA8XN5a.js} +1 -1
- package/web/assets/{index-s6BAYZLI.js → index-CS4IfVd8.js} +1 -1
- package/web/assets/{index-2zaAnxEX.js → index-CWeAg1XK.js} +1 -1
- package/web/assets/{index-DcyZ4Z6m.js → index-CWxNrk2U.js} +1 -1
- package/web/assets/{index-BM_4csee.js → index-C_Rb4VPp.js} +1 -1
- package/web/assets/{index-D4p_ZOi4.js → index-CmW6NQRF.js} +1 -1
- package/web/assets/{index-vzkRGTBT.js → index-CzN5WCes.js} +1 -1
- package/web/assets/{index-EWUXyXD6.js → index-D65eF4Ld.js} +1 -1
- package/web/assets/{index-BZrUmPf_.js → index-DVpfA-KI.js} +1 -1
- package/web/assets/{index-DkH9CClo.js → index-DjPrII7n.js} +1 -1
- package/web/assets/{index-DoMi7bhN.js → index-DwONyBPF.js} +1 -1
- package/web/assets/{index-v4Wl2cR-.js → index-cSdmWR8Z.js} +1 -1
- package/web/assets/{index-BhysFmh7.js → index-evmMbq8o.js} +1 -1
- package/web/assets/{index-sKcqyHUZ.js → index-nEGAXqRy.js} +1 -1
- package/web/assets/{index-HKE4ZMXA.js → index-nkUFy56h.js} +1 -1
- package/web/assets/{index-CpY0hCkv.js → index-p5nkDOWg.js} +1 -1
- package/web/assets/infoDiagram-FKFFQAWI-CJ78Ud_D.js +2 -0
- package/web/assets/{isArrayLikeObject-4M-EdFpC.js → isArrayLikeObject-HOg3E4xZ.js} +1 -1
- package/web/assets/{ishikawaDiagram-5VMMS53U-DBaJskek.js → ishikawaDiagram-5VMMS53U-C7qAaQXo.js} +1 -1
- package/web/assets/{journeyDiagram-EYS64GPL-XyJz9EYd.js → journeyDiagram-EYS64GPL-BIuH36wR.js} +1 -1
- package/web/assets/{kanban-definition-UXKFOSKX-CTIxMwUp.js → kanban-definition-UXKFOSKX-DkaAko5P.js} +1 -1
- package/web/assets/{layout-gb52RHDP.js → layout-BLmr0DDa.js} +1 -1
- package/web/assets/{linear-B967ihvj.js → linear-DoIJFyl_.js} +1 -1
- package/web/assets/{management-url-service-CZEFkrOf.js → management-url-service-BkJjl7jL.js} +1 -1
- package/web/assets/{mcp-center-service-D0lkKdXh.js → mcp-center-service-BHTIs3L_.js} +1 -1
- package/web/assets/{merge-BcXqBXNs.js → merge-B30mfTGJ.js} +1 -1
- package/web/assets/{mermaid.core-kj9Zu4Wa.js → mermaid.core-CjiOH2Fd.js} +5 -5
- package/web/assets/{message-box-service-B1l5FX0d.js → message-box-service-VVXUq9x5.js} +1 -1
- package/web/assets/{mindmap-definition-THT77NOG-CnTSc4Ow.js → mindmap-definition-THT77NOG-BCKD4jTm.js} +1 -1
- package/web/assets/{mobile-dialog-return-service-DV5cYJKd.js → mobile-dialog-return-service-Dpx2MnbK.js} +1 -1
- package/web/assets/{oauth-callback-YTKNwigK.js → oauth-callback-C7WK0urg.js} +1 -1
- package/web/assets/{pegDiagram-XKGWAZYB-DW7o8E9Y.js → pegDiagram-XKGWAZYB-BNUB3jKS.js} +1 -1
- package/web/assets/{pieDiagram-E7YTZNPT-CLJOld9k.js → pieDiagram-E7YTZNPT-f3egJBhO.js} +1 -1
- package/web/assets/{quadrantDiagram-AXDQQJYC-3coJH-VU.js → quadrantDiagram-AXDQQJYC-DcgB--9n.js} +1 -1
- package/web/assets/{railroadDiagram-O6MQD6OU-bSvjT3e2.js → railroadDiagram-O6MQD6OU-M-js8LMT.js} +1 -1
- package/web/assets/{requirementDiagram-IS5BZ75X-wQCBNwpe.js → requirementDiagram-IS5BZ75X-DKjrGqz9.js} +1 -1
- package/web/assets/{runner-presentation-CyZD-gD_.js → runner-presentation-CVp1ISRD.js} +1 -1
- package/web/assets/{sankeyDiagram-P5KCCOFB-B5Y5bjEa.js → sankeyDiagram-P5KCCOFB-E1boJLEj.js} +1 -1
- package/web/assets/{sequenceDiagram-WJ2MYXX4-B1OZPpPM.js → sequenceDiagram-WJ2MYXX4-jZ3VER2y.js} +1 -1
- package/web/assets/{session-share-client-service-BS5e9O3l.js → session-share-client-service-BpJblTIb.js} +1 -1
- package/web/assets/{sizeCapture-INFHLROL-t3xPnKVl.js → sizeCapture-INFHLROL-Bvp3b0LN.js} +1 -1
- package/web/assets/{stateDiagram-XQSTLZYL-DpzJqPKK.js → stateDiagram-XQSTLZYL-NqANU09Z.js} +1 -1
- package/web/assets/stateDiagram-v2-IH3M54BS-DIa3smzQ.js +1 -0
- package/web/assets/{swimlanes-V6O3JKXN-Ce9NDh7B.js → swimlanes-V6O3JKXN-UYN0TjJe.js} +1 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-BxezIPn7.js +8 -0
- package/web/assets/{time-presentation-C74YSn2E.js → time-presentation-Bb0DA3CW.js} +1 -1
- package/web/assets/{timeline-definition-24CTP7MA-B16PtIaQ.js → timeline-definition-24CTP7MA-CIBPeIK6.js} +1 -1
- package/web/assets/{union-C0JPKUmQ.js → union-KFqNyw3w.js} +1 -1
- package/web/assets/{use-form-common-props-COUgIXli.js → use-form-common-props-DXtRQ91k.js} +1 -1
- package/web/assets/{use-wheel-DMoU9HOf.js → use-wheel-Cj6EBCMg.js} +1 -1
- package/web/assets/{vennDiagram-4TSXK5OY-lSbaNlZM.js → vennDiagram-4TSXK5OY-DFZU0mdG.js} +1 -1
- package/web/assets/{vnode-DFtYdcg5.js → vnode-D4l2IAQa.js} +1 -1
- package/web/assets/{wardleyDiagram-VM6X3IG4-DZ6LTEDd.js → wardleyDiagram-VM6X3IG4-Dv6iPeuM.js} +1 -1
- package/web/assets/{workbench-composer-interaction-controller-D_9I5214.js → workbench-composer-interaction-controller-BfD_4a09.js} +25 -25
- package/web/assets/{workbench-live-service-B0sTX5kF.js → workbench-live-service-DBtv0ElZ.js} +1 -1
- package/web/assets/{workbench-presentation-BHlN4PWq.js → workbench-presentation-CDymUAef.js} +1 -1
- package/web/assets/{xychartDiagram-S5SC5T6Z-CMcLtEUN.js → xychartDiagram-S5SC5T6Z-BgBcmbqm.js} +1 -1
- package/web/docs/404.html +2 -2
- package/web/docs/administration/account.html +3 -3
- package/web/docs/administration/audit.html +3 -3
- package/web/docs/administration/conversation-templates.html +3 -3
- package/web/docs/administration/email-notifications.html +3 -3
- package/web/docs/administration/license.html +3 -3
- package/web/docs/administration/nodes-workspaces.html +3 -3
- package/web/docs/administration/oauth.html +3 -3
- package/web/docs/administration/secrets.html +3 -3
- package/web/docs/administration/template-workspace-maintenance.html +3 -3
- package/web/docs/administration/users-organizations.html +3 -3
- package/web/docs/assets/{app.B-GWxcAs.js → app.B7OFA5b9.js} +1 -1
- package/web/docs/assets/chunks/@localSearchIndexen-US.CiAV9Q96.js +1 -0
- package/web/docs/assets/chunks/@localSearchIndexroot.D8V_euQE.js +1 -0
- package/web/docs/assets/chunks/{VPLocalSearchBox.DXcW9c8v.js → VPLocalSearchBox.o5NpnJAz.js} +1 -1
- package/web/docs/assets/chunks/{theme.bVUnI0Sb.js → theme.IQfepYG6.js} +2 -2
- package/web/docs/assets/{deployment_node-installation.md.BsEv-c-b.js → deployment_node-installation.md.BKJ9WfPZ.js} +2 -2
- package/web/docs/assets/{deployment_node-installation.md.BsEv-c-b.lean.js → deployment_node-installation.md.BKJ9WfPZ.lean.js} +1 -1
- package/web/docs/assets/{deployment_node-linux.md.ayZjBc-g.js → deployment_node-linux.md.C_bd0qbR.js} +5 -5
- package/web/docs/assets/{deployment_node-linux.md.ayZjBc-g.lean.js → deployment_node-linux.md.C_bd0qbR.lean.js} +1 -1
- package/web/docs/assets/{en-US_deployment_node-installation.md.PhSP3mbe.js → en-US_deployment_node-installation.md.D2dlZRai.js} +2 -2
- package/web/docs/assets/{en-US_deployment_node-installation.md.PhSP3mbe.lean.js → en-US_deployment_node-installation.md.D2dlZRai.lean.js} +1 -1
- package/web/docs/assets/{en-US_deployment_node-linux.md.BXhYZ6de.js → en-US_deployment_node-linux.md.D4hS8vaT.js} +2 -2
- package/web/docs/assets/{en-US_deployment_node-linux.md.BXhYZ6de.lean.js → en-US_deployment_node-linux.md.D4hS8vaT.lean.js} +1 -1
- package/web/docs/assets/en-US_runners_mar-agent.md.Dh4w9QD8.js +46 -0
- package/web/docs/assets/{en-US_runners_mar-agent.md.CT-4xHpX.lean.js → en-US_runners_mar-agent.md.Dh4w9QD8.lean.js} +1 -1
- package/web/docs/assets/en-US_workbench_git-changes.md.B4an7sJf.js +1 -0
- package/web/docs/assets/{en-US_workbench_git-changes.md.BBhwCZ4S.lean.js → en-US_workbench_git-changes.md.B4an7sJf.lean.js} +1 -1
- package/web/docs/assets/en-US_workbench_skills.md.DfO6vZQq.js +1 -0
- package/web/docs/assets/{en-US_workbench_skills.md.DeM1SEZi.lean.js → en-US_workbench_skills.md.DfO6vZQq.lean.js} +1 -1
- package/web/docs/assets/runners_mar-agent.md.2Y9-Rczt.js +46 -0
- package/web/docs/assets/{runners_mar-agent.md.OYmc9gDQ.lean.js → runners_mar-agent.md.2Y9-Rczt.lean.js} +1 -1
- package/web/docs/assets/workbench_git-changes.md.BcvhH9LA.js +1 -0
- package/web/docs/assets/{workbench_git-changes.md.DZuHkFio.lean.js → workbench_git-changes.md.BcvhH9LA.lean.js} +1 -1
- package/web/docs/assets/workbench_skills.md.BckmpyzF.js +1 -0
- package/web/docs/assets/{workbench_skills.md.59ITBuQR.lean.js → workbench_skills.md.BckmpyzF.lean.js} +1 -1
- package/web/docs/concepts/architecture.html +3 -3
- package/web/docs/concepts/data-and-security.html +3 -3
- package/web/docs/concepts/files-git-terminal.html +3 -3
- package/web/docs/concepts/node-and-workspace.html +3 -3
- package/web/docs/concepts/permissions-and-sharing.html +3 -3
- package/web/docs/concepts/runner-control.html +3 -3
- package/web/docs/concepts/secrets.html +3 -3
- package/web/docs/concepts/session-run-turn.html +3 -3
- package/web/docs/deployment/backup-restore.html +3 -3
- package/web/docs/deployment/network.html +3 -3
- package/web/docs/deployment/node-installation.html +6 -6
- package/web/docs/deployment/node-linux.html +8 -8
- package/web/docs/deployment/node-macos.html +3 -3
- package/web/docs/deployment/node-windows.html +3 -3
- package/web/docs/deployment/production.html +3 -3
- package/web/docs/deployment/security-checklist.html +3 -3
- package/web/docs/deployment/upgrade.html +3 -3
- package/web/docs/en-US/administration/account.html +3 -3
- package/web/docs/en-US/administration/audit.html +3 -3
- package/web/docs/en-US/administration/conversation-templates.html +3 -3
- package/web/docs/en-US/administration/email-notifications.html +3 -3
- package/web/docs/en-US/administration/license.html +3 -3
- package/web/docs/en-US/administration/nodes-workspaces.html +3 -3
- package/web/docs/en-US/administration/oauth.html +3 -3
- package/web/docs/en-US/administration/secrets.html +3 -3
- package/web/docs/en-US/administration/template-workspace-maintenance.html +3 -3
- package/web/docs/en-US/administration/users-organizations.html +3 -3
- package/web/docs/en-US/concepts/architecture.html +3 -3
- package/web/docs/en-US/concepts/data-and-security.html +3 -3
- package/web/docs/en-US/concepts/files-git-terminal.html +3 -3
- package/web/docs/en-US/concepts/node-and-workspace.html +3 -3
- package/web/docs/en-US/concepts/permissions-and-sharing.html +3 -3
- package/web/docs/en-US/concepts/runner-control.html +3 -3
- package/web/docs/en-US/concepts/secrets.html +3 -3
- package/web/docs/en-US/concepts/session-run-turn.html +3 -3
- package/web/docs/en-US/deployment/backup-restore.html +3 -3
- package/web/docs/en-US/deployment/network.html +3 -3
- package/web/docs/en-US/deployment/node-installation.html +6 -6
- package/web/docs/en-US/deployment/node-linux.html +6 -6
- package/web/docs/en-US/deployment/node-macos.html +3 -3
- package/web/docs/en-US/deployment/node-windows.html +3 -3
- package/web/docs/en-US/deployment/production.html +3 -3
- package/web/docs/en-US/deployment/security-checklist.html +3 -3
- package/web/docs/en-US/deployment/upgrade.html +3 -3
- package/web/docs/en-US/getting-started/connect-node.html +3 -3
- package/web/docs/en-US/getting-started/first-agent-session.html +3 -3
- package/web/docs/en-US/getting-started/first-login.html +3 -3
- package/web/docs/en-US/getting-started/next-steps.html +3 -3
- package/web/docs/en-US/getting-started/npm-quick-start.html +3 -3
- package/web/docs/en-US/getting-started/overview.html +3 -3
- package/web/docs/en-US/getting-started/prerequisites.html +3 -3
- package/web/docs/en-US/getting-started/register-workspace.html +3 -3
- package/web/docs/en-US/getting-started/server-installation.html +3 -3
- package/web/docs/en-US/operations/marctl.html +3 -3
- package/web/docs/en-US/reference/configuration.html +3 -3
- package/web/docs/en-US/reference/keyboard-shortcuts.html +3 -3
- package/web/docs/en-US/reference/limits.html +3 -3
- package/web/docs/en-US/reference/ports-paths-data.html +3 -3
- package/web/docs/en-US/reference/status-and-errors.html +3 -3
- package/web/docs/en-US/runners/claude-code.html +3 -3
- package/web/docs/en-US/runners/codex.html +3 -3
- package/web/docs/en-US/runners/mar-agent.html +6 -6
- package/web/docs/en-US/runners/opencode.html +3 -3
- package/web/docs/en-US/runners/overview.html +3 -3
- package/web/docs/en-US/runners/runner-troubleshooting.html +3 -3
- package/web/docs/en-US/troubleshooting/node-offline.html +3 -3
- package/web/docs/en-US/troubleshooting/quick-diagnosis.html +3 -3
- package/web/docs/en-US/troubleshooting/session-run.html +3 -3
- package/web/docs/en-US/troubleshooting/terminal.html +3 -3
- package/web/docs/en-US/troubleshooting/workspace-files.html +3 -3
- package/web/docs/en-US/workbench/composer.html +3 -3
- package/web/docs/en-US/workbench/context-and-plan.html +3 -3
- package/web/docs/en-US/workbench/conversation.html +3 -3
- package/web/docs/en-US/workbench/file-reference-and-attachment.html +3 -3
- package/web/docs/en-US/workbench/files.html +3 -3
- package/web/docs/en-US/workbench/git-changes.html +5 -5
- package/web/docs/en-US/workbench/git-history.html +3 -3
- package/web/docs/en-US/workbench/hosted-conversations.html +3 -3
- package/web/docs/en-US/workbench/mobile.html +3 -3
- package/web/docs/en-US/workbench/navigation.html +3 -3
- package/web/docs/en-US/workbench/remote-desktop.html +3 -3
- package/web/docs/en-US/workbench/sessions.html +3 -3
- package/web/docs/en-US/workbench/skills.html +5 -5
- package/web/docs/en-US/workbench/terminal.html +3 -3
- package/web/docs/getting-started/connect-node.html +3 -3
- package/web/docs/getting-started/first-agent-session.html +3 -3
- package/web/docs/getting-started/first-login.html +3 -3
- package/web/docs/getting-started/next-steps.html +3 -3
- package/web/docs/getting-started/npm-quick-start.html +3 -3
- package/web/docs/getting-started/overview.html +3 -3
- package/web/docs/getting-started/prerequisites.html +3 -3
- package/web/docs/getting-started/register-workspace.html +3 -3
- package/web/docs/getting-started/server-installation.html +3 -3
- package/web/docs/hashmap.json +1 -1
- package/web/docs/operations/marctl.html +3 -3
- package/web/docs/reference/configuration.html +3 -3
- package/web/docs/reference/keyboard-shortcuts.html +3 -3
- package/web/docs/reference/limits.html +3 -3
- package/web/docs/reference/ports-paths-data.html +3 -3
- package/web/docs/reference/status-and-errors.html +3 -3
- package/web/docs/runners/claude-code.html +3 -3
- package/web/docs/runners/codex.html +3 -3
- package/web/docs/runners/mar-agent.html +6 -6
- package/web/docs/runners/opencode.html +3 -3
- package/web/docs/runners/overview.html +3 -3
- package/web/docs/runners/runner-troubleshooting.html +3 -3
- package/web/docs/troubleshooting/node-offline.html +3 -3
- package/web/docs/troubleshooting/quick-diagnosis.html +3 -3
- package/web/docs/troubleshooting/session-run.html +3 -3
- package/web/docs/troubleshooting/terminal.html +3 -3
- package/web/docs/troubleshooting/workspace-files.html +3 -3
- package/web/docs/workbench/composer.html +3 -3
- package/web/docs/workbench/context-and-plan.html +3 -3
- package/web/docs/workbench/conversation.html +3 -3
- package/web/docs/workbench/file-reference-and-attachment.html +3 -3
- package/web/docs/workbench/files.html +3 -3
- package/web/docs/workbench/git-changes.html +5 -5
- package/web/docs/workbench/git-history.html +3 -3
- package/web/docs/workbench/hosted-conversations.html +3 -3
- package/web/docs/workbench/mobile.html +3 -3
- package/web/docs/workbench/navigation.html +3 -3
- package/web/docs/workbench/remote-desktop.html +3 -3
- package/web/docs/workbench/sessions.html +3 -3
- package/web/docs/workbench/skills.html +5 -5
- package/web/docs/workbench/terminal.html +3 -3
- package/web/index.html +2 -2
- package/web/service-worker.js +1 -1
- package/web/web-version.json +1 -1
- package/node_modules/@myagentroam/server-core/dist/github-skill-provider.d.ts +0 -1
- package/node_modules/@myagentroam/server-core/dist/github-skill-provider.js +0 -2
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/skill/github-skill-provider.d.ts +0 -1
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/skill/github-skill-provider.js +0 -1
- package/web/assets/MarAgentModelManagementPage-Cg0s_u3M.js +0 -1
- package/web/assets/NodeManagementPage-BiREVP3X.js +0 -1
- package/web/assets/NodeManagementPage-II1stYMJ.js +0 -1
- package/web/assets/SecretManagementPage-C237n_-o.js +0 -1
- package/web/assets/SessionSharePage-BG6gXTMW.js +0 -2
- package/web/assets/SkillCenterPage-D0QMzoID.js +0 -1
- package/web/assets/SystemConfigurationPage-zkMa1F-u.js +0 -1
- package/web/assets/WorkbenchPage-D26nojHw.js +0 -22
- package/web/assets/WorkspaceManagementPage-D_vb2MD7.js +0 -1
- package/web/assets/WorkspaceManagementPage-Dx4Lw_MT.js +0 -1
- package/web/assets/channel-CgXL_T09.js +0 -1
- package/web/assets/classDiagram-CYGNFDIV-BQSnYKBV.js +0 -1
- package/web/assets/classDiagram-v2-TLXNO2FR-BQSnYKBV.js +0 -1
- package/web/assets/infoDiagram-FKFFQAWI-DK_xu129.js +0 -2
- package/web/assets/stateDiagram-v2-IH3M54BS-DrpmGnX2.js +0 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-B8JkSQB3.js +0 -8
- package/web/docs/assets/chunks/@localSearchIndexen-US.DLGMXMFS.js +0 -1
- package/web/docs/assets/chunks/@localSearchIndexroot.PGNhxN0I.js +0 -1
- package/web/docs/assets/en-US_runners_mar-agent.md.CT-4xHpX.js +0 -46
- package/web/docs/assets/en-US_workbench_git-changes.md.BBhwCZ4S.js +0 -1
- package/web/docs/assets/en-US_workbench_skills.md.DeM1SEZi.js +0 -1
- package/web/docs/assets/runners_mar-agent.md.OYmc9gDQ.js +0 -46
- package/web/docs/assets/workbench_git-changes.md.DZuHkFio.js +0 -1
- package/web/docs/assets/workbench_skills.md.59ITBuQR.js +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Standard YAML's Core schema.
|
|
2
|
+
// http://www.yaml.org/spec/1.2/spec.html#id2804923
|
|
3
|
+
//
|
|
4
|
+
// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
|
|
5
|
+
// So, Core schema has no distinctions from JSON schema is JS-YAML.
|
|
6
|
+
|
|
7
|
+
'use strict'
|
|
8
|
+
|
|
9
|
+
module.exports = require('./json')
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// JS-YAML's default schema for `safeLoad` function.
|
|
2
|
+
// It is not described in the YAML specification.
|
|
3
|
+
//
|
|
4
|
+
// This schema is based on standard YAML's Core schema and includes most of
|
|
5
|
+
// extra types described at YAML tag repository. (http://yaml.org/type/)
|
|
6
|
+
|
|
7
|
+
'use strict'
|
|
8
|
+
|
|
9
|
+
module.exports = require('./core').extend({
|
|
10
|
+
implicit: [
|
|
11
|
+
require('../type/timestamp'),
|
|
12
|
+
require('../type/merge')
|
|
13
|
+
],
|
|
14
|
+
explicit: [
|
|
15
|
+
require('../type/binary'),
|
|
16
|
+
require('../type/omap'),
|
|
17
|
+
require('../type/pairs'),
|
|
18
|
+
require('../type/set')
|
|
19
|
+
]
|
|
20
|
+
})
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Standard YAML's Failsafe schema.
|
|
2
|
+
// http://www.yaml.org/spec/1.2/spec.html#id2802346
|
|
3
|
+
|
|
4
|
+
'use strict'
|
|
5
|
+
|
|
6
|
+
const Schema = require('../schema')
|
|
7
|
+
|
|
8
|
+
module.exports = new Schema({
|
|
9
|
+
explicit: [
|
|
10
|
+
require('../type/str'),
|
|
11
|
+
require('../type/seq'),
|
|
12
|
+
require('../type/map')
|
|
13
|
+
]
|
|
14
|
+
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Standard YAML's JSON schema.
|
|
2
|
+
// http://www.yaml.org/spec/1.2/spec.html#id2803231
|
|
3
|
+
//
|
|
4
|
+
// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
|
|
5
|
+
// So, this schema is not such strict as defined in the YAML specification.
|
|
6
|
+
// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.
|
|
7
|
+
|
|
8
|
+
'use strict'
|
|
9
|
+
|
|
10
|
+
module.exports = require('./failsafe').extend({
|
|
11
|
+
implicit: [
|
|
12
|
+
require('../type/null'),
|
|
13
|
+
require('../type/bool'),
|
|
14
|
+
require('../type/int'),
|
|
15
|
+
require('../type/float')
|
|
16
|
+
]
|
|
17
|
+
})
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const YAMLException = require('./exception')
|
|
4
|
+
const Type = require('./type')
|
|
5
|
+
|
|
6
|
+
function compileList (schema, name) {
|
|
7
|
+
const result = []
|
|
8
|
+
|
|
9
|
+
schema[name].forEach(function (currentType) {
|
|
10
|
+
let newIndex = result.length
|
|
11
|
+
|
|
12
|
+
result.forEach(function (previousType, previousIndex) {
|
|
13
|
+
if (previousType.tag === currentType.tag &&
|
|
14
|
+
previousType.kind === currentType.kind &&
|
|
15
|
+
previousType.multi === currentType.multi) {
|
|
16
|
+
newIndex = previousIndex
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
result[newIndex] = currentType
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
return result
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function compileMap (/* lists... */) {
|
|
27
|
+
const result = {
|
|
28
|
+
scalar: {},
|
|
29
|
+
sequence: {},
|
|
30
|
+
mapping: {},
|
|
31
|
+
fallback: {},
|
|
32
|
+
multi: {
|
|
33
|
+
scalar: [],
|
|
34
|
+
sequence: [],
|
|
35
|
+
mapping: [],
|
|
36
|
+
fallback: []
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function collectType (type) {
|
|
40
|
+
if (type.multi) {
|
|
41
|
+
result.multi[type.kind].push(type)
|
|
42
|
+
result.multi['fallback'].push(type)
|
|
43
|
+
} else {
|
|
44
|
+
result[type.kind][type.tag] = result['fallback'][type.tag] = type
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
for (let index = 0, length = arguments.length; index < length; index += 1) {
|
|
49
|
+
arguments[index].forEach(collectType)
|
|
50
|
+
}
|
|
51
|
+
return result
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function Schema (definition) {
|
|
55
|
+
return this.extend(definition)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
Schema.prototype.extend = function extend (definition) {
|
|
59
|
+
let implicit = []
|
|
60
|
+
let explicit = []
|
|
61
|
+
|
|
62
|
+
if (definition instanceof Type) {
|
|
63
|
+
// Schema.extend(type)
|
|
64
|
+
explicit.push(definition)
|
|
65
|
+
} else if (Array.isArray(definition)) {
|
|
66
|
+
// Schema.extend([ type1, type2, ... ])
|
|
67
|
+
explicit = explicit.concat(definition)
|
|
68
|
+
} else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
|
|
69
|
+
// Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })
|
|
70
|
+
if (definition.implicit) implicit = implicit.concat(definition.implicit)
|
|
71
|
+
if (definition.explicit) explicit = explicit.concat(definition.explicit)
|
|
72
|
+
} else {
|
|
73
|
+
throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' +
|
|
74
|
+
'or a schema definition ({ implicit: [...], explicit: [...] })')
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
implicit.forEach(function (type) {
|
|
78
|
+
if (!(type instanceof Type)) {
|
|
79
|
+
throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.')
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (type.loadKind && type.loadKind !== 'scalar') {
|
|
83
|
+
throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.')
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (type.multi) {
|
|
87
|
+
throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.')
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
explicit.forEach(function (type) {
|
|
92
|
+
if (!(type instanceof Type)) {
|
|
93
|
+
throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.')
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
const result = Object.create(Schema.prototype)
|
|
98
|
+
|
|
99
|
+
result.implicit = (this.implicit || []).concat(implicit)
|
|
100
|
+
result.explicit = (this.explicit || []).concat(explicit)
|
|
101
|
+
|
|
102
|
+
result.compiledImplicit = compileList(result, 'implicit')
|
|
103
|
+
result.compiledExplicit = compileList(result, 'explicit')
|
|
104
|
+
result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit)
|
|
105
|
+
|
|
106
|
+
return result
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
module.exports = Schema
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const common = require('./common')
|
|
4
|
+
|
|
5
|
+
// get snippet for a single line, respecting maxLength
|
|
6
|
+
function getLine (buffer, lineStart, lineEnd, position, maxLineLength) {
|
|
7
|
+
let head = ''
|
|
8
|
+
let tail = ''
|
|
9
|
+
const maxHalfLength = Math.floor(maxLineLength / 2) - 1
|
|
10
|
+
|
|
11
|
+
if (position - lineStart > maxHalfLength) {
|
|
12
|
+
head = ' ... '
|
|
13
|
+
lineStart = position - maxHalfLength + head.length
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (lineEnd - position > maxHalfLength) {
|
|
17
|
+
tail = ' ...'
|
|
18
|
+
lineEnd = position + maxHalfLength - tail.length
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail,
|
|
23
|
+
pos: position - lineStart + head.length // relative position
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function padStart (string, max) {
|
|
28
|
+
return common.repeat(' ', max - string.length) + string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function makeSnippet (mark, options) {
|
|
32
|
+
options = Object.create(options || null)
|
|
33
|
+
|
|
34
|
+
if (!mark.buffer) return null
|
|
35
|
+
|
|
36
|
+
if (!options.maxLength) options.maxLength = 79
|
|
37
|
+
if (typeof options.indent !== 'number') options.indent = 1
|
|
38
|
+
if (typeof options.linesBefore !== 'number') options.linesBefore = 3
|
|
39
|
+
if (typeof options.linesAfter !== 'number') options.linesAfter = 2
|
|
40
|
+
|
|
41
|
+
const re = /\r?\n|\r|\0/g
|
|
42
|
+
const lineStarts = [0]
|
|
43
|
+
const lineEnds = []
|
|
44
|
+
let match
|
|
45
|
+
let foundLineNo = -1
|
|
46
|
+
|
|
47
|
+
while ((match = re.exec(mark.buffer))) {
|
|
48
|
+
lineEnds.push(match.index)
|
|
49
|
+
lineStarts.push(match.index + match[0].length)
|
|
50
|
+
|
|
51
|
+
if (mark.position <= match.index && foundLineNo < 0) {
|
|
52
|
+
foundLineNo = lineStarts.length - 2
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (foundLineNo < 0) foundLineNo = lineStarts.length - 1
|
|
57
|
+
|
|
58
|
+
let result = ''
|
|
59
|
+
const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length
|
|
60
|
+
const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3)
|
|
61
|
+
|
|
62
|
+
for (let i = 1; i <= options.linesBefore; i++) {
|
|
63
|
+
if (foundLineNo - i < 0) break
|
|
64
|
+
const line = getLine(
|
|
65
|
+
mark.buffer,
|
|
66
|
+
lineStarts[foundLineNo - i],
|
|
67
|
+
lineEnds[foundLineNo - i],
|
|
68
|
+
mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),
|
|
69
|
+
maxLineLength
|
|
70
|
+
)
|
|
71
|
+
result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +
|
|
72
|
+
' | ' + line.str + '\n' + result
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength)
|
|
76
|
+
result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +
|
|
77
|
+
' | ' + line.str + '\n'
|
|
78
|
+
result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'
|
|
79
|
+
|
|
80
|
+
for (let i = 1; i <= options.linesAfter; i++) {
|
|
81
|
+
if (foundLineNo + i >= lineEnds.length) break
|
|
82
|
+
const line = getLine(
|
|
83
|
+
mark.buffer,
|
|
84
|
+
lineStarts[foundLineNo + i],
|
|
85
|
+
lineEnds[foundLineNo + i],
|
|
86
|
+
mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),
|
|
87
|
+
maxLineLength
|
|
88
|
+
)
|
|
89
|
+
result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +
|
|
90
|
+
' | ' + line.str + '\n'
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return result.replace(/\n$/, '')
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
module.exports = makeSnippet
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const Type = require('../type')
|
|
4
|
+
|
|
5
|
+
// [ 64, 65, 66 ] -> [ padding, CR, LF ]
|
|
6
|
+
const BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'
|
|
7
|
+
|
|
8
|
+
function resolveYamlBinary (data) {
|
|
9
|
+
if (data === null) return false
|
|
10
|
+
|
|
11
|
+
let bitlen = 0
|
|
12
|
+
const max = data.length
|
|
13
|
+
const map = BASE64_MAP
|
|
14
|
+
|
|
15
|
+
// Convert one by one.
|
|
16
|
+
for (let idx = 0; idx < max; idx++) {
|
|
17
|
+
const code = map.indexOf(data.charAt(idx))
|
|
18
|
+
|
|
19
|
+
// Skip CR/LF
|
|
20
|
+
if (code > 64) continue
|
|
21
|
+
|
|
22
|
+
// Fail on illegal characters
|
|
23
|
+
if (code < 0) return false
|
|
24
|
+
|
|
25
|
+
bitlen += 6
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// If there are any bits left, source was corrupted
|
|
29
|
+
return (bitlen % 8) === 0
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function constructYamlBinary (data) {
|
|
33
|
+
const input = data.replace(/[\r\n=]/g, '') // remove CR/LF & padding to simplify scan
|
|
34
|
+
const max = input.length
|
|
35
|
+
const map = BASE64_MAP
|
|
36
|
+
let bits = 0
|
|
37
|
+
const result = []
|
|
38
|
+
|
|
39
|
+
// Collect by 6*4 bits (3 bytes)
|
|
40
|
+
|
|
41
|
+
for (let idx = 0; idx < max; idx++) {
|
|
42
|
+
if ((idx % 4 === 0) && idx) {
|
|
43
|
+
result.push((bits >> 16) & 0xFF)
|
|
44
|
+
result.push((bits >> 8) & 0xFF)
|
|
45
|
+
result.push(bits & 0xFF)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
bits = (bits << 6) | map.indexOf(input.charAt(idx))
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Dump tail
|
|
52
|
+
|
|
53
|
+
const tailbits = (max % 4) * 6
|
|
54
|
+
|
|
55
|
+
if (tailbits === 0) {
|
|
56
|
+
result.push((bits >> 16) & 0xFF)
|
|
57
|
+
result.push((bits >> 8) & 0xFF)
|
|
58
|
+
result.push(bits & 0xFF)
|
|
59
|
+
} else if (tailbits === 18) {
|
|
60
|
+
result.push((bits >> 10) & 0xFF)
|
|
61
|
+
result.push((bits >> 2) & 0xFF)
|
|
62
|
+
} else if (tailbits === 12) {
|
|
63
|
+
result.push((bits >> 4) & 0xFF)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return new Uint8Array(result)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function representYamlBinary (object /*, style */) {
|
|
70
|
+
let result = ''
|
|
71
|
+
let bits = 0
|
|
72
|
+
const max = object.length
|
|
73
|
+
const map = BASE64_MAP
|
|
74
|
+
|
|
75
|
+
// Convert every three bytes to 4 ASCII characters.
|
|
76
|
+
|
|
77
|
+
for (let idx = 0; idx < max; idx++) {
|
|
78
|
+
if ((idx % 3 === 0) && idx) {
|
|
79
|
+
result += map[(bits >> 18) & 0x3F]
|
|
80
|
+
result += map[(bits >> 12) & 0x3F]
|
|
81
|
+
result += map[(bits >> 6) & 0x3F]
|
|
82
|
+
result += map[bits & 0x3F]
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
bits = (bits << 8) + object[idx]
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Dump tail
|
|
89
|
+
|
|
90
|
+
const tail = max % 3
|
|
91
|
+
|
|
92
|
+
if (tail === 0) {
|
|
93
|
+
result += map[(bits >> 18) & 0x3F]
|
|
94
|
+
result += map[(bits >> 12) & 0x3F]
|
|
95
|
+
result += map[(bits >> 6) & 0x3F]
|
|
96
|
+
result += map[bits & 0x3F]
|
|
97
|
+
} else if (tail === 2) {
|
|
98
|
+
result += map[(bits >> 10) & 0x3F]
|
|
99
|
+
result += map[(bits >> 4) & 0x3F]
|
|
100
|
+
result += map[(bits << 2) & 0x3F]
|
|
101
|
+
result += map[64]
|
|
102
|
+
} else if (tail === 1) {
|
|
103
|
+
result += map[(bits >> 2) & 0x3F]
|
|
104
|
+
result += map[(bits << 4) & 0x3F]
|
|
105
|
+
result += map[64]
|
|
106
|
+
result += map[64]
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return result
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function isBinary (obj) {
|
|
113
|
+
return Object.prototype.toString.call(obj) === '[object Uint8Array]'
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
module.exports = new Type('tag:yaml.org,2002:binary', {
|
|
117
|
+
kind: 'scalar',
|
|
118
|
+
resolve: resolveYamlBinary,
|
|
119
|
+
construct: constructYamlBinary,
|
|
120
|
+
predicate: isBinary,
|
|
121
|
+
represent: representYamlBinary
|
|
122
|
+
})
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const Type = require('../type')
|
|
4
|
+
|
|
5
|
+
function resolveYamlBoolean (data) {
|
|
6
|
+
if (data === null) return false
|
|
7
|
+
|
|
8
|
+
const max = data.length
|
|
9
|
+
|
|
10
|
+
return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||
|
|
11
|
+
(max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'))
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function constructYamlBoolean (data) {
|
|
15
|
+
return data === 'true' ||
|
|
16
|
+
data === 'True' ||
|
|
17
|
+
data === 'TRUE'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function isBoolean (object) {
|
|
21
|
+
return Object.prototype.toString.call(object) === '[object Boolean]'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
module.exports = new Type('tag:yaml.org,2002:bool', {
|
|
25
|
+
kind: 'scalar',
|
|
26
|
+
resolve: resolveYamlBoolean,
|
|
27
|
+
construct: constructYamlBoolean,
|
|
28
|
+
predicate: isBoolean,
|
|
29
|
+
represent: {
|
|
30
|
+
lowercase: function (object) { return object ? 'true' : 'false' },
|
|
31
|
+
uppercase: function (object) { return object ? 'TRUE' : 'FALSE' },
|
|
32
|
+
camelcase: function (object) { return object ? 'True' : 'False' }
|
|
33
|
+
},
|
|
34
|
+
defaultStyle: 'lowercase'
|
|
35
|
+
})
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const common = require('../common')
|
|
4
|
+
const Type = require('../type')
|
|
5
|
+
|
|
6
|
+
const YAML_FLOAT_PATTERN = new RegExp(
|
|
7
|
+
// 2.5e4, 2.5 and integers
|
|
8
|
+
'^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?' +
|
|
9
|
+
// .2e4, .2
|
|
10
|
+
// special case, seems not from spec
|
|
11
|
+
'|\\.[0-9]+(?:[eE][-+]?[0-9]+)?' +
|
|
12
|
+
// .inf
|
|
13
|
+
'|[-+]?\\.(?:inf|Inf|INF)' +
|
|
14
|
+
// .nan
|
|
15
|
+
'|\\.(?:nan|NaN|NAN))$')
|
|
16
|
+
|
|
17
|
+
const YAML_FLOAT_SPECIAL_PATTERN = new RegExp(
|
|
18
|
+
'^(?:' +
|
|
19
|
+
// .inf
|
|
20
|
+
'[-+]?\\.(?:inf|Inf|INF)' +
|
|
21
|
+
// .nan
|
|
22
|
+
'|\\.(?:nan|NaN|NAN))$')
|
|
23
|
+
|
|
24
|
+
function resolveYamlFloat (data) {
|
|
25
|
+
if (data === null) return false
|
|
26
|
+
|
|
27
|
+
if (!YAML_FLOAT_PATTERN.test(data)) {
|
|
28
|
+
return false
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (isFinite(parseFloat(data, 10))) {
|
|
32
|
+
return true
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return YAML_FLOAT_SPECIAL_PATTERN.test(data)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function constructYamlFloat (data) {
|
|
39
|
+
let value = data.toLowerCase()
|
|
40
|
+
const sign = value[0] === '-' ? -1 : 1
|
|
41
|
+
|
|
42
|
+
if ('+-'.indexOf(value[0]) >= 0) {
|
|
43
|
+
value = value.slice(1)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (value === '.inf') {
|
|
47
|
+
return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY
|
|
48
|
+
} else if (value === '.nan') {
|
|
49
|
+
return NaN
|
|
50
|
+
}
|
|
51
|
+
return sign * parseFloat(value, 10)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/
|
|
55
|
+
|
|
56
|
+
function representYamlFloat (object, style) {
|
|
57
|
+
if (isNaN(object)) {
|
|
58
|
+
switch (style) {
|
|
59
|
+
case 'lowercase': return '.nan'
|
|
60
|
+
case 'uppercase': return '.NAN'
|
|
61
|
+
case 'camelcase': return '.NaN'
|
|
62
|
+
}
|
|
63
|
+
} else if (Number.POSITIVE_INFINITY === object) {
|
|
64
|
+
switch (style) {
|
|
65
|
+
case 'lowercase': return '.inf'
|
|
66
|
+
case 'uppercase': return '.INF'
|
|
67
|
+
case 'camelcase': return '.Inf'
|
|
68
|
+
}
|
|
69
|
+
} else if (Number.NEGATIVE_INFINITY === object) {
|
|
70
|
+
switch (style) {
|
|
71
|
+
case 'lowercase': return '-.inf'
|
|
72
|
+
case 'uppercase': return '-.INF'
|
|
73
|
+
case 'camelcase': return '-.Inf'
|
|
74
|
+
}
|
|
75
|
+
} else if (common.isNegativeZero(object)) {
|
|
76
|
+
return '-0.0'
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const res = object.toString(10)
|
|
80
|
+
|
|
81
|
+
// JS stringifier can build scientific format without dots: 5e-100,
|
|
82
|
+
// while YAML requres dot: 5.e-100. Fix it with simple hack
|
|
83
|
+
|
|
84
|
+
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function isFloat (object) {
|
|
88
|
+
return (Object.prototype.toString.call(object) === '[object Number]') &&
|
|
89
|
+
(object % 1 !== 0 || common.isNegativeZero(object))
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
module.exports = new Type('tag:yaml.org,2002:float', {
|
|
93
|
+
kind: 'scalar',
|
|
94
|
+
resolve: resolveYamlFloat,
|
|
95
|
+
construct: constructYamlFloat,
|
|
96
|
+
predicate: isFloat,
|
|
97
|
+
represent: representYamlFloat,
|
|
98
|
+
defaultStyle: 'lowercase'
|
|
99
|
+
})
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const common = require('../common')
|
|
4
|
+
const Type = require('../type')
|
|
5
|
+
|
|
6
|
+
function isHexCode (c) {
|
|
7
|
+
return ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) ||
|
|
8
|
+
((c >= 0x41/* A */) && (c <= 0x46/* F */)) ||
|
|
9
|
+
((c >= 0x61/* a */) && (c <= 0x66/* f */))
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function isOctCode (c) {
|
|
13
|
+
return ((c >= 0x30/* 0 */) && (c <= 0x37/* 7 */))
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function isDecCode (c) {
|
|
17
|
+
return ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */))
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function resolveYamlInteger (data) {
|
|
21
|
+
if (data === null) return false
|
|
22
|
+
|
|
23
|
+
const max = data.length
|
|
24
|
+
let index = 0
|
|
25
|
+
let hasDigits = false
|
|
26
|
+
|
|
27
|
+
if (!max) return false
|
|
28
|
+
|
|
29
|
+
let ch = data[index]
|
|
30
|
+
|
|
31
|
+
// sign
|
|
32
|
+
if (ch === '-' || ch === '+') {
|
|
33
|
+
ch = data[++index]
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (ch === '0') {
|
|
37
|
+
// 0
|
|
38
|
+
if (index + 1 === max) return true
|
|
39
|
+
ch = data[++index]
|
|
40
|
+
|
|
41
|
+
// base 2, base 8, base 16
|
|
42
|
+
|
|
43
|
+
if (ch === 'b') {
|
|
44
|
+
// base 2
|
|
45
|
+
index++
|
|
46
|
+
|
|
47
|
+
for (; index < max; index++) {
|
|
48
|
+
ch = data[index]
|
|
49
|
+
if (ch !== '0' && ch !== '1') return false
|
|
50
|
+
hasDigits = true
|
|
51
|
+
}
|
|
52
|
+
return hasDigits && isFinite(parseYamlInteger(data))
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (ch === 'x') {
|
|
56
|
+
// base 16
|
|
57
|
+
index++
|
|
58
|
+
|
|
59
|
+
for (; index < max; index++) {
|
|
60
|
+
if (!isHexCode(data.charCodeAt(index))) return false
|
|
61
|
+
hasDigits = true
|
|
62
|
+
}
|
|
63
|
+
return hasDigits && isFinite(parseYamlInteger(data))
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (ch === 'o') {
|
|
67
|
+
// base 8
|
|
68
|
+
index++
|
|
69
|
+
|
|
70
|
+
for (; index < max; index++) {
|
|
71
|
+
if (!isOctCode(data.charCodeAt(index))) return false
|
|
72
|
+
hasDigits = true
|
|
73
|
+
}
|
|
74
|
+
return hasDigits && isFinite(parseYamlInteger(data))
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// base 10 (except 0)
|
|
79
|
+
|
|
80
|
+
for (; index < max; index++) {
|
|
81
|
+
if (!isDecCode(data.charCodeAt(index))) {
|
|
82
|
+
return false
|
|
83
|
+
}
|
|
84
|
+
hasDigits = true
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (!hasDigits) return false
|
|
88
|
+
|
|
89
|
+
return isFinite(parseYamlInteger(data))
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function parseYamlInteger (data) {
|
|
93
|
+
let value = data
|
|
94
|
+
let sign = 1
|
|
95
|
+
|
|
96
|
+
let ch = value[0]
|
|
97
|
+
|
|
98
|
+
if (ch === '-' || ch === '+') {
|
|
99
|
+
if (ch === '-') sign = -1
|
|
100
|
+
value = value.slice(1)
|
|
101
|
+
ch = value[0]
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (value === '0') return 0
|
|
105
|
+
|
|
106
|
+
if (ch === '0') {
|
|
107
|
+
if (value[1] === 'b') return sign * parseInt(value.slice(2), 2)
|
|
108
|
+
if (value[1] === 'x') return sign * parseInt(value.slice(2), 16)
|
|
109
|
+
if (value[1] === 'o') return sign * parseInt(value.slice(2), 8)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return sign * parseInt(value, 10)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function constructYamlInteger (data) {
|
|
116
|
+
return parseYamlInteger(data)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function isInteger (object) {
|
|
120
|
+
return (Object.prototype.toString.call(object)) === '[object Number]' &&
|
|
121
|
+
(object % 1 === 0 && !common.isNegativeZero(object))
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
module.exports = new Type('tag:yaml.org,2002:int', {
|
|
125
|
+
kind: 'scalar',
|
|
126
|
+
resolve: resolveYamlInteger,
|
|
127
|
+
construct: constructYamlInteger,
|
|
128
|
+
predicate: isInteger,
|
|
129
|
+
represent: {
|
|
130
|
+
binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1) },
|
|
131
|
+
octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1) },
|
|
132
|
+
decimal: function (obj) { return obj.toString(10) },
|
|
133
|
+
hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1) }
|
|
134
|
+
},
|
|
135
|
+
defaultStyle: 'decimal',
|
|
136
|
+
styleAliases: {
|
|
137
|
+
binary: [2, 'bin'],
|
|
138
|
+
octal: [8, 'oct'],
|
|
139
|
+
decimal: [10, 'dec'],
|
|
140
|
+
hexadecimal: [16, 'hex']
|
|
141
|
+
}
|
|
142
|
+
})
|