testeranto 0.189.0 → 0.197.0
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/ALL_LICENSES.txt +11246 -0
- package/LICENSE +21 -0
- package/default-project.json +44 -0
- package/design-editor/DesignEditor.tsx +247 -0
- package/design-editor/index.ts +2 -0
- package/design-editor/server.ts +121 -0
- package/design-editor/types.ts +16 -0
- package/designs/default-project.json +210 -0
- package/dist/common/design-editor/DesignEditor.js +239 -0
- package/dist/common/design-editor/index.js +18 -0
- package/dist/common/design-editor/server.js +98 -0
- package/dist/common/design-editor/types.js +2 -0
- package/dist/common/src/App.js +11 -1
- package/dist/common/src/PM/PM_WithEslintAndTsc.js +8 -1
- package/dist/common/src/PM/base.js +1 -0
- package/dist/common/src/PM/main.js +370 -4
- package/dist/common/src/PM/node.js +4 -2
- package/dist/common/src/PM/pure.js +15 -57
- package/dist/common/src/PM/web.js +5 -3
- package/dist/common/src/Pure.test.js +46 -78
- package/dist/common/src/ReportServer.js +8 -2
- package/dist/common/src/build.js +1 -1
- package/dist/common/src/components/DesignEditorPage.js +169 -0
- package/dist/common/src/components/pure/AppFrame.js +62 -13
- package/dist/common/src/components/pure/ModalContent.test/implementation.js +13 -11
- package/dist/common/src/components/pure/ModalContent.test/index.js +48 -2
- package/dist/common/src/components/pure/ModalContent.test/specification.js +2 -2
- package/dist/common/src/components/pure/NavBar.js +9 -10
- package/dist/common/src/components/pure/ProcessManager.js +112 -0
- package/dist/common/src/components/pure/ProcessManagerView.js +237 -0
- package/dist/common/src/components/pure/ProjectPageView.test/implementation.js +134 -106
- package/dist/common/src/components/pure/ProjectsPageView.js +18 -12
- package/dist/common/src/components/pure/SettingsButton.js +4 -74
- package/dist/common/src/components/pure/SingleProcessView.js +214 -0
- package/dist/common/src/components/pure/TestPageView.js +457 -78
- package/dist/common/src/components/pure/TestPageView.test/implementation.js +90 -135
- package/dist/common/src/components/stateful/FeaturesReporter.js +1 -1
- package/dist/common/src/components/stateful/FileTree.js +40 -0
- package/dist/common/src/components/stateful/ProcessManagerPage.js +112 -0
- package/dist/common/src/components/stateful/ProjectPage.js +6 -5
- package/dist/common/src/components/stateful/ProjectsPage.js +32 -6
- package/dist/common/src/components/stateful/SettingsPage.js +72 -0
- package/dist/common/src/components/stateful/SingleProcessPage.js +147 -0
- package/dist/common/src/components/stateful/TestPage.js +104 -8
- package/dist/common/src/components/stateful/TextEditorPage.js +154 -0
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +3 -4
- package/dist/common/src/lib/BaseSuite.js +6 -3
- package/dist/common/src/lib/BaseSuite.test/mock.js +17 -30
- package/dist/common/src/lib/BaseSuite.test/test.js +33 -31
- package/dist/common/src/lib/abstractBase.js +28 -8
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +12 -6
- package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +12 -12
- package/dist/common/src/lib/basebuilder.js +1 -9
- package/dist/common/src/lib/classBuilder.js +3 -3
- package/dist/common/src/lib/core.js +3 -5
- package/dist/common/src/lib/index.js +11 -14
- package/dist/common/src/lib/pmProxy.js +37 -14
- package/dist/common/src/lib/pmProxy.test/adapter.js +12 -2
- package/dist/common/src/lib/pmProxy.test/implementation.js +73 -43
- package/dist/common/src/lib/pmProxy.test/specification.js +3 -0
- package/dist/common/src/utils/api.js +44 -33
- package/dist/common/src/utils/logFiles.js +48 -22
- package/dist/common/src/utils/makePrompt.js +5 -4
- package/dist/common/testeranto.config.js +15 -13
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/design-editor/DesignEditor.js +203 -0
- package/dist/module/design-editor/index.js +2 -0
- package/dist/module/design-editor/server.js +92 -0
- package/dist/module/src/App.js +11 -1
- package/dist/module/src/PM/PM_WithEslintAndTsc.js +8 -1
- package/dist/module/src/PM/base.js +1 -0
- package/dist/module/src/PM/main.js +370 -4
- package/dist/module/src/PM/node.js +4 -2
- package/dist/module/src/PM/pure.js +15 -57
- package/dist/module/src/PM/web.js +5 -3
- package/dist/module/src/Pure.test.js +46 -78
- package/dist/module/src/ReportServer.js +8 -2
- package/dist/module/src/build.js +1 -1
- package/dist/module/src/components/DesignEditorPage.js +132 -0
- package/dist/module/src/components/pure/AppFrame.js +30 -11
- package/dist/module/src/components/pure/ModalContent.test/implementation.js +13 -11
- package/dist/module/src/components/pure/ModalContent.test/index.js +48 -2
- package/dist/module/src/components/pure/ModalContent.test/specification.js +2 -2
- package/dist/module/src/components/pure/NavBar.js +10 -11
- package/dist/module/src/components/pure/ProcessManager.js +75 -0
- package/dist/module/src/components/pure/ProcessManagerView.js +200 -0
- package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +134 -106
- package/dist/module/src/components/pure/ProjectsPageView.js +20 -14
- package/dist/module/src/components/pure/SettingsButton.js +5 -42
- package/dist/module/src/components/pure/SingleProcessView.js +214 -0
- package/dist/module/src/components/pure/TestPageView.js +425 -76
- package/dist/module/src/components/pure/TestPageView.test/implementation.js +90 -135
- package/dist/module/src/components/stateful/FeaturesReporter.js +1 -1
- package/dist/module/src/components/stateful/FileTree.js +33 -0
- package/dist/module/src/components/stateful/ProcessManagerPage.js +75 -0
- package/dist/module/src/components/stateful/ProjectPage.js +6 -5
- package/dist/module/src/components/stateful/ProjectsPage.js +32 -6
- package/dist/module/src/components/stateful/SettingsPage.js +35 -0
- package/dist/module/src/components/stateful/SingleProcessPage.js +110 -0
- package/dist/module/src/components/stateful/TestPage.js +104 -8
- package/dist/module/src/components/stateful/TextEditorPage.js +117 -0
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +3 -4
- package/dist/module/src/lib/BaseSuite.js +6 -3
- package/dist/module/src/lib/BaseSuite.test/mock.js +17 -30
- package/dist/module/src/lib/BaseSuite.test/test.js +33 -31
- package/dist/module/src/lib/abstractBase.js +28 -8
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +12 -6
- package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +12 -12
- package/dist/module/src/lib/basebuilder.js +1 -9
- package/dist/module/src/lib/classBuilder.js +3 -3
- package/dist/module/src/lib/core.js +3 -5
- package/dist/module/src/lib/index.js +11 -14
- package/dist/module/src/lib/pmProxy.js +37 -14
- package/dist/module/src/lib/pmProxy.test/adapter.js +12 -2
- package/dist/module/src/lib/pmProxy.test/implementation.js +73 -43
- package/dist/module/src/lib/pmProxy.test/specification.js +3 -0
- package/dist/module/src/utils/api.js +45 -34
- package/dist/module/src/utils/logFiles.js +45 -20
- package/dist/module/src/utils/makePrompt.js +5 -4
- package/dist/module/testeranto.config.js +15 -13
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/App.css +54 -513
- package/dist/prebuild/App.js +13296 -2438
- package/dist/prebuild/ReportServer.mjs +104 -6
- package/dist/prebuild/build.mjs +8 -5
- package/dist/prebuild/run.mjs +389 -37
- package/dist/types/design-editor/DesignEditor.d.ts +18 -0
- package/dist/types/design-editor/server.d.ts +1 -0
- package/dist/types/{PM → src/PM}/index.d.ts +1 -1
- package/dist/types/{PM → src/PM}/main.d.ts +19 -0
- package/dist/types/{PM → src/PM}/pure.d.ts +7 -7
- package/dist/types/{Pure.test.d.ts → src/Pure.test.d.ts} +13 -1
- package/dist/types/src/components/DesignEditorPage.d.ts +1 -0
- package/dist/types/{components → src/components}/pure/AppFrame.d.ts +3 -1
- package/dist/types/{components/pure/ProjectPageView.test → src/components/pure/ModalContent.test}/index.d.ts +2 -1
- package/dist/types/{components → src/components}/pure/NavBar.d.ts +4 -0
- package/dist/types/src/components/pure/ProcessManager.d.ts +8 -0
- package/dist/types/src/components/pure/ProcessManagerView.d.ts +20 -0
- package/dist/types/{components → src/components}/pure/ProjectsPageView.d.ts +1 -1
- package/dist/types/src/components/pure/SettingsButton.d.ts +2 -0
- package/dist/types/{components → src/components}/pure/TestPageView.test/implementation.d.ts +3 -2
- package/dist/types/src/components/pure/TestPageView.test/index.d.ts +3 -0
- package/dist/types/src/components/stateful/FileTree.d.ts +8 -0
- package/dist/types/src/components/stateful/ProcessManagerPage.d.ts +2 -0
- package/dist/types/src/components/stateful/SettingsPage.d.ts +2 -0
- package/dist/types/src/components/stateful/SingleProcessPage.d.ts +2 -0
- package/dist/types/src/components/stateful/TextEditorPage.d.ts +1 -0
- package/dist/types/{lib → src/lib}/BaseSuite.test/mock.d.ts +3 -3
- package/dist/types/{lib → src/lib}/basebuilder.d.ts +1 -1
- package/dist/types/{lib → src/lib}/index.d.ts +1 -1
- package/dist/types/{lib → src/lib}/pmProxy.test/mockPMBase.d.ts +1 -1
- package/dist/types/src/run.d.ts +1 -0
- package/dist/types/src/utils/logFiles.d.ts +71 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docs/test-page-components.md +91 -0
- package/package.json +27 -8
- package/src/App.tsx +11 -0
- package/src/PM/PM_WithEslintAndTsc.ts +9 -4
- package/src/PM/base.ts +1 -0
- package/src/PM/index.ts +1 -1
- package/src/PM/main.ts +424 -8
- package/src/PM/node.ts +5 -2
- package/src/PM/pure.ts +23 -61
- package/src/PM/web.ts +7 -3
- package/src/Pure.test.ts +63 -99
- package/src/README.md +20 -1
- package/src/ReportServer.ts +10 -3
- package/src/app.scss +169 -0
- package/src/build.ts +5 -1
- package/src/components/DesignEditorPage.tsx +169 -0
- package/src/components/pure/AppFrame.tsx +121 -16
- package/src/components/pure/ModalContent.test/implementation.tsx +14 -12
- package/src/components/pure/ModalContent.test/index.tsx +58 -6
- package/src/components/pure/ModalContent.test/specification.ts +2 -2
- package/src/components/pure/NavBar.tsx +31 -15
- package/src/components/pure/ProcessManager.tsx +117 -0
- package/src/components/pure/ProcessManagerView.tsx +414 -0
- package/src/components/pure/ProjectPageView.test/implementation.tsx +136 -106
- package/src/components/pure/ProjectPageView.test/index.tsx +0 -2
- package/src/components/pure/ProjectsPageView.tsx +41 -31
- package/src/components/pure/SettingsButton.tsx +7 -62
- package/src/components/pure/SingleProcessView.tsx +235 -0
- package/src/components/pure/TestPageView.test/implementation.ts +115 -147
- package/src/components/pure/TestPageView.test/specification.ts +0 -1
- package/src/components/pure/TestPageView.tsx +821 -100
- package/src/components/stateful/FeaturesReporter.tsx +1 -1
- package/src/components/stateful/FileTree.tsx +66 -0
- package/src/components/stateful/ProcessManagerPage.tsx +108 -0
- package/src/components/stateful/ProjectPage.tsx +6 -5
- package/src/components/stateful/ProjectsPage.tsx +36 -7
- package/src/components/stateful/SettingsPage.tsx +82 -0
- package/src/components/stateful/SingleProcessPage.tsx +155 -0
- package/src/components/stateful/TestPage.tsx +128 -20
- package/src/components/stateful/TextEditorPage.tsx +170 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +3 -4
- package/src/lib/BaseSuite.test/mock.ts +20 -41
- package/src/lib/BaseSuite.test/test.ts +38 -42
- package/src/lib/BaseSuite.ts +6 -3
- package/src/lib/abstractBase.ts +33 -14
- package/src/lib/baseBuilder.test/baseBuilder.test.adapter.ts +14 -7
- package/src/lib/baseBuilder.test/baseBuilder.test.implementation.ts +15 -14
- package/src/lib/basebuilder.ts +4 -9
- package/src/lib/classBuilder.ts +8 -10
- package/src/lib/core.ts +3 -19
- package/src/lib/index.ts +19 -19
- package/src/lib/pmProxy.test/adapter.ts +10 -2
- package/src/lib/pmProxy.test/implementation.ts +108 -57
- package/src/lib/pmProxy.test/mockPMBase.ts +1 -1
- package/src/lib/pmProxy.test/specification.ts +11 -0
- package/src/lib/pmProxy.ts +40 -15
- package/src/style.scss +3 -502
- package/src/templates/frontpage.html +317 -40
- package/src/templates/frontpage.md +79 -0
- package/src/themes.scss +40 -8
- package/src/utils/api.ts +47 -44
- package/src/utils/logFiles.ts +57 -23
- package/src/utils/makePrompt.ts +5 -4
- package/stargazers.txt +15 -0
- package/stargzers.js +68 -0
- package/testeranto/App.css +54 -513
- package/testeranto/App.js +13296 -2438
- package/testeranto/bundles/node/core/{chunk-L67RWZ4W.mjs → chunk-4CSH4UJE.mjs} +89 -116
- package/testeranto/bundles/node/core/{chunk-JBB5E3XJ.mjs → chunk-4JTDLQVA.mjs} +4 -9
- package/testeranto/bundles/node/core/chunk-C3APFDUV.mjs +70 -0
- package/testeranto/bundles/node/core/src/lib/BaseSuite.test/node.test.mjs +30 -42
- package/testeranto/bundles/node/core/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +27 -31
- package/testeranto/bundles/node/core/src/lib/classBuilder.test/classBuilder.test.mjs +4 -16
- package/testeranto/bundles/node/core/src/lib/core.test/core.test.mjs +16 -27
- package/testeranto/bundles/node/core/src/lib/pmProxy.test/index.mjs +468 -517
- package/testeranto/bundles/pure/core/{chunk-KHJ35R7C.mjs → chunk-62UVCSQC.mjs} +97 -72
- package/testeranto/bundles/pure/core/src/Pure.test.mjs +56 -74
- package/testeranto/bundles/pure/core/src/lib/BaseSuite.test/pure.test.mjs +39 -66
- package/testeranto/bundles/pure/core/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +25 -19
- package/testeranto/metafiles/node/core.json +2906 -0
- package/testeranto/{bundles/pure/core/metafile.json → metafiles/pure/core.json} +66 -81
- package/testeranto/metafiles/web/core.json +546 -0
- package/testeranto/reports/core/config.json +0 -24
- package/testeranto/reports/core/src/Pure.test/pure/prompt.txt +1 -1
- package/testeranto/reports/core/src/Pure.test/pure/type_errors.txt +59 -94
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/error.log +2 -55
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/info.log +0 -2
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/error.log +3 -33
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/info.log +0 -4
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/error.log +3 -0
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/info.log +0 -2
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/prompt.txt +2 -2
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/type_errors.txt +38 -90
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/prompt.txt +1 -1
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +38 -90
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/error.log +2 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/lint_errors.txt +10 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/prompt.txt +3 -3
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/stdout.log +6 -2
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +4 -4
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +22 -45
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/lint_errors.txt +10 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/prompt.txt +1 -1
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +22 -45
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/error.log +2 -0
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/prompt.txt +4 -4
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/tests.json +10 -10
- package/testeranto/reports/core/src/lib/classBuilder.test/classBuilder.test/node/type_errors.txt +38 -90
- package/testeranto/reports/core/src/lib/core.test/core.test/node/prompt.txt +4 -4
- package/testeranto/reports/core/src/lib/core.test/core.test/node/type_errors.txt +5 -24
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/lint_errors.txt +6 -14
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/prompt.txt +3 -3
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stderr.log +88 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stdout.log +10 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/tests.json +33 -43
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/type_errors.txt +17 -43
- package/testeranto/reports/core/summary.json +15 -51
- package/testeranto/reportsweb_build_errors +546 -0
- package/testeranto.config.ts +16 -13
- package/tsc.log +37 -16
- package/tsconfig.json +3 -2
- package/CNAME +0 -1
- package/README.html +0 -302
- package/dist/common/src/PM/layers/base/PM_Base.js +0 -1
- package/dist/common/src/PM/layers/base/components/PageOperations.js +0 -1
- package/dist/common/src/PM/layers/base/components/PageOperations.testeranto.js +0 -1
- package/dist/common/src/PM/layers/linting/components/Linter.js +0 -1
- package/dist/common/src/PM/layers/linting/components/TypeChecker.js +0 -1
- package/dist/common/src/PM/layers/main/components/SidecarManager.js +0 -1
- package/dist/common/src/PM/layers/main/components/TestRunner.js +0 -1
- package/dist/module/src/PM/layers/base/PM_Base.js +0 -1
- package/dist/module/src/PM/layers/base/components/PageOperations.js +0 -1
- package/dist/module/src/PM/layers/base/components/PageOperations.testeranto.js +0 -1
- package/dist/module/src/PM/layers/linting/components/Linter.js +0 -1
- package/dist/module/src/PM/layers/linting/components/TypeChecker.js +0 -1
- package/dist/module/src/PM/layers/main/components/SidecarManager.js +0 -1
- package/dist/module/src/PM/layers/main/components/TestRunner.js +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/PM/layers/base/components/PageOperations.d.ts +0 -0
- package/dist/types/PM/layers/base/components/PageOperations.testeranto.d.ts +0 -0
- package/dist/types/PM/layers/linting/components/Linter.d.ts +0 -0
- package/dist/types/PM/layers/linting/components/TypeChecker.d.ts +0 -0
- package/dist/types/PM/layers/main/components/SidecarManager.d.ts +0 -0
- package/dist/types/PM/layers/main/components/TestRunner.d.ts +0 -0
- package/dist/types/components/pure/SettingsButton.d.ts +0 -3
- package/dist/types/components/pure/TestPageView.test/index.d.ts +0 -32
- package/dist/types/utils/logFiles.d.ts +0 -7
- package/docs.html +0 -590
- package/example.css +0 -351
- package/index.html +0 -138
- package/scripts/compile-docs.js +0 -150
- package/smil30/SMIL-anim.mod.xsd +0 -163
- package/smil30/SMIL-control.mod.xsd +0 -73
- package/smil30/SMIL-layout.mod.xsd +0 -149
- package/smil30/SMIL-link.mod.xsd +0 -145
- package/smil30/SMIL-media.mod.xsd +0 -1646
- package/smil30/SMIL-metainformation.mod.xsd +0 -45
- package/smil30/SMIL-smiltext.mod.xsd +0 -353
- package/smil30/SMIL-state.mod.xsd +0 -133
- package/smil30/SMIL-struct.mod.xsd +0 -70
- package/smil30/SMIL-timing.mod.xsd +0 -105
- package/smil30/SMIL-transition.mod.xsd +0 -229
- package/smil30/SMIL.xsd +0 -63
- package/smil30/its.xsd +0 -42
- package/smil30/smil-attribs-1.mod.xsd +0 -610
- package/smil30/smil-datatypes-1.mod.xsd +0 -72
- package/smil30/smil-framework-1.mod.xsd +0 -45
- package/smil30/xml.xsd +0 -16
- package/src/App.scss +0 -123
- package/src/PM/layers/base/PM_Base.ts +0 -0
- package/src/PM/layers/base/components/PageOperations.testeranto.ts +0 -0
- package/src/PM/layers/base/components/PageOperations.ts +0 -0
- package/src/PM/layers/linting/components/Linter.ts +0 -0
- package/src/PM/layers/linting/components/TypeChecker.ts +0 -0
- package/src/PM/layers/main/components/SidecarManager.ts +0 -0
- package/src/PM/layers/main/components/TestRunner.ts +0 -0
- package/src/fonts.scss +0 -55
- package/style.css +0 -12175
- package/testeranto/bundles/node/core/chunk-ZQRRQYS4.mjs +0 -92
- package/testeranto/bundles/node/core/metafile.json +0 -5735
- package/testeranto/bundles/node/core/src/mothership/test.mjs +0 -24588
- package/testeranto/bundles/web/core/MPLUSRounded1c-Black-O75GP5JI.ttf +0 -0
- package/testeranto/bundles/web/core/MPLUSRounded1c-Bold-R524Q5BH.ttf +0 -0
- package/testeranto/bundles/web/core/MPLUSRounded1c-ExtraBold-C6GRMYVT.ttf +0 -0
- package/testeranto/bundles/web/core/MPLUSRounded1c-Light-WKN65Y2C.ttf +0 -0
- package/testeranto/bundles/web/core/MPLUSRounded1c-Medium-ZC4DWL7C.ttf +0 -0
- package/testeranto/bundles/web/core/MPLUSRounded1c-Regular-DT6EKZ3S.ttf +0 -0
- package/testeranto/bundles/web/core/MPLUSRounded1c-Thin-YWDNVG6M.ttf +0 -0
- package/testeranto/bundles/web/core/chunk-BADF3AZF.mjs +0 -108
- package/testeranto/bundles/web/core/chunk-BXV27S2S.mjs +0 -6252
- package/testeranto/bundles/web/core/chunk-EIYZKF2C.mjs +0 -223
- package/testeranto/bundles/web/core/chunk-FNXFUNA7.mjs +0 -28528
- package/testeranto/bundles/web/core/chunk-LU364HVS.mjs +0 -3311
- package/testeranto/bundles/web/core/chunk-QWII7WIM.mjs +0 -2281
- package/testeranto/bundles/web/core/chunk-VAYOSMXI.mjs +0 -21775
- package/testeranto/bundles/web/core/metafile.json +0 -18227
- package/testeranto/bundles/web/core/src/components/pure/AppFrame.test/index.css +0 -12105
- package/testeranto/bundles/web/core/src/components/pure/AppFrame.test/index.html +0 -15
- package/testeranto/bundles/web/core/src/components/pure/AppFrame.test/index.mjs +0 -517
- package/testeranto/bundles/web/core/src/components/pure/FeaturesReporterView.test/index.mjs +0 -166
- package/testeranto/bundles/web/core/src/components/pure/ModalContent.test/index.css +0 -12105
- package/testeranto/bundles/web/core/src/components/pure/ModalContent.test/index.html +0 -15
- package/testeranto/bundles/web/core/src/components/pure/ModalContent.test/index.mjs +0 -93
- package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.css +0 -12105
- package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.mjs +0 -343
- package/testeranto/bundles/web/core/src/components/pure/TestPageView.test/index.css +0 -12105
- package/testeranto/bundles/web/core/src/components/pure/TestPageView.test/index.mjs +0 -483
- package/testeranto/bundles/web/core/src/lib/BaseSuite.test/web.test.mjs +0 -394
- package/testeranto/bundles/web/core/src/lib/baseBuilder.test/baseBuilder.test.web.mjs +0 -256
- package/testeranto/reports/core/src/components/pure/AppFrame.test/index/web/debug.log +0 -0
- package/testeranto/reports/core/src/components/pure/AppFrame.test/index/web/error.log +0 -22
- package/testeranto/reports/core/src/components/pure/AppFrame.test/index/web/exit.log +0 -1
- package/testeranto/reports/core/src/components/pure/AppFrame.test/index/web/info.log +0 -4
- package/testeranto/reports/core/src/components/pure/AppFrame.test/index/web/lint_errors.txt +0 -2
- package/testeranto/reports/core/src/components/pure/AppFrame.test/index/web/message.txt +0 -17
- package/testeranto/reports/core/src/components/pure/AppFrame.test/index/web/prompt.txt +0 -18
- package/testeranto/reports/core/src/components/pure/AppFrame.test/index/web/tests.json +0 -57
- package/testeranto/reports/core/src/components/pure/AppFrame.test/index/web/type_errors.txt +0 -55
- package/testeranto/reports/core/src/components/pure/AppFrame.test/index/web/warn.log +0 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/lint_errors.txt +0 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/message.txt +0 -17
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/prompt.txt +0 -16
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/suite-0/given-basicRender/then-4/butThen/features-reporter.png +0 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/tests.json +0 -76
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/type_errors.txt +0 -80
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/debug.log +0 -0
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/error.log +0 -0
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/exit.log +0 -0
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/info.log +0 -4
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/lint_errors.txt +0 -0
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/message.txt +0 -17
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/prompt.txt +0 -15
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/suite-0/given-basicRender/then-2/butThen/modal-content.png +0 -0
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/tests.json +0 -42
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/type_errors.txt +0 -65
- package/testeranto/reports/core/src/components/pure/ModalContent.test/index/web/warn.log +0 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +0 -2
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/message.txt +0 -17
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/prompt.txt +0 -16
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/suite-0/given-basicRender/then-6/butThen/happy-state.png +0 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/suite-0/given-errorHandling/then-1/butThen/error-state.png +0 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/tests.json +0 -99
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +0 -91
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/lint_errors.txt +0 -0
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/message.txt +0 -17
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/prompt.txt +0 -18
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/tests.json +0 -69
- package/testeranto/reports/core/src/components/pure/TestPageView.test/index/web/type_errors.txt +0 -111
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/lint_errors.txt +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/message.txt +0 -17
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/prompt.txt +0 -15
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/tests.json +0 -31
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/type_errors.txt +0 -113
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/lint_errors.txt +0 -0
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/message.txt +0 -17
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/prompt.txt +0 -17
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/suite-0/given-testInitialization/then-0/butThen/hello.txt +0 -1
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/suite-0/given-testInitialization/then-1/butThen/artifact_test.txt +0 -1
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/tests.json +0 -71
- package/testeranto/reports/core/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +0 -65
- package/testeranto/reports/core/src/mothership/test/node/exit.log +0 -1
- package/testeranto/reports/core/src/mothership/test/node/lint_errors.txt +0 -0
- package/testeranto/reports/core/src/mothership/test/node/message.txt +0 -17
- package/testeranto/reports/core/src/mothership/test/node/prompt.txt +0 -14
- package/testeranto/reports/core/src/mothership/test/node/stderr.log +0 -27
- package/testeranto/reports/core/src/mothership/test/node/stdout.log +0 -8
- package/testeranto/reports/core/src/mothership/test/node/tests.json +0 -36
- package/testeranto/reports/core/src/mothership/test/node/type_errors.txt +0 -38
- package/videos/download-smil-xsd.sh +0 -29
- package/videos/project0/index.md +0 -72
- package/videos/project0/narration.json +0 -7
- package/videos/project0/narration.ssml +0 -58
- package/videos/project0/package.json +0 -21
- package/videos/project0/presentation.smil +0 -25
- package/videos/project0/smil30/SMIL-anim.mod.xsd +0 -163
- package/videos/project0/smil30/SMIL-anim.mod.xsd.1 +0 -163
- package/videos/project0/smil30/SMIL-anim.mod.xsd.2 +0 -163
- package/videos/project0/smil30/SMIL-control.mod.xsd +0 -73
- package/videos/project0/smil30/SMIL-control.mod.xsd.1 +0 -73
- package/videos/project0/smil30/SMIL-control.mod.xsd.2 +0 -73
- package/videos/project0/smil30/SMIL-layout.mod.xsd +0 -149
- package/videos/project0/smil30/SMIL-layout.mod.xsd.1 +0 -149
- package/videos/project0/smil30/SMIL-layout.mod.xsd.2 +0 -149
- package/videos/project0/smil30/SMIL-link.mod.xsd +0 -145
- package/videos/project0/smil30/SMIL-link.mod.xsd.1 +0 -145
- package/videos/project0/smil30/SMIL-link.mod.xsd.2 +0 -145
- package/videos/project0/smil30/SMIL-media.mod.xsd +0 -1646
- package/videos/project0/smil30/SMIL-media.mod.xsd.1 +0 -1646
- package/videos/project0/smil30/SMIL-media.mod.xsd.2 +0 -1646
- package/videos/project0/smil30/SMIL-metainformation.mod.xsd +0 -45
- package/videos/project0/smil30/SMIL-metainformation.mod.xsd.1 +0 -45
- package/videos/project0/smil30/SMIL-metainformation.mod.xsd.2 +0 -45
- package/videos/project0/smil30/SMIL-smiltext.mod.xsd +0 -353
- package/videos/project0/smil30/SMIL-smiltext.mod.xsd.1 +0 -353
- package/videos/project0/smil30/SMIL-smiltext.mod.xsd.2 +0 -353
- package/videos/project0/smil30/SMIL-state.mod.xsd +0 -133
- package/videos/project0/smil30/SMIL-state.mod.xsd.1 +0 -133
- package/videos/project0/smil30/SMIL-state.mod.xsd.2 +0 -133
- package/videos/project0/smil30/SMIL-struct.mod.xsd +0 -70
- package/videos/project0/smil30/SMIL-struct.mod.xsd.1 +0 -70
- package/videos/project0/smil30/SMIL-struct.mod.xsd.2 +0 -70
- package/videos/project0/smil30/SMIL-timing.mod.xsd +0 -105
- package/videos/project0/smil30/SMIL-timing.mod.xsd.1 +0 -105
- package/videos/project0/smil30/SMIL-timing.mod.xsd.2 +0 -105
- package/videos/project0/smil30/SMIL-transition.mod.xsd +0 -229
- package/videos/project0/smil30/SMIL-transition.mod.xsd.1 +0 -229
- package/videos/project0/smil30/SMIL-transition.mod.xsd.2 +0 -229
- package/videos/project0/smil30/SMIL.xsd +0 -63
- package/videos/project0/smil30/SMIL.xsd.1 +0 -63
- package/videos/project0/smil30/SMIL.xsd.2 +0 -63
- package/videos/project0/smil30/its.xsd +0 -42
- package/videos/project0/smil30/its.xsd.1 +0 -42
- package/videos/project0/smil30/its.xsd.2 +0 -42
- package/videos/project0/smil30/smil-attribs-1.mod.xsd +0 -610
- package/videos/project0/smil30/smil-attribs-1.mod.xsd.1 +0 -610
- package/videos/project0/smil30/smil-attribs-1.mod.xsd.2 +0 -610
- package/videos/project0/smil30/smil-datatypes-1.mod.xsd +0 -72
- package/videos/project0/smil30/smil-datatypes-1.mod.xsd.1 +0 -72
- package/videos/project0/smil30/smil-datatypes-1.mod.xsd.2 +0 -72
- package/videos/project0/smil30/smil-framework-1.mod.xsd +0 -45
- package/videos/project0/smil30/smil-framework-1.mod.xsd.1 +0 -45
- package/videos/project0/smil30/smil-framework-1.mod.xsd.2 +0 -45
- package/videos/project0/smil30/smil-profile-model-1.mod.xsd +0 -1331
- package/videos/project0/smil30/smil-profile-model-1.mod.xsd.1 +0 -1331
- package/videos/project0/smil30/smil-qname-1.mod.xsd +0 -121
- package/videos/project0/smil30/smil-qname-1.mod.xsd.1 +0 -121
- package/videos/project0/smil30/xml.xsd +0 -16
- package/videos/project0/smil30/xml.xsd.1 +0 -16
- package/videos/project0/smil30/xml.xsd.2 +0 -16
- package/videos/project0/smil30.xsd +0 -137
- package/videos/project0/src/audio/metadata.json +0 -5
- package/videos/project0/src/audio/narration.mp3 +0 -0
- package/videos/project0/src/motion-canvas.d.ts +0 -1
- package/videos/project0/src/project.meta +0 -31
- package/videos/project0/src/project.ts +0 -13
- package/videos/project0/src/scenes/example.meta +0 -5
- package/videos/project0/src/scenes/scene1.meta +0 -3
- package/videos/project0/src/scenes/scene1.tsx +0 -129
- package/videos/project0/src/scenes/scene2.tsx +0 -132
- package/videos/project0/src/scenes/scene3.meta +0 -26
- package/videos/project0/src/scenes/scene3.tsx +0 -188
- package/videos/project0/tsconfig.json +0 -4
- package/videos/project0/vite.config.ts +0 -10
- package/videos/trash/output/project.mp4 +0 -0
- package/videos/trash/text.mp4 +0 -0
- package/videos/trash/video/project.tsx +0 -549
- package/videos/trash/video/render.ts +0 -15
- package/videos/trash/vite.config.ts +0 -10
- package/videos/tts.js +0 -109
- /package/dist/{types/ReportServer.d.ts → module/design-editor/types.js} +0 -0
- /package/dist/types/{App.d.ts → src/App.d.ts} +0 -0
- /package/dist/types/{CoreTypes.d.ts → src/CoreTypes.d.ts} +0 -0
- /package/dist/types/{Init.d.ts → src/Init.d.ts} +0 -0
- /package/dist/types/{Node.d.ts → src/Node.d.ts} +0 -0
- /package/dist/types/{NodeSidecar.d.ts → src/NodeSidecar.d.ts} +0 -0
- /package/dist/types/{PM → src/PM}/PM_WithEslintAndTsc.d.ts +0 -0
- /package/dist/types/{PM → src/PM}/__tests__/nodeSidecar.testeranto.d.ts +0 -0
- /package/dist/types/{PM → src/PM}/__tests__/pureSidecar.testeranto.d.ts +0 -0
- /package/dist/types/{PM → src/PM}/__tests__/webSidecar.testeranto.d.ts +0 -0
- /package/dist/types/{PM → src/PM}/base.d.ts +0 -0
- /package/dist/types/{PM → src/PM}/node.d.ts +0 -0
- /package/dist/types/{PM → src/PM}/nodeSidecar.d.ts +0 -0
- /package/dist/types/{PM → src/PM}/pureSidecar.d.ts +0 -0
- /package/dist/types/{PM → src/PM}/sidecar.d.ts +0 -0
- /package/dist/types/{PM → src/PM}/types.d.ts +0 -0
- /package/dist/types/{PM → src/PM}/web.d.ts +0 -0
- /package/dist/types/{PM → src/PM}/webSidecar.d.ts +0 -0
- /package/dist/types/{Pure.d.ts → src/Pure.d.ts} +0 -0
- /package/dist/types/{PureSidecar.d.ts → src/PureSidecar.d.ts} +0 -0
- /package/dist/types/{build.d.ts → src/ReportServer.d.ts} +0 -0
- /package/dist/types/{ReportServer.test.ts → src/ReportServer.test.ts}/index.d.ts +0 -0
- /package/dist/types/{ReportServerLib.d.ts → src/ReportServerLib.d.ts} +0 -0
- /package/dist/types/{Types.d.ts → src/Types.d.ts} +0 -0
- /package/dist/types/{Web.d.ts → src/Web.d.ts} +0 -0
- /package/dist/types/{WebSidecar.d.ts → src/WebSidecar.d.ts} +0 -0
- /package/dist/types/{init-docs.d.ts → src/build.d.ts} +0 -0
- /package/dist/types/{components → src/components}/SunriseAnimation.d.ts +0 -0
- /package/dist/types/{components → src/components}/SunriseAnimation.test/implementation.d.ts +0 -0
- /package/dist/types/{components → src/components}/SunriseAnimation.test/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/SunriseAnimation.test/interface.d.ts +0 -0
- /package/dist/types/{components → src/components}/SunriseAnimation.test/specification.d.ts +0 -0
- /package/dist/types/{components → src/components}/SunriseAnimation.test/types.d.ts +0 -0
- /package/dist/types/{components → src/components}/TestStatusBadge.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/AppFrame.test/implementation.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/AppFrame.test/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/AppFrame.test/specification.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/AppFrame.test/types.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/FeaturesReporterView.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/FeaturesReporterView.test/implementation.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/FeaturesReporterView.test/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/FeaturesReporterView.test/specification.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/FeaturesReporterView.test/types.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/ModalContent.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/ModalContent.test/implementation.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/ModalContent.test/specification.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/ModalContent.test/types.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/ProjectPageView.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/ProjectPageView.test/implementation.d.ts +0 -0
- /package/dist/types/{components/pure/ModalContent.test → src/components/pure/ProjectPageView.test}/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/ProjectPageView.test/specification.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/ProjectPageView.test/types.d.ts +0 -0
- /package/dist/types/{PM/layers/base/PM_Base.d.ts → src/components/pure/SingleProcessView.d.ts} +0 -0
- /package/dist/types/{components → src/components}/pure/TestPageView.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/TestPageView.test/specification.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/TestPageView.test/types.d.ts +0 -0
- /package/dist/types/{components → src/components}/pure/ThemeCard.d.ts +0 -0
- /package/dist/types/{components → src/components}/stateful/FeaturesReporter.d.ts +0 -0
- /package/dist/types/{components → src/components}/stateful/ProjectPage.d.ts +0 -0
- /package/dist/types/{components → src/components}/stateful/ProjectsPage.d.ts +0 -0
- /package/dist/types/{components → src/components}/stateful/TestPage.d.ts +0 -0
- /package/dist/types/{defaultConfig.d.ts → src/defaultConfig.d.ts} +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/consoleDetectorPlugin.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/eslint-formatter-testeranto.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/featuresPlugin.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/index.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/nativeImportDetectorPlugin.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/node.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/pure.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/rebuildPlugin.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/web.d.ts +0 -0
- /package/dist/types/{run.d.ts → src/init-docs.d.ts} +0 -0
- /package/dist/types/{lib → src/lib}/BaseSuite.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/BaseSuite.test/node.test.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/BaseSuite.test/pure.test.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/BaseSuite.test/test.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/BaseSuite.test/web.test.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/Sidecar.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/abstractBase.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/abstractBase.test/MockGiven.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/abstractBase.test/MockThen.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/abstractBase.test/MockWhen.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/abstractBase.test/adapter.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/abstractBase.test/implementation.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/abstractBase.test/index.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/abstractBase.test/specification.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/abstractBase.test/types.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/baseBuilder.test/baseBuilder.test.adapter.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/baseBuilder.test/baseBuilder.test.implementation.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/baseBuilder.test/baseBuilder.test.mock.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/baseBuilder.test/baseBuilder.test.node.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/baseBuilder.test/baseBuilder.test.pure.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/baseBuilder.test/baseBuilder.test.specification.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/baseBuilder.test/baseBuilder.test.types.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/baseBuilder.test/baseBuilder.test.web.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/classBuilder.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/classBuilder.test/classBuilder.test.adapter.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/classBuilder.test/classBuilder.test.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/classBuilder.test/classBuilder.test.implementation.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/classBuilder.test/classBuilder.test.specification.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/classBuilder.test/classBuilder.test.types.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/classBuilder.test/mock.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/core.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/core.test/MockCore.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/core.test/core.test.adapter.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/core.test/core.test.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/core.test/core.test.implementation.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/core.test/core.test.specification.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/core.test/core.test.types.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/mocks.test.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/pmProxy.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/pmProxy.test/adapter.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/pmProxy.test/implementation.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/pmProxy.test/index.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/pmProxy.test/mockPM.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/pmProxy.test/specification.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/pmProxy.test/types.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/types.d.ts +0 -0
- /package/dist/types/{mothership → src/mothership}/index.d.ts +0 -0
- /package/dist/types/{mothership → src/mothership}/test.d.ts +0 -0
- /package/dist/types/{types → src/types}/features.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/api.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/buildTemplates.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/featureUtils.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/makePrompt.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/queue.d.ts +0 -0
- /package/dist/types/{utils.d.ts → src/utils.d.ts} +0 -0
- /package/dist/types/{web.html.d.ts → src/web.html.d.ts} +0 -0
|
@@ -1,3311 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __esm = (fn, res) => function __init() {
|
|
8
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
9
|
-
};
|
|
10
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
-
};
|
|
13
|
-
var __export = (target, all) => {
|
|
14
|
-
for (var name in all)
|
|
15
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
|
-
};
|
|
17
|
-
var __copyProps = (to, from, except, desc) => {
|
|
18
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
-
for (let key of __getOwnPropNames(from))
|
|
20
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
-
}
|
|
23
|
-
return to;
|
|
24
|
-
};
|
|
25
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
|
-
mod
|
|
32
|
-
));
|
|
33
|
-
|
|
34
|
-
// node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js
|
|
35
|
-
var init_dirname = __esm({
|
|
36
|
-
"node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js"() {
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
// node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js
|
|
41
|
-
function dew$2() {
|
|
42
|
-
if (_dewExec$2)
|
|
43
|
-
return exports$2;
|
|
44
|
-
_dewExec$2 = true;
|
|
45
|
-
exports$2.byteLength = byteLength;
|
|
46
|
-
exports$2.toByteArray = toByteArray;
|
|
47
|
-
exports$2.fromByteArray = fromByteArray;
|
|
48
|
-
var lookup = [];
|
|
49
|
-
var revLookup = [];
|
|
50
|
-
var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
|
51
|
-
var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
52
|
-
for (var i = 0, len = code.length; i < len; ++i) {
|
|
53
|
-
lookup[i] = code[i];
|
|
54
|
-
revLookup[code.charCodeAt(i)] = i;
|
|
55
|
-
}
|
|
56
|
-
revLookup["-".charCodeAt(0)] = 62;
|
|
57
|
-
revLookup["_".charCodeAt(0)] = 63;
|
|
58
|
-
function getLens(b64) {
|
|
59
|
-
var len2 = b64.length;
|
|
60
|
-
if (len2 % 4 > 0) {
|
|
61
|
-
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
62
|
-
}
|
|
63
|
-
var validLen = b64.indexOf("=");
|
|
64
|
-
if (validLen === -1)
|
|
65
|
-
validLen = len2;
|
|
66
|
-
var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
|
|
67
|
-
return [validLen, placeHoldersLen];
|
|
68
|
-
}
|
|
69
|
-
function byteLength(b64) {
|
|
70
|
-
var lens = getLens(b64);
|
|
71
|
-
var validLen = lens[0];
|
|
72
|
-
var placeHoldersLen = lens[1];
|
|
73
|
-
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
74
|
-
}
|
|
75
|
-
function _byteLength(b64, validLen, placeHoldersLen) {
|
|
76
|
-
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
77
|
-
}
|
|
78
|
-
function toByteArray(b64) {
|
|
79
|
-
var tmp;
|
|
80
|
-
var lens = getLens(b64);
|
|
81
|
-
var validLen = lens[0];
|
|
82
|
-
var placeHoldersLen = lens[1];
|
|
83
|
-
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
|
|
84
|
-
var curByte = 0;
|
|
85
|
-
var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
|
|
86
|
-
var i2;
|
|
87
|
-
for (i2 = 0; i2 < len2; i2 += 4) {
|
|
88
|
-
tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];
|
|
89
|
-
arr[curByte++] = tmp >> 16 & 255;
|
|
90
|
-
arr[curByte++] = tmp >> 8 & 255;
|
|
91
|
-
arr[curByte++] = tmp & 255;
|
|
92
|
-
}
|
|
93
|
-
if (placeHoldersLen === 2) {
|
|
94
|
-
tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;
|
|
95
|
-
arr[curByte++] = tmp & 255;
|
|
96
|
-
}
|
|
97
|
-
if (placeHoldersLen === 1) {
|
|
98
|
-
tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;
|
|
99
|
-
arr[curByte++] = tmp >> 8 & 255;
|
|
100
|
-
arr[curByte++] = tmp & 255;
|
|
101
|
-
}
|
|
102
|
-
return arr;
|
|
103
|
-
}
|
|
104
|
-
function tripletToBase64(num) {
|
|
105
|
-
return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
|
|
106
|
-
}
|
|
107
|
-
function encodeChunk(uint8, start, end) {
|
|
108
|
-
var tmp;
|
|
109
|
-
var output = [];
|
|
110
|
-
for (var i2 = start; i2 < end; i2 += 3) {
|
|
111
|
-
tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);
|
|
112
|
-
output.push(tripletToBase64(tmp));
|
|
113
|
-
}
|
|
114
|
-
return output.join("");
|
|
115
|
-
}
|
|
116
|
-
function fromByteArray(uint8) {
|
|
117
|
-
var tmp;
|
|
118
|
-
var len2 = uint8.length;
|
|
119
|
-
var extraBytes = len2 % 3;
|
|
120
|
-
var parts = [];
|
|
121
|
-
var maxChunkLength = 16383;
|
|
122
|
-
for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {
|
|
123
|
-
parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength));
|
|
124
|
-
}
|
|
125
|
-
if (extraBytes === 1) {
|
|
126
|
-
tmp = uint8[len2 - 1];
|
|
127
|
-
parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "==");
|
|
128
|
-
} else if (extraBytes === 2) {
|
|
129
|
-
tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
|
|
130
|
-
parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "=");
|
|
131
|
-
}
|
|
132
|
-
return parts.join("");
|
|
133
|
-
}
|
|
134
|
-
return exports$2;
|
|
135
|
-
}
|
|
136
|
-
function dew$1() {
|
|
137
|
-
if (_dewExec$1)
|
|
138
|
-
return exports$1;
|
|
139
|
-
_dewExec$1 = true;
|
|
140
|
-
exports$1.read = function(buffer, offset, isLE, mLen, nBytes) {
|
|
141
|
-
var e, m;
|
|
142
|
-
var eLen = nBytes * 8 - mLen - 1;
|
|
143
|
-
var eMax = (1 << eLen) - 1;
|
|
144
|
-
var eBias = eMax >> 1;
|
|
145
|
-
var nBits = -7;
|
|
146
|
-
var i = isLE ? nBytes - 1 : 0;
|
|
147
|
-
var d = isLE ? -1 : 1;
|
|
148
|
-
var s = buffer[offset + i];
|
|
149
|
-
i += d;
|
|
150
|
-
e = s & (1 << -nBits) - 1;
|
|
151
|
-
s >>= -nBits;
|
|
152
|
-
nBits += eLen;
|
|
153
|
-
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {
|
|
154
|
-
}
|
|
155
|
-
m = e & (1 << -nBits) - 1;
|
|
156
|
-
e >>= -nBits;
|
|
157
|
-
nBits += mLen;
|
|
158
|
-
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {
|
|
159
|
-
}
|
|
160
|
-
if (e === 0) {
|
|
161
|
-
e = 1 - eBias;
|
|
162
|
-
} else if (e === eMax) {
|
|
163
|
-
return m ? NaN : (s ? -1 : 1) * Infinity;
|
|
164
|
-
} else {
|
|
165
|
-
m = m + Math.pow(2, mLen);
|
|
166
|
-
e = e - eBias;
|
|
167
|
-
}
|
|
168
|
-
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
|
|
169
|
-
};
|
|
170
|
-
exports$1.write = function(buffer, value, offset, isLE, mLen, nBytes) {
|
|
171
|
-
var e, m, c;
|
|
172
|
-
var eLen = nBytes * 8 - mLen - 1;
|
|
173
|
-
var eMax = (1 << eLen) - 1;
|
|
174
|
-
var eBias = eMax >> 1;
|
|
175
|
-
var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
|
|
176
|
-
var i = isLE ? 0 : nBytes - 1;
|
|
177
|
-
var d = isLE ? 1 : -1;
|
|
178
|
-
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
|
179
|
-
value = Math.abs(value);
|
|
180
|
-
if (isNaN(value) || value === Infinity) {
|
|
181
|
-
m = isNaN(value) ? 1 : 0;
|
|
182
|
-
e = eMax;
|
|
183
|
-
} else {
|
|
184
|
-
e = Math.floor(Math.log(value) / Math.LN2);
|
|
185
|
-
if (value * (c = Math.pow(2, -e)) < 1) {
|
|
186
|
-
e--;
|
|
187
|
-
c *= 2;
|
|
188
|
-
}
|
|
189
|
-
if (e + eBias >= 1) {
|
|
190
|
-
value += rt / c;
|
|
191
|
-
} else {
|
|
192
|
-
value += rt * Math.pow(2, 1 - eBias);
|
|
193
|
-
}
|
|
194
|
-
if (value * c >= 2) {
|
|
195
|
-
e++;
|
|
196
|
-
c /= 2;
|
|
197
|
-
}
|
|
198
|
-
if (e + eBias >= eMax) {
|
|
199
|
-
m = 0;
|
|
200
|
-
e = eMax;
|
|
201
|
-
} else if (e + eBias >= 1) {
|
|
202
|
-
m = (value * c - 1) * Math.pow(2, mLen);
|
|
203
|
-
e = e + eBias;
|
|
204
|
-
} else {
|
|
205
|
-
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
|
206
|
-
e = 0;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
for (; mLen >= 8; buffer[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) {
|
|
210
|
-
}
|
|
211
|
-
e = e << mLen | m;
|
|
212
|
-
eLen += mLen;
|
|
213
|
-
for (; eLen > 0; buffer[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
|
|
214
|
-
}
|
|
215
|
-
buffer[offset + i - d] |= s * 128;
|
|
216
|
-
};
|
|
217
|
-
return exports$1;
|
|
218
|
-
}
|
|
219
|
-
function dew() {
|
|
220
|
-
if (_dewExec)
|
|
221
|
-
return exports;
|
|
222
|
-
_dewExec = true;
|
|
223
|
-
const base64 = dew$2();
|
|
224
|
-
const ieee754 = dew$1();
|
|
225
|
-
const customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
|
|
226
|
-
exports.Buffer = Buffer3;
|
|
227
|
-
exports.SlowBuffer = SlowBuffer;
|
|
228
|
-
exports.INSPECT_MAX_BYTES = 50;
|
|
229
|
-
const K_MAX_LENGTH = 2147483647;
|
|
230
|
-
exports.kMaxLength = K_MAX_LENGTH;
|
|
231
|
-
Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport();
|
|
232
|
-
if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
|
|
233
|
-
console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
|
|
234
|
-
}
|
|
235
|
-
function typedArraySupport() {
|
|
236
|
-
try {
|
|
237
|
-
const arr = new Uint8Array(1);
|
|
238
|
-
const proto = {
|
|
239
|
-
foo: function() {
|
|
240
|
-
return 42;
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
Object.setPrototypeOf(proto, Uint8Array.prototype);
|
|
244
|
-
Object.setPrototypeOf(arr, proto);
|
|
245
|
-
return arr.foo() === 42;
|
|
246
|
-
} catch (e) {
|
|
247
|
-
return false;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
Object.defineProperty(Buffer3.prototype, "parent", {
|
|
251
|
-
enumerable: true,
|
|
252
|
-
get: function() {
|
|
253
|
-
if (!Buffer3.isBuffer(this))
|
|
254
|
-
return void 0;
|
|
255
|
-
return this.buffer;
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
Object.defineProperty(Buffer3.prototype, "offset", {
|
|
259
|
-
enumerable: true,
|
|
260
|
-
get: function() {
|
|
261
|
-
if (!Buffer3.isBuffer(this))
|
|
262
|
-
return void 0;
|
|
263
|
-
return this.byteOffset;
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
function createBuffer(length) {
|
|
267
|
-
if (length > K_MAX_LENGTH) {
|
|
268
|
-
throw new RangeError('The value "' + length + '" is invalid for option "size"');
|
|
269
|
-
}
|
|
270
|
-
const buf = new Uint8Array(length);
|
|
271
|
-
Object.setPrototypeOf(buf, Buffer3.prototype);
|
|
272
|
-
return buf;
|
|
273
|
-
}
|
|
274
|
-
function Buffer3(arg, encodingOrOffset, length) {
|
|
275
|
-
if (typeof arg === "number") {
|
|
276
|
-
if (typeof encodingOrOffset === "string") {
|
|
277
|
-
throw new TypeError('The "string" argument must be of type string. Received type number');
|
|
278
|
-
}
|
|
279
|
-
return allocUnsafe(arg);
|
|
280
|
-
}
|
|
281
|
-
return from(arg, encodingOrOffset, length);
|
|
282
|
-
}
|
|
283
|
-
Buffer3.poolSize = 8192;
|
|
284
|
-
function from(value, encodingOrOffset, length) {
|
|
285
|
-
if (typeof value === "string") {
|
|
286
|
-
return fromString(value, encodingOrOffset);
|
|
287
|
-
}
|
|
288
|
-
if (ArrayBuffer.isView(value)) {
|
|
289
|
-
return fromArrayView(value);
|
|
290
|
-
}
|
|
291
|
-
if (value == null) {
|
|
292
|
-
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
|
|
293
|
-
}
|
|
294
|
-
if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
|
|
295
|
-
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
296
|
-
}
|
|
297
|
-
if (typeof SharedArrayBuffer !== "undefined" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
|
|
298
|
-
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
299
|
-
}
|
|
300
|
-
if (typeof value === "number") {
|
|
301
|
-
throw new TypeError('The "value" argument must not be of type number. Received type number');
|
|
302
|
-
}
|
|
303
|
-
const valueOf = value.valueOf && value.valueOf();
|
|
304
|
-
if (valueOf != null && valueOf !== value) {
|
|
305
|
-
return Buffer3.from(valueOf, encodingOrOffset, length);
|
|
306
|
-
}
|
|
307
|
-
const b = fromObject(value);
|
|
308
|
-
if (b)
|
|
309
|
-
return b;
|
|
310
|
-
if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
|
|
311
|
-
return Buffer3.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
|
|
312
|
-
}
|
|
313
|
-
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
|
|
314
|
-
}
|
|
315
|
-
Buffer3.from = function(value, encodingOrOffset, length) {
|
|
316
|
-
return from(value, encodingOrOffset, length);
|
|
317
|
-
};
|
|
318
|
-
Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);
|
|
319
|
-
Object.setPrototypeOf(Buffer3, Uint8Array);
|
|
320
|
-
function assertSize(size) {
|
|
321
|
-
if (typeof size !== "number") {
|
|
322
|
-
throw new TypeError('"size" argument must be of type number');
|
|
323
|
-
} else if (size < 0) {
|
|
324
|
-
throw new RangeError('The value "' + size + '" is invalid for option "size"');
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
function alloc(size, fill, encoding) {
|
|
328
|
-
assertSize(size);
|
|
329
|
-
if (size <= 0) {
|
|
330
|
-
return createBuffer(size);
|
|
331
|
-
}
|
|
332
|
-
if (fill !== void 0) {
|
|
333
|
-
return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
|
|
334
|
-
}
|
|
335
|
-
return createBuffer(size);
|
|
336
|
-
}
|
|
337
|
-
Buffer3.alloc = function(size, fill, encoding) {
|
|
338
|
-
return alloc(size, fill, encoding);
|
|
339
|
-
};
|
|
340
|
-
function allocUnsafe(size) {
|
|
341
|
-
assertSize(size);
|
|
342
|
-
return createBuffer(size < 0 ? 0 : checked(size) | 0);
|
|
343
|
-
}
|
|
344
|
-
Buffer3.allocUnsafe = function(size) {
|
|
345
|
-
return allocUnsafe(size);
|
|
346
|
-
};
|
|
347
|
-
Buffer3.allocUnsafeSlow = function(size) {
|
|
348
|
-
return allocUnsafe(size);
|
|
349
|
-
};
|
|
350
|
-
function fromString(string, encoding) {
|
|
351
|
-
if (typeof encoding !== "string" || encoding === "") {
|
|
352
|
-
encoding = "utf8";
|
|
353
|
-
}
|
|
354
|
-
if (!Buffer3.isEncoding(encoding)) {
|
|
355
|
-
throw new TypeError("Unknown encoding: " + encoding);
|
|
356
|
-
}
|
|
357
|
-
const length = byteLength(string, encoding) | 0;
|
|
358
|
-
let buf = createBuffer(length);
|
|
359
|
-
const actual = buf.write(string, encoding);
|
|
360
|
-
if (actual !== length) {
|
|
361
|
-
buf = buf.slice(0, actual);
|
|
362
|
-
}
|
|
363
|
-
return buf;
|
|
364
|
-
}
|
|
365
|
-
function fromArrayLike(array) {
|
|
366
|
-
const length = array.length < 0 ? 0 : checked(array.length) | 0;
|
|
367
|
-
const buf = createBuffer(length);
|
|
368
|
-
for (let i = 0; i < length; i += 1) {
|
|
369
|
-
buf[i] = array[i] & 255;
|
|
370
|
-
}
|
|
371
|
-
return buf;
|
|
372
|
-
}
|
|
373
|
-
function fromArrayView(arrayView) {
|
|
374
|
-
if (isInstance(arrayView, Uint8Array)) {
|
|
375
|
-
const copy = new Uint8Array(arrayView);
|
|
376
|
-
return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
|
|
377
|
-
}
|
|
378
|
-
return fromArrayLike(arrayView);
|
|
379
|
-
}
|
|
380
|
-
function fromArrayBuffer(array, byteOffset, length) {
|
|
381
|
-
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
|
382
|
-
throw new RangeError('"offset" is outside of buffer bounds');
|
|
383
|
-
}
|
|
384
|
-
if (array.byteLength < byteOffset + (length || 0)) {
|
|
385
|
-
throw new RangeError('"length" is outside of buffer bounds');
|
|
386
|
-
}
|
|
387
|
-
let buf;
|
|
388
|
-
if (byteOffset === void 0 && length === void 0) {
|
|
389
|
-
buf = new Uint8Array(array);
|
|
390
|
-
} else if (length === void 0) {
|
|
391
|
-
buf = new Uint8Array(array, byteOffset);
|
|
392
|
-
} else {
|
|
393
|
-
buf = new Uint8Array(array, byteOffset, length);
|
|
394
|
-
}
|
|
395
|
-
Object.setPrototypeOf(buf, Buffer3.prototype);
|
|
396
|
-
return buf;
|
|
397
|
-
}
|
|
398
|
-
function fromObject(obj) {
|
|
399
|
-
if (Buffer3.isBuffer(obj)) {
|
|
400
|
-
const len = checked(obj.length) | 0;
|
|
401
|
-
const buf = createBuffer(len);
|
|
402
|
-
if (buf.length === 0) {
|
|
403
|
-
return buf;
|
|
404
|
-
}
|
|
405
|
-
obj.copy(buf, 0, 0, len);
|
|
406
|
-
return buf;
|
|
407
|
-
}
|
|
408
|
-
if (obj.length !== void 0) {
|
|
409
|
-
if (typeof obj.length !== "number" || numberIsNaN(obj.length)) {
|
|
410
|
-
return createBuffer(0);
|
|
411
|
-
}
|
|
412
|
-
return fromArrayLike(obj);
|
|
413
|
-
}
|
|
414
|
-
if (obj.type === "Buffer" && Array.isArray(obj.data)) {
|
|
415
|
-
return fromArrayLike(obj.data);
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
function checked(length) {
|
|
419
|
-
if (length >= K_MAX_LENGTH) {
|
|
420
|
-
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes");
|
|
421
|
-
}
|
|
422
|
-
return length | 0;
|
|
423
|
-
}
|
|
424
|
-
function SlowBuffer(length) {
|
|
425
|
-
if (+length != length) {
|
|
426
|
-
length = 0;
|
|
427
|
-
}
|
|
428
|
-
return Buffer3.alloc(+length);
|
|
429
|
-
}
|
|
430
|
-
Buffer3.isBuffer = function isBuffer(b) {
|
|
431
|
-
return b != null && b._isBuffer === true && b !== Buffer3.prototype;
|
|
432
|
-
};
|
|
433
|
-
Buffer3.compare = function compare(a, b) {
|
|
434
|
-
if (isInstance(a, Uint8Array))
|
|
435
|
-
a = Buffer3.from(a, a.offset, a.byteLength);
|
|
436
|
-
if (isInstance(b, Uint8Array))
|
|
437
|
-
b = Buffer3.from(b, b.offset, b.byteLength);
|
|
438
|
-
if (!Buffer3.isBuffer(a) || !Buffer3.isBuffer(b)) {
|
|
439
|
-
throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
|
|
440
|
-
}
|
|
441
|
-
if (a === b)
|
|
442
|
-
return 0;
|
|
443
|
-
let x = a.length;
|
|
444
|
-
let y = b.length;
|
|
445
|
-
for (let i = 0, len = Math.min(x, y); i < len; ++i) {
|
|
446
|
-
if (a[i] !== b[i]) {
|
|
447
|
-
x = a[i];
|
|
448
|
-
y = b[i];
|
|
449
|
-
break;
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
if (x < y)
|
|
453
|
-
return -1;
|
|
454
|
-
if (y < x)
|
|
455
|
-
return 1;
|
|
456
|
-
return 0;
|
|
457
|
-
};
|
|
458
|
-
Buffer3.isEncoding = function isEncoding(encoding) {
|
|
459
|
-
switch (String(encoding).toLowerCase()) {
|
|
460
|
-
case "hex":
|
|
461
|
-
case "utf8":
|
|
462
|
-
case "utf-8":
|
|
463
|
-
case "ascii":
|
|
464
|
-
case "latin1":
|
|
465
|
-
case "binary":
|
|
466
|
-
case "base64":
|
|
467
|
-
case "ucs2":
|
|
468
|
-
case "ucs-2":
|
|
469
|
-
case "utf16le":
|
|
470
|
-
case "utf-16le":
|
|
471
|
-
return true;
|
|
472
|
-
default:
|
|
473
|
-
return false;
|
|
474
|
-
}
|
|
475
|
-
};
|
|
476
|
-
Buffer3.concat = function concat(list, length) {
|
|
477
|
-
if (!Array.isArray(list)) {
|
|
478
|
-
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
479
|
-
}
|
|
480
|
-
if (list.length === 0) {
|
|
481
|
-
return Buffer3.alloc(0);
|
|
482
|
-
}
|
|
483
|
-
let i;
|
|
484
|
-
if (length === void 0) {
|
|
485
|
-
length = 0;
|
|
486
|
-
for (i = 0; i < list.length; ++i) {
|
|
487
|
-
length += list[i].length;
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
const buffer = Buffer3.allocUnsafe(length);
|
|
491
|
-
let pos = 0;
|
|
492
|
-
for (i = 0; i < list.length; ++i) {
|
|
493
|
-
let buf = list[i];
|
|
494
|
-
if (isInstance(buf, Uint8Array)) {
|
|
495
|
-
if (pos + buf.length > buffer.length) {
|
|
496
|
-
if (!Buffer3.isBuffer(buf))
|
|
497
|
-
buf = Buffer3.from(buf);
|
|
498
|
-
buf.copy(buffer, pos);
|
|
499
|
-
} else {
|
|
500
|
-
Uint8Array.prototype.set.call(buffer, buf, pos);
|
|
501
|
-
}
|
|
502
|
-
} else if (!Buffer3.isBuffer(buf)) {
|
|
503
|
-
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
504
|
-
} else {
|
|
505
|
-
buf.copy(buffer, pos);
|
|
506
|
-
}
|
|
507
|
-
pos += buf.length;
|
|
508
|
-
}
|
|
509
|
-
return buffer;
|
|
510
|
-
};
|
|
511
|
-
function byteLength(string, encoding) {
|
|
512
|
-
if (Buffer3.isBuffer(string)) {
|
|
513
|
-
return string.length;
|
|
514
|
-
}
|
|
515
|
-
if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
|
|
516
|
-
return string.byteLength;
|
|
517
|
-
}
|
|
518
|
-
if (typeof string !== "string") {
|
|
519
|
-
throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);
|
|
520
|
-
}
|
|
521
|
-
const len = string.length;
|
|
522
|
-
const mustMatch = arguments.length > 2 && arguments[2] === true;
|
|
523
|
-
if (!mustMatch && len === 0)
|
|
524
|
-
return 0;
|
|
525
|
-
let loweredCase = false;
|
|
526
|
-
for (; ; ) {
|
|
527
|
-
switch (encoding) {
|
|
528
|
-
case "ascii":
|
|
529
|
-
case "latin1":
|
|
530
|
-
case "binary":
|
|
531
|
-
return len;
|
|
532
|
-
case "utf8":
|
|
533
|
-
case "utf-8":
|
|
534
|
-
return utf8ToBytes(string).length;
|
|
535
|
-
case "ucs2":
|
|
536
|
-
case "ucs-2":
|
|
537
|
-
case "utf16le":
|
|
538
|
-
case "utf-16le":
|
|
539
|
-
return len * 2;
|
|
540
|
-
case "hex":
|
|
541
|
-
return len >>> 1;
|
|
542
|
-
case "base64":
|
|
543
|
-
return base64ToBytes(string).length;
|
|
544
|
-
default:
|
|
545
|
-
if (loweredCase) {
|
|
546
|
-
return mustMatch ? -1 : utf8ToBytes(string).length;
|
|
547
|
-
}
|
|
548
|
-
encoding = ("" + encoding).toLowerCase();
|
|
549
|
-
loweredCase = true;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
Buffer3.byteLength = byteLength;
|
|
554
|
-
function slowToString(encoding, start, end) {
|
|
555
|
-
let loweredCase = false;
|
|
556
|
-
if (start === void 0 || start < 0) {
|
|
557
|
-
start = 0;
|
|
558
|
-
}
|
|
559
|
-
if (start > this.length) {
|
|
560
|
-
return "";
|
|
561
|
-
}
|
|
562
|
-
if (end === void 0 || end > this.length) {
|
|
563
|
-
end = this.length;
|
|
564
|
-
}
|
|
565
|
-
if (end <= 0) {
|
|
566
|
-
return "";
|
|
567
|
-
}
|
|
568
|
-
end >>>= 0;
|
|
569
|
-
start >>>= 0;
|
|
570
|
-
if (end <= start) {
|
|
571
|
-
return "";
|
|
572
|
-
}
|
|
573
|
-
if (!encoding)
|
|
574
|
-
encoding = "utf8";
|
|
575
|
-
while (true) {
|
|
576
|
-
switch (encoding) {
|
|
577
|
-
case "hex":
|
|
578
|
-
return hexSlice(this, start, end);
|
|
579
|
-
case "utf8":
|
|
580
|
-
case "utf-8":
|
|
581
|
-
return utf8Slice(this, start, end);
|
|
582
|
-
case "ascii":
|
|
583
|
-
return asciiSlice(this, start, end);
|
|
584
|
-
case "latin1":
|
|
585
|
-
case "binary":
|
|
586
|
-
return latin1Slice(this, start, end);
|
|
587
|
-
case "base64":
|
|
588
|
-
return base64Slice(this, start, end);
|
|
589
|
-
case "ucs2":
|
|
590
|
-
case "ucs-2":
|
|
591
|
-
case "utf16le":
|
|
592
|
-
case "utf-16le":
|
|
593
|
-
return utf16leSlice(this, start, end);
|
|
594
|
-
default:
|
|
595
|
-
if (loweredCase)
|
|
596
|
-
throw new TypeError("Unknown encoding: " + encoding);
|
|
597
|
-
encoding = (encoding + "").toLowerCase();
|
|
598
|
-
loweredCase = true;
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
Buffer3.prototype._isBuffer = true;
|
|
603
|
-
function swap(b, n, m) {
|
|
604
|
-
const i = b[n];
|
|
605
|
-
b[n] = b[m];
|
|
606
|
-
b[m] = i;
|
|
607
|
-
}
|
|
608
|
-
Buffer3.prototype.swap16 = function swap16() {
|
|
609
|
-
const len = this.length;
|
|
610
|
-
if (len % 2 !== 0) {
|
|
611
|
-
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
612
|
-
}
|
|
613
|
-
for (let i = 0; i < len; i += 2) {
|
|
614
|
-
swap(this, i, i + 1);
|
|
615
|
-
}
|
|
616
|
-
return this;
|
|
617
|
-
};
|
|
618
|
-
Buffer3.prototype.swap32 = function swap32() {
|
|
619
|
-
const len = this.length;
|
|
620
|
-
if (len % 4 !== 0) {
|
|
621
|
-
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
622
|
-
}
|
|
623
|
-
for (let i = 0; i < len; i += 4) {
|
|
624
|
-
swap(this, i, i + 3);
|
|
625
|
-
swap(this, i + 1, i + 2);
|
|
626
|
-
}
|
|
627
|
-
return this;
|
|
628
|
-
};
|
|
629
|
-
Buffer3.prototype.swap64 = function swap64() {
|
|
630
|
-
const len = this.length;
|
|
631
|
-
if (len % 8 !== 0) {
|
|
632
|
-
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
633
|
-
}
|
|
634
|
-
for (let i = 0; i < len; i += 8) {
|
|
635
|
-
swap(this, i, i + 7);
|
|
636
|
-
swap(this, i + 1, i + 6);
|
|
637
|
-
swap(this, i + 2, i + 5);
|
|
638
|
-
swap(this, i + 3, i + 4);
|
|
639
|
-
}
|
|
640
|
-
return this;
|
|
641
|
-
};
|
|
642
|
-
Buffer3.prototype.toString = function toString() {
|
|
643
|
-
const length = this.length;
|
|
644
|
-
if (length === 0)
|
|
645
|
-
return "";
|
|
646
|
-
if (arguments.length === 0)
|
|
647
|
-
return utf8Slice(this, 0, length);
|
|
648
|
-
return slowToString.apply(this, arguments);
|
|
649
|
-
};
|
|
650
|
-
Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;
|
|
651
|
-
Buffer3.prototype.equals = function equals(b) {
|
|
652
|
-
if (!Buffer3.isBuffer(b))
|
|
653
|
-
throw new TypeError("Argument must be a Buffer");
|
|
654
|
-
if (this === b)
|
|
655
|
-
return true;
|
|
656
|
-
return Buffer3.compare(this, b) === 0;
|
|
657
|
-
};
|
|
658
|
-
Buffer3.prototype.inspect = function inspect() {
|
|
659
|
-
let str = "";
|
|
660
|
-
const max = exports.INSPECT_MAX_BYTES;
|
|
661
|
-
str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
|
|
662
|
-
if (this.length > max)
|
|
663
|
-
str += " ... ";
|
|
664
|
-
return "<Buffer " + str + ">";
|
|
665
|
-
};
|
|
666
|
-
if (customInspectSymbol) {
|
|
667
|
-
Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect;
|
|
668
|
-
}
|
|
669
|
-
Buffer3.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
|
|
670
|
-
if (isInstance(target, Uint8Array)) {
|
|
671
|
-
target = Buffer3.from(target, target.offset, target.byteLength);
|
|
672
|
-
}
|
|
673
|
-
if (!Buffer3.isBuffer(target)) {
|
|
674
|
-
throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);
|
|
675
|
-
}
|
|
676
|
-
if (start === void 0) {
|
|
677
|
-
start = 0;
|
|
678
|
-
}
|
|
679
|
-
if (end === void 0) {
|
|
680
|
-
end = target ? target.length : 0;
|
|
681
|
-
}
|
|
682
|
-
if (thisStart === void 0) {
|
|
683
|
-
thisStart = 0;
|
|
684
|
-
}
|
|
685
|
-
if (thisEnd === void 0) {
|
|
686
|
-
thisEnd = this.length;
|
|
687
|
-
}
|
|
688
|
-
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
|
|
689
|
-
throw new RangeError("out of range index");
|
|
690
|
-
}
|
|
691
|
-
if (thisStart >= thisEnd && start >= end) {
|
|
692
|
-
return 0;
|
|
693
|
-
}
|
|
694
|
-
if (thisStart >= thisEnd) {
|
|
695
|
-
return -1;
|
|
696
|
-
}
|
|
697
|
-
if (start >= end) {
|
|
698
|
-
return 1;
|
|
699
|
-
}
|
|
700
|
-
start >>>= 0;
|
|
701
|
-
end >>>= 0;
|
|
702
|
-
thisStart >>>= 0;
|
|
703
|
-
thisEnd >>>= 0;
|
|
704
|
-
if (this === target)
|
|
705
|
-
return 0;
|
|
706
|
-
let x = thisEnd - thisStart;
|
|
707
|
-
let y = end - start;
|
|
708
|
-
const len = Math.min(x, y);
|
|
709
|
-
const thisCopy = this.slice(thisStart, thisEnd);
|
|
710
|
-
const targetCopy = target.slice(start, end);
|
|
711
|
-
for (let i = 0; i < len; ++i) {
|
|
712
|
-
if (thisCopy[i] !== targetCopy[i]) {
|
|
713
|
-
x = thisCopy[i];
|
|
714
|
-
y = targetCopy[i];
|
|
715
|
-
break;
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
if (x < y)
|
|
719
|
-
return -1;
|
|
720
|
-
if (y < x)
|
|
721
|
-
return 1;
|
|
722
|
-
return 0;
|
|
723
|
-
};
|
|
724
|
-
function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
|
|
725
|
-
if (buffer.length === 0)
|
|
726
|
-
return -1;
|
|
727
|
-
if (typeof byteOffset === "string") {
|
|
728
|
-
encoding = byteOffset;
|
|
729
|
-
byteOffset = 0;
|
|
730
|
-
} else if (byteOffset > 2147483647) {
|
|
731
|
-
byteOffset = 2147483647;
|
|
732
|
-
} else if (byteOffset < -2147483648) {
|
|
733
|
-
byteOffset = -2147483648;
|
|
734
|
-
}
|
|
735
|
-
byteOffset = +byteOffset;
|
|
736
|
-
if (numberIsNaN(byteOffset)) {
|
|
737
|
-
byteOffset = dir ? 0 : buffer.length - 1;
|
|
738
|
-
}
|
|
739
|
-
if (byteOffset < 0)
|
|
740
|
-
byteOffset = buffer.length + byteOffset;
|
|
741
|
-
if (byteOffset >= buffer.length) {
|
|
742
|
-
if (dir)
|
|
743
|
-
return -1;
|
|
744
|
-
else
|
|
745
|
-
byteOffset = buffer.length - 1;
|
|
746
|
-
} else if (byteOffset < 0) {
|
|
747
|
-
if (dir)
|
|
748
|
-
byteOffset = 0;
|
|
749
|
-
else
|
|
750
|
-
return -1;
|
|
751
|
-
}
|
|
752
|
-
if (typeof val === "string") {
|
|
753
|
-
val = Buffer3.from(val, encoding);
|
|
754
|
-
}
|
|
755
|
-
if (Buffer3.isBuffer(val)) {
|
|
756
|
-
if (val.length === 0) {
|
|
757
|
-
return -1;
|
|
758
|
-
}
|
|
759
|
-
return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
|
|
760
|
-
} else if (typeof val === "number") {
|
|
761
|
-
val = val & 255;
|
|
762
|
-
if (typeof Uint8Array.prototype.indexOf === "function") {
|
|
763
|
-
if (dir) {
|
|
764
|
-
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
|
|
765
|
-
} else {
|
|
766
|
-
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
|
|
770
|
-
}
|
|
771
|
-
throw new TypeError("val must be string, number or Buffer");
|
|
772
|
-
}
|
|
773
|
-
function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
|
|
774
|
-
let indexSize = 1;
|
|
775
|
-
let arrLength = arr.length;
|
|
776
|
-
let valLength = val.length;
|
|
777
|
-
if (encoding !== void 0) {
|
|
778
|
-
encoding = String(encoding).toLowerCase();
|
|
779
|
-
if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") {
|
|
780
|
-
if (arr.length < 2 || val.length < 2) {
|
|
781
|
-
return -1;
|
|
782
|
-
}
|
|
783
|
-
indexSize = 2;
|
|
784
|
-
arrLength /= 2;
|
|
785
|
-
valLength /= 2;
|
|
786
|
-
byteOffset /= 2;
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
function read(buf, i2) {
|
|
790
|
-
if (indexSize === 1) {
|
|
791
|
-
return buf[i2];
|
|
792
|
-
} else {
|
|
793
|
-
return buf.readUInt16BE(i2 * indexSize);
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
let i;
|
|
797
|
-
if (dir) {
|
|
798
|
-
let foundIndex = -1;
|
|
799
|
-
for (i = byteOffset; i < arrLength; i++) {
|
|
800
|
-
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
|
|
801
|
-
if (foundIndex === -1)
|
|
802
|
-
foundIndex = i;
|
|
803
|
-
if (i - foundIndex + 1 === valLength)
|
|
804
|
-
return foundIndex * indexSize;
|
|
805
|
-
} else {
|
|
806
|
-
if (foundIndex !== -1)
|
|
807
|
-
i -= i - foundIndex;
|
|
808
|
-
foundIndex = -1;
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
} else {
|
|
812
|
-
if (byteOffset + valLength > arrLength)
|
|
813
|
-
byteOffset = arrLength - valLength;
|
|
814
|
-
for (i = byteOffset; i >= 0; i--) {
|
|
815
|
-
let found = true;
|
|
816
|
-
for (let j = 0; j < valLength; j++) {
|
|
817
|
-
if (read(arr, i + j) !== read(val, j)) {
|
|
818
|
-
found = false;
|
|
819
|
-
break;
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
if (found)
|
|
823
|
-
return i;
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
return -1;
|
|
827
|
-
}
|
|
828
|
-
Buffer3.prototype.includes = function includes(val, byteOffset, encoding) {
|
|
829
|
-
return this.indexOf(val, byteOffset, encoding) !== -1;
|
|
830
|
-
};
|
|
831
|
-
Buffer3.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
|
|
832
|
-
return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
|
|
833
|
-
};
|
|
834
|
-
Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
|
|
835
|
-
return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
|
|
836
|
-
};
|
|
837
|
-
function hexWrite(buf, string, offset, length) {
|
|
838
|
-
offset = Number(offset) || 0;
|
|
839
|
-
const remaining = buf.length - offset;
|
|
840
|
-
if (!length) {
|
|
841
|
-
length = remaining;
|
|
842
|
-
} else {
|
|
843
|
-
length = Number(length);
|
|
844
|
-
if (length > remaining) {
|
|
845
|
-
length = remaining;
|
|
846
|
-
}
|
|
847
|
-
}
|
|
848
|
-
const strLen = string.length;
|
|
849
|
-
if (length > strLen / 2) {
|
|
850
|
-
length = strLen / 2;
|
|
851
|
-
}
|
|
852
|
-
let i;
|
|
853
|
-
for (i = 0; i < length; ++i) {
|
|
854
|
-
const parsed = parseInt(string.substr(i * 2, 2), 16);
|
|
855
|
-
if (numberIsNaN(parsed))
|
|
856
|
-
return i;
|
|
857
|
-
buf[offset + i] = parsed;
|
|
858
|
-
}
|
|
859
|
-
return i;
|
|
860
|
-
}
|
|
861
|
-
function utf8Write(buf, string, offset, length) {
|
|
862
|
-
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
|
|
863
|
-
}
|
|
864
|
-
function asciiWrite(buf, string, offset, length) {
|
|
865
|
-
return blitBuffer(asciiToBytes(string), buf, offset, length);
|
|
866
|
-
}
|
|
867
|
-
function base64Write(buf, string, offset, length) {
|
|
868
|
-
return blitBuffer(base64ToBytes(string), buf, offset, length);
|
|
869
|
-
}
|
|
870
|
-
function ucs2Write(buf, string, offset, length) {
|
|
871
|
-
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
|
|
872
|
-
}
|
|
873
|
-
Buffer3.prototype.write = function write(string, offset, length, encoding) {
|
|
874
|
-
if (offset === void 0) {
|
|
875
|
-
encoding = "utf8";
|
|
876
|
-
length = this.length;
|
|
877
|
-
offset = 0;
|
|
878
|
-
} else if (length === void 0 && typeof offset === "string") {
|
|
879
|
-
encoding = offset;
|
|
880
|
-
length = this.length;
|
|
881
|
-
offset = 0;
|
|
882
|
-
} else if (isFinite(offset)) {
|
|
883
|
-
offset = offset >>> 0;
|
|
884
|
-
if (isFinite(length)) {
|
|
885
|
-
length = length >>> 0;
|
|
886
|
-
if (encoding === void 0)
|
|
887
|
-
encoding = "utf8";
|
|
888
|
-
} else {
|
|
889
|
-
encoding = length;
|
|
890
|
-
length = void 0;
|
|
891
|
-
}
|
|
892
|
-
} else {
|
|
893
|
-
throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
|
|
894
|
-
}
|
|
895
|
-
const remaining = this.length - offset;
|
|
896
|
-
if (length === void 0 || length > remaining)
|
|
897
|
-
length = remaining;
|
|
898
|
-
if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
|
|
899
|
-
throw new RangeError("Attempt to write outside buffer bounds");
|
|
900
|
-
}
|
|
901
|
-
if (!encoding)
|
|
902
|
-
encoding = "utf8";
|
|
903
|
-
let loweredCase = false;
|
|
904
|
-
for (; ; ) {
|
|
905
|
-
switch (encoding) {
|
|
906
|
-
case "hex":
|
|
907
|
-
return hexWrite(this, string, offset, length);
|
|
908
|
-
case "utf8":
|
|
909
|
-
case "utf-8":
|
|
910
|
-
return utf8Write(this, string, offset, length);
|
|
911
|
-
case "ascii":
|
|
912
|
-
case "latin1":
|
|
913
|
-
case "binary":
|
|
914
|
-
return asciiWrite(this, string, offset, length);
|
|
915
|
-
case "base64":
|
|
916
|
-
return base64Write(this, string, offset, length);
|
|
917
|
-
case "ucs2":
|
|
918
|
-
case "ucs-2":
|
|
919
|
-
case "utf16le":
|
|
920
|
-
case "utf-16le":
|
|
921
|
-
return ucs2Write(this, string, offset, length);
|
|
922
|
-
default:
|
|
923
|
-
if (loweredCase)
|
|
924
|
-
throw new TypeError("Unknown encoding: " + encoding);
|
|
925
|
-
encoding = ("" + encoding).toLowerCase();
|
|
926
|
-
loweredCase = true;
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
};
|
|
930
|
-
Buffer3.prototype.toJSON = function toJSON() {
|
|
931
|
-
return {
|
|
932
|
-
type: "Buffer",
|
|
933
|
-
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
934
|
-
};
|
|
935
|
-
};
|
|
936
|
-
function base64Slice(buf, start, end) {
|
|
937
|
-
if (start === 0 && end === buf.length) {
|
|
938
|
-
return base64.fromByteArray(buf);
|
|
939
|
-
} else {
|
|
940
|
-
return base64.fromByteArray(buf.slice(start, end));
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
function utf8Slice(buf, start, end) {
|
|
944
|
-
end = Math.min(buf.length, end);
|
|
945
|
-
const res = [];
|
|
946
|
-
let i = start;
|
|
947
|
-
while (i < end) {
|
|
948
|
-
const firstByte = buf[i];
|
|
949
|
-
let codePoint = null;
|
|
950
|
-
let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;
|
|
951
|
-
if (i + bytesPerSequence <= end) {
|
|
952
|
-
let secondByte, thirdByte, fourthByte, tempCodePoint;
|
|
953
|
-
switch (bytesPerSequence) {
|
|
954
|
-
case 1:
|
|
955
|
-
if (firstByte < 128) {
|
|
956
|
-
codePoint = firstByte;
|
|
957
|
-
}
|
|
958
|
-
break;
|
|
959
|
-
case 2:
|
|
960
|
-
secondByte = buf[i + 1];
|
|
961
|
-
if ((secondByte & 192) === 128) {
|
|
962
|
-
tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;
|
|
963
|
-
if (tempCodePoint > 127) {
|
|
964
|
-
codePoint = tempCodePoint;
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
break;
|
|
968
|
-
case 3:
|
|
969
|
-
secondByte = buf[i + 1];
|
|
970
|
-
thirdByte = buf[i + 2];
|
|
971
|
-
if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {
|
|
972
|
-
tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;
|
|
973
|
-
if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {
|
|
974
|
-
codePoint = tempCodePoint;
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
break;
|
|
978
|
-
case 4:
|
|
979
|
-
secondByte = buf[i + 1];
|
|
980
|
-
thirdByte = buf[i + 2];
|
|
981
|
-
fourthByte = buf[i + 3];
|
|
982
|
-
if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {
|
|
983
|
-
tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;
|
|
984
|
-
if (tempCodePoint > 65535 && tempCodePoint < 1114112) {
|
|
985
|
-
codePoint = tempCodePoint;
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
if (codePoint === null) {
|
|
991
|
-
codePoint = 65533;
|
|
992
|
-
bytesPerSequence = 1;
|
|
993
|
-
} else if (codePoint > 65535) {
|
|
994
|
-
codePoint -= 65536;
|
|
995
|
-
res.push(codePoint >>> 10 & 1023 | 55296);
|
|
996
|
-
codePoint = 56320 | codePoint & 1023;
|
|
997
|
-
}
|
|
998
|
-
res.push(codePoint);
|
|
999
|
-
i += bytesPerSequence;
|
|
1000
|
-
}
|
|
1001
|
-
return decodeCodePointsArray(res);
|
|
1002
|
-
}
|
|
1003
|
-
const MAX_ARGUMENTS_LENGTH = 4096;
|
|
1004
|
-
function decodeCodePointsArray(codePoints) {
|
|
1005
|
-
const len = codePoints.length;
|
|
1006
|
-
if (len <= MAX_ARGUMENTS_LENGTH) {
|
|
1007
|
-
return String.fromCharCode.apply(String, codePoints);
|
|
1008
|
-
}
|
|
1009
|
-
let res = "";
|
|
1010
|
-
let i = 0;
|
|
1011
|
-
while (i < len) {
|
|
1012
|
-
res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
|
|
1013
|
-
}
|
|
1014
|
-
return res;
|
|
1015
|
-
}
|
|
1016
|
-
function asciiSlice(buf, start, end) {
|
|
1017
|
-
let ret = "";
|
|
1018
|
-
end = Math.min(buf.length, end);
|
|
1019
|
-
for (let i = start; i < end; ++i) {
|
|
1020
|
-
ret += String.fromCharCode(buf[i] & 127);
|
|
1021
|
-
}
|
|
1022
|
-
return ret;
|
|
1023
|
-
}
|
|
1024
|
-
function latin1Slice(buf, start, end) {
|
|
1025
|
-
let ret = "";
|
|
1026
|
-
end = Math.min(buf.length, end);
|
|
1027
|
-
for (let i = start; i < end; ++i) {
|
|
1028
|
-
ret += String.fromCharCode(buf[i]);
|
|
1029
|
-
}
|
|
1030
|
-
return ret;
|
|
1031
|
-
}
|
|
1032
|
-
function hexSlice(buf, start, end) {
|
|
1033
|
-
const len = buf.length;
|
|
1034
|
-
if (!start || start < 0)
|
|
1035
|
-
start = 0;
|
|
1036
|
-
if (!end || end < 0 || end > len)
|
|
1037
|
-
end = len;
|
|
1038
|
-
let out = "";
|
|
1039
|
-
for (let i = start; i < end; ++i) {
|
|
1040
|
-
out += hexSliceLookupTable[buf[i]];
|
|
1041
|
-
}
|
|
1042
|
-
return out;
|
|
1043
|
-
}
|
|
1044
|
-
function utf16leSlice(buf, start, end) {
|
|
1045
|
-
const bytes = buf.slice(start, end);
|
|
1046
|
-
let res = "";
|
|
1047
|
-
for (let i = 0; i < bytes.length - 1; i += 2) {
|
|
1048
|
-
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
|
|
1049
|
-
}
|
|
1050
|
-
return res;
|
|
1051
|
-
}
|
|
1052
|
-
Buffer3.prototype.slice = function slice(start, end) {
|
|
1053
|
-
const len = this.length;
|
|
1054
|
-
start = ~~start;
|
|
1055
|
-
end = end === void 0 ? len : ~~end;
|
|
1056
|
-
if (start < 0) {
|
|
1057
|
-
start += len;
|
|
1058
|
-
if (start < 0)
|
|
1059
|
-
start = 0;
|
|
1060
|
-
} else if (start > len) {
|
|
1061
|
-
start = len;
|
|
1062
|
-
}
|
|
1063
|
-
if (end < 0) {
|
|
1064
|
-
end += len;
|
|
1065
|
-
if (end < 0)
|
|
1066
|
-
end = 0;
|
|
1067
|
-
} else if (end > len) {
|
|
1068
|
-
end = len;
|
|
1069
|
-
}
|
|
1070
|
-
if (end < start)
|
|
1071
|
-
end = start;
|
|
1072
|
-
const newBuf = this.subarray(start, end);
|
|
1073
|
-
Object.setPrototypeOf(newBuf, Buffer3.prototype);
|
|
1074
|
-
return newBuf;
|
|
1075
|
-
};
|
|
1076
|
-
function checkOffset(offset, ext, length) {
|
|
1077
|
-
if (offset % 1 !== 0 || offset < 0)
|
|
1078
|
-
throw new RangeError("offset is not uint");
|
|
1079
|
-
if (offset + ext > length)
|
|
1080
|
-
throw new RangeError("Trying to access beyond buffer length");
|
|
1081
|
-
}
|
|
1082
|
-
Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) {
|
|
1083
|
-
offset = offset >>> 0;
|
|
1084
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1085
|
-
if (!noAssert)
|
|
1086
|
-
checkOffset(offset, byteLength2, this.length);
|
|
1087
|
-
let val = this[offset];
|
|
1088
|
-
let mul = 1;
|
|
1089
|
-
let i = 0;
|
|
1090
|
-
while (++i < byteLength2 && (mul *= 256)) {
|
|
1091
|
-
val += this[offset + i] * mul;
|
|
1092
|
-
}
|
|
1093
|
-
return val;
|
|
1094
|
-
};
|
|
1095
|
-
Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) {
|
|
1096
|
-
offset = offset >>> 0;
|
|
1097
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1098
|
-
if (!noAssert) {
|
|
1099
|
-
checkOffset(offset, byteLength2, this.length);
|
|
1100
|
-
}
|
|
1101
|
-
let val = this[offset + --byteLength2];
|
|
1102
|
-
let mul = 1;
|
|
1103
|
-
while (byteLength2 > 0 && (mul *= 256)) {
|
|
1104
|
-
val += this[offset + --byteLength2] * mul;
|
|
1105
|
-
}
|
|
1106
|
-
return val;
|
|
1107
|
-
};
|
|
1108
|
-
Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = function readUInt8(offset, noAssert) {
|
|
1109
|
-
offset = offset >>> 0;
|
|
1110
|
-
if (!noAssert)
|
|
1111
|
-
checkOffset(offset, 1, this.length);
|
|
1112
|
-
return this[offset];
|
|
1113
|
-
};
|
|
1114
|
-
Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
|
|
1115
|
-
offset = offset >>> 0;
|
|
1116
|
-
if (!noAssert)
|
|
1117
|
-
checkOffset(offset, 2, this.length);
|
|
1118
|
-
return this[offset] | this[offset + 1] << 8;
|
|
1119
|
-
};
|
|
1120
|
-
Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
|
|
1121
|
-
offset = offset >>> 0;
|
|
1122
|
-
if (!noAssert)
|
|
1123
|
-
checkOffset(offset, 2, this.length);
|
|
1124
|
-
return this[offset] << 8 | this[offset + 1];
|
|
1125
|
-
};
|
|
1126
|
-
Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
|
|
1127
|
-
offset = offset >>> 0;
|
|
1128
|
-
if (!noAssert)
|
|
1129
|
-
checkOffset(offset, 4, this.length);
|
|
1130
|
-
return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
|
|
1131
|
-
};
|
|
1132
|
-
Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
|
|
1133
|
-
offset = offset >>> 0;
|
|
1134
|
-
if (!noAssert)
|
|
1135
|
-
checkOffset(offset, 4, this.length);
|
|
1136
|
-
return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
|
|
1137
|
-
};
|
|
1138
|
-
Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {
|
|
1139
|
-
offset = offset >>> 0;
|
|
1140
|
-
validateNumber(offset, "offset");
|
|
1141
|
-
const first = this[offset];
|
|
1142
|
-
const last = this[offset + 7];
|
|
1143
|
-
if (first === void 0 || last === void 0) {
|
|
1144
|
-
boundsError(offset, this.length - 8);
|
|
1145
|
-
}
|
|
1146
|
-
const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;
|
|
1147
|
-
const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;
|
|
1148
|
-
return BigInt(lo) + (BigInt(hi) << BigInt(32));
|
|
1149
|
-
});
|
|
1150
|
-
Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {
|
|
1151
|
-
offset = offset >>> 0;
|
|
1152
|
-
validateNumber(offset, "offset");
|
|
1153
|
-
const first = this[offset];
|
|
1154
|
-
const last = this[offset + 7];
|
|
1155
|
-
if (first === void 0 || last === void 0) {
|
|
1156
|
-
boundsError(offset, this.length - 8);
|
|
1157
|
-
}
|
|
1158
|
-
const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
|
|
1159
|
-
const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;
|
|
1160
|
-
return (BigInt(hi) << BigInt(32)) + BigInt(lo);
|
|
1161
|
-
});
|
|
1162
|
-
Buffer3.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) {
|
|
1163
|
-
offset = offset >>> 0;
|
|
1164
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1165
|
-
if (!noAssert)
|
|
1166
|
-
checkOffset(offset, byteLength2, this.length);
|
|
1167
|
-
let val = this[offset];
|
|
1168
|
-
let mul = 1;
|
|
1169
|
-
let i = 0;
|
|
1170
|
-
while (++i < byteLength2 && (mul *= 256)) {
|
|
1171
|
-
val += this[offset + i] * mul;
|
|
1172
|
-
}
|
|
1173
|
-
mul *= 128;
|
|
1174
|
-
if (val >= mul)
|
|
1175
|
-
val -= Math.pow(2, 8 * byteLength2);
|
|
1176
|
-
return val;
|
|
1177
|
-
};
|
|
1178
|
-
Buffer3.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) {
|
|
1179
|
-
offset = offset >>> 0;
|
|
1180
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1181
|
-
if (!noAssert)
|
|
1182
|
-
checkOffset(offset, byteLength2, this.length);
|
|
1183
|
-
let i = byteLength2;
|
|
1184
|
-
let mul = 1;
|
|
1185
|
-
let val = this[offset + --i];
|
|
1186
|
-
while (i > 0 && (mul *= 256)) {
|
|
1187
|
-
val += this[offset + --i] * mul;
|
|
1188
|
-
}
|
|
1189
|
-
mul *= 128;
|
|
1190
|
-
if (val >= mul)
|
|
1191
|
-
val -= Math.pow(2, 8 * byteLength2);
|
|
1192
|
-
return val;
|
|
1193
|
-
};
|
|
1194
|
-
Buffer3.prototype.readInt8 = function readInt8(offset, noAssert) {
|
|
1195
|
-
offset = offset >>> 0;
|
|
1196
|
-
if (!noAssert)
|
|
1197
|
-
checkOffset(offset, 1, this.length);
|
|
1198
|
-
if (!(this[offset] & 128))
|
|
1199
|
-
return this[offset];
|
|
1200
|
-
return (255 - this[offset] + 1) * -1;
|
|
1201
|
-
};
|
|
1202
|
-
Buffer3.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
|
|
1203
|
-
offset = offset >>> 0;
|
|
1204
|
-
if (!noAssert)
|
|
1205
|
-
checkOffset(offset, 2, this.length);
|
|
1206
|
-
const val = this[offset] | this[offset + 1] << 8;
|
|
1207
|
-
return val & 32768 ? val | 4294901760 : val;
|
|
1208
|
-
};
|
|
1209
|
-
Buffer3.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
|
|
1210
|
-
offset = offset >>> 0;
|
|
1211
|
-
if (!noAssert)
|
|
1212
|
-
checkOffset(offset, 2, this.length);
|
|
1213
|
-
const val = this[offset + 1] | this[offset] << 8;
|
|
1214
|
-
return val & 32768 ? val | 4294901760 : val;
|
|
1215
|
-
};
|
|
1216
|
-
Buffer3.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
|
|
1217
|
-
offset = offset >>> 0;
|
|
1218
|
-
if (!noAssert)
|
|
1219
|
-
checkOffset(offset, 4, this.length);
|
|
1220
|
-
return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
|
|
1221
|
-
};
|
|
1222
|
-
Buffer3.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
|
|
1223
|
-
offset = offset >>> 0;
|
|
1224
|
-
if (!noAssert)
|
|
1225
|
-
checkOffset(offset, 4, this.length);
|
|
1226
|
-
return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
|
|
1227
|
-
};
|
|
1228
|
-
Buffer3.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {
|
|
1229
|
-
offset = offset >>> 0;
|
|
1230
|
-
validateNumber(offset, "offset");
|
|
1231
|
-
const first = this[offset];
|
|
1232
|
-
const last = this[offset + 7];
|
|
1233
|
-
if (first === void 0 || last === void 0) {
|
|
1234
|
-
boundsError(offset, this.length - 8);
|
|
1235
|
-
}
|
|
1236
|
-
const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);
|
|
1237
|
-
return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);
|
|
1238
|
-
});
|
|
1239
|
-
Buffer3.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {
|
|
1240
|
-
offset = offset >>> 0;
|
|
1241
|
-
validateNumber(offset, "offset");
|
|
1242
|
-
const first = this[offset];
|
|
1243
|
-
const last = this[offset + 7];
|
|
1244
|
-
if (first === void 0 || last === void 0) {
|
|
1245
|
-
boundsError(offset, this.length - 8);
|
|
1246
|
-
}
|
|
1247
|
-
const val = (first << 24) + // Overflow
|
|
1248
|
-
this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
|
|
1249
|
-
return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);
|
|
1250
|
-
});
|
|
1251
|
-
Buffer3.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
|
|
1252
|
-
offset = offset >>> 0;
|
|
1253
|
-
if (!noAssert)
|
|
1254
|
-
checkOffset(offset, 4, this.length);
|
|
1255
|
-
return ieee754.read(this, offset, true, 23, 4);
|
|
1256
|
-
};
|
|
1257
|
-
Buffer3.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
|
|
1258
|
-
offset = offset >>> 0;
|
|
1259
|
-
if (!noAssert)
|
|
1260
|
-
checkOffset(offset, 4, this.length);
|
|
1261
|
-
return ieee754.read(this, offset, false, 23, 4);
|
|
1262
|
-
};
|
|
1263
|
-
Buffer3.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
|
|
1264
|
-
offset = offset >>> 0;
|
|
1265
|
-
if (!noAssert)
|
|
1266
|
-
checkOffset(offset, 8, this.length);
|
|
1267
|
-
return ieee754.read(this, offset, true, 52, 8);
|
|
1268
|
-
};
|
|
1269
|
-
Buffer3.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
|
|
1270
|
-
offset = offset >>> 0;
|
|
1271
|
-
if (!noAssert)
|
|
1272
|
-
checkOffset(offset, 8, this.length);
|
|
1273
|
-
return ieee754.read(this, offset, false, 52, 8);
|
|
1274
|
-
};
|
|
1275
|
-
function checkInt(buf, value, offset, ext, max, min) {
|
|
1276
|
-
if (!Buffer3.isBuffer(buf))
|
|
1277
|
-
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
1278
|
-
if (value > max || value < min)
|
|
1279
|
-
throw new RangeError('"value" argument is out of bounds');
|
|
1280
|
-
if (offset + ext > buf.length)
|
|
1281
|
-
throw new RangeError("Index out of range");
|
|
1282
|
-
}
|
|
1283
|
-
Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) {
|
|
1284
|
-
value = +value;
|
|
1285
|
-
offset = offset >>> 0;
|
|
1286
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1287
|
-
if (!noAssert) {
|
|
1288
|
-
const maxBytes = Math.pow(2, 8 * byteLength2) - 1;
|
|
1289
|
-
checkInt(this, value, offset, byteLength2, maxBytes, 0);
|
|
1290
|
-
}
|
|
1291
|
-
let mul = 1;
|
|
1292
|
-
let i = 0;
|
|
1293
|
-
this[offset] = value & 255;
|
|
1294
|
-
while (++i < byteLength2 && (mul *= 256)) {
|
|
1295
|
-
this[offset + i] = value / mul & 255;
|
|
1296
|
-
}
|
|
1297
|
-
return offset + byteLength2;
|
|
1298
|
-
};
|
|
1299
|
-
Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) {
|
|
1300
|
-
value = +value;
|
|
1301
|
-
offset = offset >>> 0;
|
|
1302
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1303
|
-
if (!noAssert) {
|
|
1304
|
-
const maxBytes = Math.pow(2, 8 * byteLength2) - 1;
|
|
1305
|
-
checkInt(this, value, offset, byteLength2, maxBytes, 0);
|
|
1306
|
-
}
|
|
1307
|
-
let i = byteLength2 - 1;
|
|
1308
|
-
let mul = 1;
|
|
1309
|
-
this[offset + i] = value & 255;
|
|
1310
|
-
while (--i >= 0 && (mul *= 256)) {
|
|
1311
|
-
this[offset + i] = value / mul & 255;
|
|
1312
|
-
}
|
|
1313
|
-
return offset + byteLength2;
|
|
1314
|
-
};
|
|
1315
|
-
Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
|
|
1316
|
-
value = +value;
|
|
1317
|
-
offset = offset >>> 0;
|
|
1318
|
-
if (!noAssert)
|
|
1319
|
-
checkInt(this, value, offset, 1, 255, 0);
|
|
1320
|
-
this[offset] = value & 255;
|
|
1321
|
-
return offset + 1;
|
|
1322
|
-
};
|
|
1323
|
-
Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
|
|
1324
|
-
value = +value;
|
|
1325
|
-
offset = offset >>> 0;
|
|
1326
|
-
if (!noAssert)
|
|
1327
|
-
checkInt(this, value, offset, 2, 65535, 0);
|
|
1328
|
-
this[offset] = value & 255;
|
|
1329
|
-
this[offset + 1] = value >>> 8;
|
|
1330
|
-
return offset + 2;
|
|
1331
|
-
};
|
|
1332
|
-
Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
|
|
1333
|
-
value = +value;
|
|
1334
|
-
offset = offset >>> 0;
|
|
1335
|
-
if (!noAssert)
|
|
1336
|
-
checkInt(this, value, offset, 2, 65535, 0);
|
|
1337
|
-
this[offset] = value >>> 8;
|
|
1338
|
-
this[offset + 1] = value & 255;
|
|
1339
|
-
return offset + 2;
|
|
1340
|
-
};
|
|
1341
|
-
Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
|
|
1342
|
-
value = +value;
|
|
1343
|
-
offset = offset >>> 0;
|
|
1344
|
-
if (!noAssert)
|
|
1345
|
-
checkInt(this, value, offset, 4, 4294967295, 0);
|
|
1346
|
-
this[offset + 3] = value >>> 24;
|
|
1347
|
-
this[offset + 2] = value >>> 16;
|
|
1348
|
-
this[offset + 1] = value >>> 8;
|
|
1349
|
-
this[offset] = value & 255;
|
|
1350
|
-
return offset + 4;
|
|
1351
|
-
};
|
|
1352
|
-
Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
|
|
1353
|
-
value = +value;
|
|
1354
|
-
offset = offset >>> 0;
|
|
1355
|
-
if (!noAssert)
|
|
1356
|
-
checkInt(this, value, offset, 4, 4294967295, 0);
|
|
1357
|
-
this[offset] = value >>> 24;
|
|
1358
|
-
this[offset + 1] = value >>> 16;
|
|
1359
|
-
this[offset + 2] = value >>> 8;
|
|
1360
|
-
this[offset + 3] = value & 255;
|
|
1361
|
-
return offset + 4;
|
|
1362
|
-
};
|
|
1363
|
-
function wrtBigUInt64LE(buf, value, offset, min, max) {
|
|
1364
|
-
checkIntBI(value, min, max, buf, offset, 7);
|
|
1365
|
-
let lo = Number(value & BigInt(4294967295));
|
|
1366
|
-
buf[offset++] = lo;
|
|
1367
|
-
lo = lo >> 8;
|
|
1368
|
-
buf[offset++] = lo;
|
|
1369
|
-
lo = lo >> 8;
|
|
1370
|
-
buf[offset++] = lo;
|
|
1371
|
-
lo = lo >> 8;
|
|
1372
|
-
buf[offset++] = lo;
|
|
1373
|
-
let hi = Number(value >> BigInt(32) & BigInt(4294967295));
|
|
1374
|
-
buf[offset++] = hi;
|
|
1375
|
-
hi = hi >> 8;
|
|
1376
|
-
buf[offset++] = hi;
|
|
1377
|
-
hi = hi >> 8;
|
|
1378
|
-
buf[offset++] = hi;
|
|
1379
|
-
hi = hi >> 8;
|
|
1380
|
-
buf[offset++] = hi;
|
|
1381
|
-
return offset;
|
|
1382
|
-
}
|
|
1383
|
-
function wrtBigUInt64BE(buf, value, offset, min, max) {
|
|
1384
|
-
checkIntBI(value, min, max, buf, offset, 7);
|
|
1385
|
-
let lo = Number(value & BigInt(4294967295));
|
|
1386
|
-
buf[offset + 7] = lo;
|
|
1387
|
-
lo = lo >> 8;
|
|
1388
|
-
buf[offset + 6] = lo;
|
|
1389
|
-
lo = lo >> 8;
|
|
1390
|
-
buf[offset + 5] = lo;
|
|
1391
|
-
lo = lo >> 8;
|
|
1392
|
-
buf[offset + 4] = lo;
|
|
1393
|
-
let hi = Number(value >> BigInt(32) & BigInt(4294967295));
|
|
1394
|
-
buf[offset + 3] = hi;
|
|
1395
|
-
hi = hi >> 8;
|
|
1396
|
-
buf[offset + 2] = hi;
|
|
1397
|
-
hi = hi >> 8;
|
|
1398
|
-
buf[offset + 1] = hi;
|
|
1399
|
-
hi = hi >> 8;
|
|
1400
|
-
buf[offset] = hi;
|
|
1401
|
-
return offset + 8;
|
|
1402
|
-
}
|
|
1403
|
-
Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {
|
|
1404
|
-
return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1405
|
-
});
|
|
1406
|
-
Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {
|
|
1407
|
-
return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1408
|
-
});
|
|
1409
|
-
Buffer3.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) {
|
|
1410
|
-
value = +value;
|
|
1411
|
-
offset = offset >>> 0;
|
|
1412
|
-
if (!noAssert) {
|
|
1413
|
-
const limit = Math.pow(2, 8 * byteLength2 - 1);
|
|
1414
|
-
checkInt(this, value, offset, byteLength2, limit - 1, -limit);
|
|
1415
|
-
}
|
|
1416
|
-
let i = 0;
|
|
1417
|
-
let mul = 1;
|
|
1418
|
-
let sub = 0;
|
|
1419
|
-
this[offset] = value & 255;
|
|
1420
|
-
while (++i < byteLength2 && (mul *= 256)) {
|
|
1421
|
-
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
|
|
1422
|
-
sub = 1;
|
|
1423
|
-
}
|
|
1424
|
-
this[offset + i] = (value / mul >> 0) - sub & 255;
|
|
1425
|
-
}
|
|
1426
|
-
return offset + byteLength2;
|
|
1427
|
-
};
|
|
1428
|
-
Buffer3.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) {
|
|
1429
|
-
value = +value;
|
|
1430
|
-
offset = offset >>> 0;
|
|
1431
|
-
if (!noAssert) {
|
|
1432
|
-
const limit = Math.pow(2, 8 * byteLength2 - 1);
|
|
1433
|
-
checkInt(this, value, offset, byteLength2, limit - 1, -limit);
|
|
1434
|
-
}
|
|
1435
|
-
let i = byteLength2 - 1;
|
|
1436
|
-
let mul = 1;
|
|
1437
|
-
let sub = 0;
|
|
1438
|
-
this[offset + i] = value & 255;
|
|
1439
|
-
while (--i >= 0 && (mul *= 256)) {
|
|
1440
|
-
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
|
|
1441
|
-
sub = 1;
|
|
1442
|
-
}
|
|
1443
|
-
this[offset + i] = (value / mul >> 0) - sub & 255;
|
|
1444
|
-
}
|
|
1445
|
-
return offset + byteLength2;
|
|
1446
|
-
};
|
|
1447
|
-
Buffer3.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
|
|
1448
|
-
value = +value;
|
|
1449
|
-
offset = offset >>> 0;
|
|
1450
|
-
if (!noAssert)
|
|
1451
|
-
checkInt(this, value, offset, 1, 127, -128);
|
|
1452
|
-
if (value < 0)
|
|
1453
|
-
value = 255 + value + 1;
|
|
1454
|
-
this[offset] = value & 255;
|
|
1455
|
-
return offset + 1;
|
|
1456
|
-
};
|
|
1457
|
-
Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
|
|
1458
|
-
value = +value;
|
|
1459
|
-
offset = offset >>> 0;
|
|
1460
|
-
if (!noAssert)
|
|
1461
|
-
checkInt(this, value, offset, 2, 32767, -32768);
|
|
1462
|
-
this[offset] = value & 255;
|
|
1463
|
-
this[offset + 1] = value >>> 8;
|
|
1464
|
-
return offset + 2;
|
|
1465
|
-
};
|
|
1466
|
-
Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
|
|
1467
|
-
value = +value;
|
|
1468
|
-
offset = offset >>> 0;
|
|
1469
|
-
if (!noAssert)
|
|
1470
|
-
checkInt(this, value, offset, 2, 32767, -32768);
|
|
1471
|
-
this[offset] = value >>> 8;
|
|
1472
|
-
this[offset + 1] = value & 255;
|
|
1473
|
-
return offset + 2;
|
|
1474
|
-
};
|
|
1475
|
-
Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
|
|
1476
|
-
value = +value;
|
|
1477
|
-
offset = offset >>> 0;
|
|
1478
|
-
if (!noAssert)
|
|
1479
|
-
checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
1480
|
-
this[offset] = value & 255;
|
|
1481
|
-
this[offset + 1] = value >>> 8;
|
|
1482
|
-
this[offset + 2] = value >>> 16;
|
|
1483
|
-
this[offset + 3] = value >>> 24;
|
|
1484
|
-
return offset + 4;
|
|
1485
|
-
};
|
|
1486
|
-
Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
|
|
1487
|
-
value = +value;
|
|
1488
|
-
offset = offset >>> 0;
|
|
1489
|
-
if (!noAssert)
|
|
1490
|
-
checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
1491
|
-
if (value < 0)
|
|
1492
|
-
value = 4294967295 + value + 1;
|
|
1493
|
-
this[offset] = value >>> 24;
|
|
1494
|
-
this[offset + 1] = value >>> 16;
|
|
1495
|
-
this[offset + 2] = value >>> 8;
|
|
1496
|
-
this[offset + 3] = value & 255;
|
|
1497
|
-
return offset + 4;
|
|
1498
|
-
};
|
|
1499
|
-
Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {
|
|
1500
|
-
return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1501
|
-
});
|
|
1502
|
-
Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {
|
|
1503
|
-
return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1504
|
-
});
|
|
1505
|
-
function checkIEEE754(buf, value, offset, ext, max, min) {
|
|
1506
|
-
if (offset + ext > buf.length)
|
|
1507
|
-
throw new RangeError("Index out of range");
|
|
1508
|
-
if (offset < 0)
|
|
1509
|
-
throw new RangeError("Index out of range");
|
|
1510
|
-
}
|
|
1511
|
-
function writeFloat(buf, value, offset, littleEndian, noAssert) {
|
|
1512
|
-
value = +value;
|
|
1513
|
-
offset = offset >>> 0;
|
|
1514
|
-
if (!noAssert) {
|
|
1515
|
-
checkIEEE754(buf, value, offset, 4);
|
|
1516
|
-
}
|
|
1517
|
-
ieee754.write(buf, value, offset, littleEndian, 23, 4);
|
|
1518
|
-
return offset + 4;
|
|
1519
|
-
}
|
|
1520
|
-
Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
|
|
1521
|
-
return writeFloat(this, value, offset, true, noAssert);
|
|
1522
|
-
};
|
|
1523
|
-
Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
|
|
1524
|
-
return writeFloat(this, value, offset, false, noAssert);
|
|
1525
|
-
};
|
|
1526
|
-
function writeDouble(buf, value, offset, littleEndian, noAssert) {
|
|
1527
|
-
value = +value;
|
|
1528
|
-
offset = offset >>> 0;
|
|
1529
|
-
if (!noAssert) {
|
|
1530
|
-
checkIEEE754(buf, value, offset, 8);
|
|
1531
|
-
}
|
|
1532
|
-
ieee754.write(buf, value, offset, littleEndian, 52, 8);
|
|
1533
|
-
return offset + 8;
|
|
1534
|
-
}
|
|
1535
|
-
Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
|
|
1536
|
-
return writeDouble(this, value, offset, true, noAssert);
|
|
1537
|
-
};
|
|
1538
|
-
Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
|
|
1539
|
-
return writeDouble(this, value, offset, false, noAssert);
|
|
1540
|
-
};
|
|
1541
|
-
Buffer3.prototype.copy = function copy(target, targetStart, start, end) {
|
|
1542
|
-
if (!Buffer3.isBuffer(target))
|
|
1543
|
-
throw new TypeError("argument should be a Buffer");
|
|
1544
|
-
if (!start)
|
|
1545
|
-
start = 0;
|
|
1546
|
-
if (!end && end !== 0)
|
|
1547
|
-
end = this.length;
|
|
1548
|
-
if (targetStart >= target.length)
|
|
1549
|
-
targetStart = target.length;
|
|
1550
|
-
if (!targetStart)
|
|
1551
|
-
targetStart = 0;
|
|
1552
|
-
if (end > 0 && end < start)
|
|
1553
|
-
end = start;
|
|
1554
|
-
if (end === start)
|
|
1555
|
-
return 0;
|
|
1556
|
-
if (target.length === 0 || this.length === 0)
|
|
1557
|
-
return 0;
|
|
1558
|
-
if (targetStart < 0) {
|
|
1559
|
-
throw new RangeError("targetStart out of bounds");
|
|
1560
|
-
}
|
|
1561
|
-
if (start < 0 || start >= this.length)
|
|
1562
|
-
throw new RangeError("Index out of range");
|
|
1563
|
-
if (end < 0)
|
|
1564
|
-
throw new RangeError("sourceEnd out of bounds");
|
|
1565
|
-
if (end > this.length)
|
|
1566
|
-
end = this.length;
|
|
1567
|
-
if (target.length - targetStart < end - start) {
|
|
1568
|
-
end = target.length - targetStart + start;
|
|
1569
|
-
}
|
|
1570
|
-
const len = end - start;
|
|
1571
|
-
if (this === target && typeof Uint8Array.prototype.copyWithin === "function") {
|
|
1572
|
-
this.copyWithin(targetStart, start, end);
|
|
1573
|
-
} else {
|
|
1574
|
-
Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);
|
|
1575
|
-
}
|
|
1576
|
-
return len;
|
|
1577
|
-
};
|
|
1578
|
-
Buffer3.prototype.fill = function fill(val, start, end, encoding) {
|
|
1579
|
-
if (typeof val === "string") {
|
|
1580
|
-
if (typeof start === "string") {
|
|
1581
|
-
encoding = start;
|
|
1582
|
-
start = 0;
|
|
1583
|
-
end = this.length;
|
|
1584
|
-
} else if (typeof end === "string") {
|
|
1585
|
-
encoding = end;
|
|
1586
|
-
end = this.length;
|
|
1587
|
-
}
|
|
1588
|
-
if (encoding !== void 0 && typeof encoding !== "string") {
|
|
1589
|
-
throw new TypeError("encoding must be a string");
|
|
1590
|
-
}
|
|
1591
|
-
if (typeof encoding === "string" && !Buffer3.isEncoding(encoding)) {
|
|
1592
|
-
throw new TypeError("Unknown encoding: " + encoding);
|
|
1593
|
-
}
|
|
1594
|
-
if (val.length === 1) {
|
|
1595
|
-
const code = val.charCodeAt(0);
|
|
1596
|
-
if (encoding === "utf8" && code < 128 || encoding === "latin1") {
|
|
1597
|
-
val = code;
|
|
1598
|
-
}
|
|
1599
|
-
}
|
|
1600
|
-
} else if (typeof val === "number") {
|
|
1601
|
-
val = val & 255;
|
|
1602
|
-
} else if (typeof val === "boolean") {
|
|
1603
|
-
val = Number(val);
|
|
1604
|
-
}
|
|
1605
|
-
if (start < 0 || this.length < start || this.length < end) {
|
|
1606
|
-
throw new RangeError("Out of range index");
|
|
1607
|
-
}
|
|
1608
|
-
if (end <= start) {
|
|
1609
|
-
return this;
|
|
1610
|
-
}
|
|
1611
|
-
start = start >>> 0;
|
|
1612
|
-
end = end === void 0 ? this.length : end >>> 0;
|
|
1613
|
-
if (!val)
|
|
1614
|
-
val = 0;
|
|
1615
|
-
let i;
|
|
1616
|
-
if (typeof val === "number") {
|
|
1617
|
-
for (i = start; i < end; ++i) {
|
|
1618
|
-
this[i] = val;
|
|
1619
|
-
}
|
|
1620
|
-
} else {
|
|
1621
|
-
const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);
|
|
1622
|
-
const len = bytes.length;
|
|
1623
|
-
if (len === 0) {
|
|
1624
|
-
throw new TypeError('The value "' + val + '" is invalid for argument "value"');
|
|
1625
|
-
}
|
|
1626
|
-
for (i = 0; i < end - start; ++i) {
|
|
1627
|
-
this[i + start] = bytes[i % len];
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
return this;
|
|
1631
|
-
};
|
|
1632
|
-
const errors = {};
|
|
1633
|
-
function E(sym, getMessage, Base) {
|
|
1634
|
-
errors[sym] = class NodeError extends Base {
|
|
1635
|
-
constructor() {
|
|
1636
|
-
super();
|
|
1637
|
-
Object.defineProperty(this, "message", {
|
|
1638
|
-
value: getMessage.apply(this, arguments),
|
|
1639
|
-
writable: true,
|
|
1640
|
-
configurable: true
|
|
1641
|
-
});
|
|
1642
|
-
this.name = `${this.name} [${sym}]`;
|
|
1643
|
-
this.stack;
|
|
1644
|
-
delete this.name;
|
|
1645
|
-
}
|
|
1646
|
-
get code() {
|
|
1647
|
-
return sym;
|
|
1648
|
-
}
|
|
1649
|
-
set code(value) {
|
|
1650
|
-
Object.defineProperty(this, "code", {
|
|
1651
|
-
configurable: true,
|
|
1652
|
-
enumerable: true,
|
|
1653
|
-
value,
|
|
1654
|
-
writable: true
|
|
1655
|
-
});
|
|
1656
|
-
}
|
|
1657
|
-
toString() {
|
|
1658
|
-
return `${this.name} [${sym}]: ${this.message}`;
|
|
1659
|
-
}
|
|
1660
|
-
};
|
|
1661
|
-
}
|
|
1662
|
-
E("ERR_BUFFER_OUT_OF_BOUNDS", function(name) {
|
|
1663
|
-
if (name) {
|
|
1664
|
-
return `${name} is outside of buffer bounds`;
|
|
1665
|
-
}
|
|
1666
|
-
return "Attempt to access memory outside buffer bounds";
|
|
1667
|
-
}, RangeError);
|
|
1668
|
-
E("ERR_INVALID_ARG_TYPE", function(name, actual) {
|
|
1669
|
-
return `The "${name}" argument must be of type number. Received type ${typeof actual}`;
|
|
1670
|
-
}, TypeError);
|
|
1671
|
-
E("ERR_OUT_OF_RANGE", function(str, range, input) {
|
|
1672
|
-
let msg = `The value of "${str}" is out of range.`;
|
|
1673
|
-
let received = input;
|
|
1674
|
-
if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
|
|
1675
|
-
received = addNumericalSeparator(String(input));
|
|
1676
|
-
} else if (typeof input === "bigint") {
|
|
1677
|
-
received = String(input);
|
|
1678
|
-
if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {
|
|
1679
|
-
received = addNumericalSeparator(received);
|
|
1680
|
-
}
|
|
1681
|
-
received += "n";
|
|
1682
|
-
}
|
|
1683
|
-
msg += ` It must be ${range}. Received ${received}`;
|
|
1684
|
-
return msg;
|
|
1685
|
-
}, RangeError);
|
|
1686
|
-
function addNumericalSeparator(val) {
|
|
1687
|
-
let res = "";
|
|
1688
|
-
let i = val.length;
|
|
1689
|
-
const start = val[0] === "-" ? 1 : 0;
|
|
1690
|
-
for (; i >= start + 4; i -= 3) {
|
|
1691
|
-
res = `_${val.slice(i - 3, i)}${res}`;
|
|
1692
|
-
}
|
|
1693
|
-
return `${val.slice(0, i)}${res}`;
|
|
1694
|
-
}
|
|
1695
|
-
function checkBounds(buf, offset, byteLength2) {
|
|
1696
|
-
validateNumber(offset, "offset");
|
|
1697
|
-
if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) {
|
|
1698
|
-
boundsError(offset, buf.length - (byteLength2 + 1));
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
function checkIntBI(value, min, max, buf, offset, byteLength2) {
|
|
1702
|
-
if (value > max || value < min) {
|
|
1703
|
-
const n = typeof min === "bigint" ? "n" : "";
|
|
1704
|
-
let range;
|
|
1705
|
-
{
|
|
1706
|
-
if (min === 0 || min === BigInt(0)) {
|
|
1707
|
-
range = `>= 0${n} and < 2${n} ** ${(byteLength2 + 1) * 8}${n}`;
|
|
1708
|
-
} else {
|
|
1709
|
-
range = `>= -(2${n} ** ${(byteLength2 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n}`;
|
|
1710
|
-
}
|
|
1711
|
-
}
|
|
1712
|
-
throw new errors.ERR_OUT_OF_RANGE("value", range, value);
|
|
1713
|
-
}
|
|
1714
|
-
checkBounds(buf, offset, byteLength2);
|
|
1715
|
-
}
|
|
1716
|
-
function validateNumber(value, name) {
|
|
1717
|
-
if (typeof value !== "number") {
|
|
1718
|
-
throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value);
|
|
1719
|
-
}
|
|
1720
|
-
}
|
|
1721
|
-
function boundsError(value, length, type) {
|
|
1722
|
-
if (Math.floor(value) !== value) {
|
|
1723
|
-
validateNumber(value, type);
|
|
1724
|
-
throw new errors.ERR_OUT_OF_RANGE("offset", "an integer", value);
|
|
1725
|
-
}
|
|
1726
|
-
if (length < 0) {
|
|
1727
|
-
throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
|
|
1728
|
-
}
|
|
1729
|
-
throw new errors.ERR_OUT_OF_RANGE("offset", `>= ${0} and <= ${length}`, value);
|
|
1730
|
-
}
|
|
1731
|
-
const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
|
|
1732
|
-
function base64clean(str) {
|
|
1733
|
-
str = str.split("=")[0];
|
|
1734
|
-
str = str.trim().replace(INVALID_BASE64_RE, "");
|
|
1735
|
-
if (str.length < 2)
|
|
1736
|
-
return "";
|
|
1737
|
-
while (str.length % 4 !== 0) {
|
|
1738
|
-
str = str + "=";
|
|
1739
|
-
}
|
|
1740
|
-
return str;
|
|
1741
|
-
}
|
|
1742
|
-
function utf8ToBytes(string, units) {
|
|
1743
|
-
units = units || Infinity;
|
|
1744
|
-
let codePoint;
|
|
1745
|
-
const length = string.length;
|
|
1746
|
-
let leadSurrogate = null;
|
|
1747
|
-
const bytes = [];
|
|
1748
|
-
for (let i = 0; i < length; ++i) {
|
|
1749
|
-
codePoint = string.charCodeAt(i);
|
|
1750
|
-
if (codePoint > 55295 && codePoint < 57344) {
|
|
1751
|
-
if (!leadSurrogate) {
|
|
1752
|
-
if (codePoint > 56319) {
|
|
1753
|
-
if ((units -= 3) > -1)
|
|
1754
|
-
bytes.push(239, 191, 189);
|
|
1755
|
-
continue;
|
|
1756
|
-
} else if (i + 1 === length) {
|
|
1757
|
-
if ((units -= 3) > -1)
|
|
1758
|
-
bytes.push(239, 191, 189);
|
|
1759
|
-
continue;
|
|
1760
|
-
}
|
|
1761
|
-
leadSurrogate = codePoint;
|
|
1762
|
-
continue;
|
|
1763
|
-
}
|
|
1764
|
-
if (codePoint < 56320) {
|
|
1765
|
-
if ((units -= 3) > -1)
|
|
1766
|
-
bytes.push(239, 191, 189);
|
|
1767
|
-
leadSurrogate = codePoint;
|
|
1768
|
-
continue;
|
|
1769
|
-
}
|
|
1770
|
-
codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
|
|
1771
|
-
} else if (leadSurrogate) {
|
|
1772
|
-
if ((units -= 3) > -1)
|
|
1773
|
-
bytes.push(239, 191, 189);
|
|
1774
|
-
}
|
|
1775
|
-
leadSurrogate = null;
|
|
1776
|
-
if (codePoint < 128) {
|
|
1777
|
-
if ((units -= 1) < 0)
|
|
1778
|
-
break;
|
|
1779
|
-
bytes.push(codePoint);
|
|
1780
|
-
} else if (codePoint < 2048) {
|
|
1781
|
-
if ((units -= 2) < 0)
|
|
1782
|
-
break;
|
|
1783
|
-
bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);
|
|
1784
|
-
} else if (codePoint < 65536) {
|
|
1785
|
-
if ((units -= 3) < 0)
|
|
1786
|
-
break;
|
|
1787
|
-
bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
|
|
1788
|
-
} else if (codePoint < 1114112) {
|
|
1789
|
-
if ((units -= 4) < 0)
|
|
1790
|
-
break;
|
|
1791
|
-
bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
|
|
1792
|
-
} else {
|
|
1793
|
-
throw new Error("Invalid code point");
|
|
1794
|
-
}
|
|
1795
|
-
}
|
|
1796
|
-
return bytes;
|
|
1797
|
-
}
|
|
1798
|
-
function asciiToBytes(str) {
|
|
1799
|
-
const byteArray = [];
|
|
1800
|
-
for (let i = 0; i < str.length; ++i) {
|
|
1801
|
-
byteArray.push(str.charCodeAt(i) & 255);
|
|
1802
|
-
}
|
|
1803
|
-
return byteArray;
|
|
1804
|
-
}
|
|
1805
|
-
function utf16leToBytes(str, units) {
|
|
1806
|
-
let c, hi, lo;
|
|
1807
|
-
const byteArray = [];
|
|
1808
|
-
for (let i = 0; i < str.length; ++i) {
|
|
1809
|
-
if ((units -= 2) < 0)
|
|
1810
|
-
break;
|
|
1811
|
-
c = str.charCodeAt(i);
|
|
1812
|
-
hi = c >> 8;
|
|
1813
|
-
lo = c % 256;
|
|
1814
|
-
byteArray.push(lo);
|
|
1815
|
-
byteArray.push(hi);
|
|
1816
|
-
}
|
|
1817
|
-
return byteArray;
|
|
1818
|
-
}
|
|
1819
|
-
function base64ToBytes(str) {
|
|
1820
|
-
return base64.toByteArray(base64clean(str));
|
|
1821
|
-
}
|
|
1822
|
-
function blitBuffer(src, dst, offset, length) {
|
|
1823
|
-
let i;
|
|
1824
|
-
for (i = 0; i < length; ++i) {
|
|
1825
|
-
if (i + offset >= dst.length || i >= src.length)
|
|
1826
|
-
break;
|
|
1827
|
-
dst[i + offset] = src[i];
|
|
1828
|
-
}
|
|
1829
|
-
return i;
|
|
1830
|
-
}
|
|
1831
|
-
function isInstance(obj, type) {
|
|
1832
|
-
return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
|
|
1833
|
-
}
|
|
1834
|
-
function numberIsNaN(obj) {
|
|
1835
|
-
return obj !== obj;
|
|
1836
|
-
}
|
|
1837
|
-
const hexSliceLookupTable = function() {
|
|
1838
|
-
const alphabet = "0123456789abcdef";
|
|
1839
|
-
const table = new Array(256);
|
|
1840
|
-
for (let i = 0; i < 16; ++i) {
|
|
1841
|
-
const i16 = i * 16;
|
|
1842
|
-
for (let j = 0; j < 16; ++j) {
|
|
1843
|
-
table[i16 + j] = alphabet[i] + alphabet[j];
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
return table;
|
|
1847
|
-
}();
|
|
1848
|
-
function defineBigIntMethod(fn) {
|
|
1849
|
-
return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn;
|
|
1850
|
-
}
|
|
1851
|
-
function BufferBigIntNotDefined() {
|
|
1852
|
-
throw new Error("BigInt not supported");
|
|
1853
|
-
}
|
|
1854
|
-
return exports;
|
|
1855
|
-
}
|
|
1856
|
-
var exports$2, _dewExec$2, exports$1, _dewExec$1, exports, _dewExec;
|
|
1857
|
-
var init_chunk_DtuTasat = __esm({
|
|
1858
|
-
"node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js"() {
|
|
1859
|
-
init_dirname();
|
|
1860
|
-
init_buffer2();
|
|
1861
|
-
init_process2();
|
|
1862
|
-
exports$2 = {};
|
|
1863
|
-
_dewExec$2 = false;
|
|
1864
|
-
exports$1 = {};
|
|
1865
|
-
_dewExec$1 = false;
|
|
1866
|
-
exports = {};
|
|
1867
|
-
_dewExec = false;
|
|
1868
|
-
}
|
|
1869
|
-
});
|
|
1870
|
-
|
|
1871
|
-
// node_modules/@jspm/core/nodelibs/browser/buffer.js
|
|
1872
|
-
var exports2, Buffer2, INSPECT_MAX_BYTES, kMaxLength;
|
|
1873
|
-
var init_buffer = __esm({
|
|
1874
|
-
"node_modules/@jspm/core/nodelibs/browser/buffer.js"() {
|
|
1875
|
-
init_dirname();
|
|
1876
|
-
init_buffer2();
|
|
1877
|
-
init_process2();
|
|
1878
|
-
init_chunk_DtuTasat();
|
|
1879
|
-
exports2 = dew();
|
|
1880
|
-
exports2["Buffer"];
|
|
1881
|
-
exports2["SlowBuffer"];
|
|
1882
|
-
exports2["INSPECT_MAX_BYTES"];
|
|
1883
|
-
exports2["kMaxLength"];
|
|
1884
|
-
Buffer2 = exports2.Buffer;
|
|
1885
|
-
INSPECT_MAX_BYTES = exports2.INSPECT_MAX_BYTES;
|
|
1886
|
-
kMaxLength = exports2.kMaxLength;
|
|
1887
|
-
}
|
|
1888
|
-
});
|
|
1889
|
-
|
|
1890
|
-
// node_modules/esbuild-plugin-polyfill-node/polyfills/buffer.js
|
|
1891
|
-
var init_buffer2 = __esm({
|
|
1892
|
-
"node_modules/esbuild-plugin-polyfill-node/polyfills/buffer.js"() {
|
|
1893
|
-
init_buffer();
|
|
1894
|
-
}
|
|
1895
|
-
});
|
|
1896
|
-
|
|
1897
|
-
// node_modules/@jspm/core/nodelibs/browser/process.js
|
|
1898
|
-
var process_exports = {};
|
|
1899
|
-
__export(process_exports, {
|
|
1900
|
-
_debugEnd: () => _debugEnd,
|
|
1901
|
-
_debugProcess: () => _debugProcess,
|
|
1902
|
-
_events: () => _events,
|
|
1903
|
-
_eventsCount: () => _eventsCount,
|
|
1904
|
-
_exiting: () => _exiting,
|
|
1905
|
-
_fatalExceptions: () => _fatalExceptions,
|
|
1906
|
-
_getActiveHandles: () => _getActiveHandles,
|
|
1907
|
-
_getActiveRequests: () => _getActiveRequests,
|
|
1908
|
-
_kill: () => _kill,
|
|
1909
|
-
_linkedBinding: () => _linkedBinding,
|
|
1910
|
-
_maxListeners: () => _maxListeners,
|
|
1911
|
-
_preload_modules: () => _preload_modules,
|
|
1912
|
-
_rawDebug: () => _rawDebug,
|
|
1913
|
-
_startProfilerIdleNotifier: () => _startProfilerIdleNotifier,
|
|
1914
|
-
_stopProfilerIdleNotifier: () => _stopProfilerIdleNotifier,
|
|
1915
|
-
_tickCallback: () => _tickCallback,
|
|
1916
|
-
abort: () => abort,
|
|
1917
|
-
addListener: () => addListener,
|
|
1918
|
-
allowedNodeEnvironmentFlags: () => allowedNodeEnvironmentFlags,
|
|
1919
|
-
arch: () => arch,
|
|
1920
|
-
argv: () => argv,
|
|
1921
|
-
argv0: () => argv0,
|
|
1922
|
-
assert: () => assert,
|
|
1923
|
-
binding: () => binding,
|
|
1924
|
-
browser: () => browser,
|
|
1925
|
-
chdir: () => chdir,
|
|
1926
|
-
config: () => config,
|
|
1927
|
-
cpuUsage: () => cpuUsage,
|
|
1928
|
-
cwd: () => cwd,
|
|
1929
|
-
debugPort: () => debugPort,
|
|
1930
|
-
default: () => process,
|
|
1931
|
-
dlopen: () => dlopen,
|
|
1932
|
-
domain: () => domain,
|
|
1933
|
-
emit: () => emit,
|
|
1934
|
-
emitWarning: () => emitWarning,
|
|
1935
|
-
env: () => env,
|
|
1936
|
-
execArgv: () => execArgv,
|
|
1937
|
-
execPath: () => execPath,
|
|
1938
|
-
exit: () => exit,
|
|
1939
|
-
features: () => features,
|
|
1940
|
-
hasUncaughtExceptionCaptureCallback: () => hasUncaughtExceptionCaptureCallback,
|
|
1941
|
-
hrtime: () => hrtime,
|
|
1942
|
-
kill: () => kill,
|
|
1943
|
-
listeners: () => listeners,
|
|
1944
|
-
memoryUsage: () => memoryUsage,
|
|
1945
|
-
moduleLoadList: () => moduleLoadList,
|
|
1946
|
-
nextTick: () => nextTick,
|
|
1947
|
-
off: () => off,
|
|
1948
|
-
on: () => on,
|
|
1949
|
-
once: () => once,
|
|
1950
|
-
openStdin: () => openStdin,
|
|
1951
|
-
pid: () => pid,
|
|
1952
|
-
platform: () => platform,
|
|
1953
|
-
ppid: () => ppid,
|
|
1954
|
-
prependListener: () => prependListener,
|
|
1955
|
-
prependOnceListener: () => prependOnceListener,
|
|
1956
|
-
reallyExit: () => reallyExit,
|
|
1957
|
-
release: () => release,
|
|
1958
|
-
removeAllListeners: () => removeAllListeners,
|
|
1959
|
-
removeListener: () => removeListener,
|
|
1960
|
-
resourceUsage: () => resourceUsage,
|
|
1961
|
-
setSourceMapsEnabled: () => setSourceMapsEnabled,
|
|
1962
|
-
setUncaughtExceptionCaptureCallback: () => setUncaughtExceptionCaptureCallback,
|
|
1963
|
-
stderr: () => stderr,
|
|
1964
|
-
stdin: () => stdin,
|
|
1965
|
-
stdout: () => stdout,
|
|
1966
|
-
title: () => title,
|
|
1967
|
-
umask: () => umask,
|
|
1968
|
-
uptime: () => uptime,
|
|
1969
|
-
version: () => version,
|
|
1970
|
-
versions: () => versions
|
|
1971
|
-
});
|
|
1972
|
-
function unimplemented(name) {
|
|
1973
|
-
throw new Error("Node.js process " + name + " is not supported by JSPM core outside of Node.js");
|
|
1974
|
-
}
|
|
1975
|
-
function cleanUpNextTick() {
|
|
1976
|
-
if (!draining || !currentQueue)
|
|
1977
|
-
return;
|
|
1978
|
-
draining = false;
|
|
1979
|
-
if (currentQueue.length) {
|
|
1980
|
-
queue = currentQueue.concat(queue);
|
|
1981
|
-
} else {
|
|
1982
|
-
queueIndex = -1;
|
|
1983
|
-
}
|
|
1984
|
-
if (queue.length)
|
|
1985
|
-
drainQueue();
|
|
1986
|
-
}
|
|
1987
|
-
function drainQueue() {
|
|
1988
|
-
if (draining)
|
|
1989
|
-
return;
|
|
1990
|
-
var timeout = setTimeout(cleanUpNextTick, 0);
|
|
1991
|
-
draining = true;
|
|
1992
|
-
var len = queue.length;
|
|
1993
|
-
while (len) {
|
|
1994
|
-
currentQueue = queue;
|
|
1995
|
-
queue = [];
|
|
1996
|
-
while (++queueIndex < len) {
|
|
1997
|
-
if (currentQueue)
|
|
1998
|
-
currentQueue[queueIndex].run();
|
|
1999
|
-
}
|
|
2000
|
-
queueIndex = -1;
|
|
2001
|
-
len = queue.length;
|
|
2002
|
-
}
|
|
2003
|
-
currentQueue = null;
|
|
2004
|
-
draining = false;
|
|
2005
|
-
clearTimeout(timeout);
|
|
2006
|
-
}
|
|
2007
|
-
function nextTick(fun) {
|
|
2008
|
-
var args = new Array(arguments.length - 1);
|
|
2009
|
-
if (arguments.length > 1) {
|
|
2010
|
-
for (var i = 1; i < arguments.length; i++)
|
|
2011
|
-
args[i - 1] = arguments[i];
|
|
2012
|
-
}
|
|
2013
|
-
queue.push(new Item(fun, args));
|
|
2014
|
-
if (queue.length === 1 && !draining)
|
|
2015
|
-
setTimeout(drainQueue, 0);
|
|
2016
|
-
}
|
|
2017
|
-
function Item(fun, array) {
|
|
2018
|
-
this.fun = fun;
|
|
2019
|
-
this.array = array;
|
|
2020
|
-
}
|
|
2021
|
-
function noop() {
|
|
2022
|
-
}
|
|
2023
|
-
function _linkedBinding(name) {
|
|
2024
|
-
unimplemented("_linkedBinding");
|
|
2025
|
-
}
|
|
2026
|
-
function dlopen(name) {
|
|
2027
|
-
unimplemented("dlopen");
|
|
2028
|
-
}
|
|
2029
|
-
function _getActiveRequests() {
|
|
2030
|
-
return [];
|
|
2031
|
-
}
|
|
2032
|
-
function _getActiveHandles() {
|
|
2033
|
-
return [];
|
|
2034
|
-
}
|
|
2035
|
-
function assert(condition, message) {
|
|
2036
|
-
if (!condition)
|
|
2037
|
-
throw new Error(message || "assertion error");
|
|
2038
|
-
}
|
|
2039
|
-
function hasUncaughtExceptionCaptureCallback() {
|
|
2040
|
-
return false;
|
|
2041
|
-
}
|
|
2042
|
-
function uptime() {
|
|
2043
|
-
return _performance.now() / 1e3;
|
|
2044
|
-
}
|
|
2045
|
-
function hrtime(previousTimestamp) {
|
|
2046
|
-
var baseNow = Math.floor((Date.now() - _performance.now()) * 1e-3);
|
|
2047
|
-
var clocktime = _performance.now() * 1e-3;
|
|
2048
|
-
var seconds = Math.floor(clocktime) + baseNow;
|
|
2049
|
-
var nanoseconds = Math.floor(clocktime % 1 * 1e9);
|
|
2050
|
-
if (previousTimestamp) {
|
|
2051
|
-
seconds = seconds - previousTimestamp[0];
|
|
2052
|
-
nanoseconds = nanoseconds - previousTimestamp[1];
|
|
2053
|
-
if (nanoseconds < 0) {
|
|
2054
|
-
seconds--;
|
|
2055
|
-
nanoseconds += nanoPerSec;
|
|
2056
|
-
}
|
|
2057
|
-
}
|
|
2058
|
-
return [seconds, nanoseconds];
|
|
2059
|
-
}
|
|
2060
|
-
function on() {
|
|
2061
|
-
return process;
|
|
2062
|
-
}
|
|
2063
|
-
function listeners(name) {
|
|
2064
|
-
return [];
|
|
2065
|
-
}
|
|
2066
|
-
var queue, draining, currentQueue, queueIndex, title, arch, platform, env, argv, execArgv, version, versions, emitWarning, binding, umask, cwd, chdir, release, browser, _rawDebug, moduleLoadList, domain, _exiting, config, reallyExit, _kill, cpuUsage, resourceUsage, memoryUsage, kill, exit, openStdin, allowedNodeEnvironmentFlags, features, _fatalExceptions, setUncaughtExceptionCaptureCallback, _tickCallback, _debugProcess, _debugEnd, _startProfilerIdleNotifier, _stopProfilerIdleNotifier, stdout, stderr, stdin, abort, pid, ppid, execPath, debugPort, argv0, _preload_modules, setSourceMapsEnabled, _performance, nowOffset, nanoPerSec, _maxListeners, _events, _eventsCount, addListener, once, off, removeListener, removeAllListeners, emit, prependListener, prependOnceListener, process;
|
|
2067
|
-
var init_process = __esm({
|
|
2068
|
-
"node_modules/@jspm/core/nodelibs/browser/process.js"() {
|
|
2069
|
-
init_dirname();
|
|
2070
|
-
init_buffer2();
|
|
2071
|
-
init_process2();
|
|
2072
|
-
queue = [];
|
|
2073
|
-
draining = false;
|
|
2074
|
-
queueIndex = -1;
|
|
2075
|
-
Item.prototype.run = function() {
|
|
2076
|
-
this.fun.apply(null, this.array);
|
|
2077
|
-
};
|
|
2078
|
-
title = "browser";
|
|
2079
|
-
arch = "x64";
|
|
2080
|
-
platform = "browser";
|
|
2081
|
-
env = {
|
|
2082
|
-
PATH: "/usr/bin",
|
|
2083
|
-
LANG: typeof navigator !== "undefined" ? navigator.language + ".UTF-8" : void 0,
|
|
2084
|
-
PWD: "/",
|
|
2085
|
-
HOME: "/home",
|
|
2086
|
-
TMP: "/tmp"
|
|
2087
|
-
};
|
|
2088
|
-
argv = ["/usr/bin/node"];
|
|
2089
|
-
execArgv = [];
|
|
2090
|
-
version = "v16.8.0";
|
|
2091
|
-
versions = {};
|
|
2092
|
-
emitWarning = function(message, type) {
|
|
2093
|
-
console.warn((type ? type + ": " : "") + message);
|
|
2094
|
-
};
|
|
2095
|
-
binding = function(name) {
|
|
2096
|
-
unimplemented("binding");
|
|
2097
|
-
};
|
|
2098
|
-
umask = function(mask) {
|
|
2099
|
-
return 0;
|
|
2100
|
-
};
|
|
2101
|
-
cwd = function() {
|
|
2102
|
-
return "/";
|
|
2103
|
-
};
|
|
2104
|
-
chdir = function(dir) {
|
|
2105
|
-
};
|
|
2106
|
-
release = {
|
|
2107
|
-
name: "node",
|
|
2108
|
-
sourceUrl: "",
|
|
2109
|
-
headersUrl: "",
|
|
2110
|
-
libUrl: ""
|
|
2111
|
-
};
|
|
2112
|
-
browser = true;
|
|
2113
|
-
_rawDebug = noop;
|
|
2114
|
-
moduleLoadList = [];
|
|
2115
|
-
domain = {};
|
|
2116
|
-
_exiting = false;
|
|
2117
|
-
config = {};
|
|
2118
|
-
reallyExit = noop;
|
|
2119
|
-
_kill = noop;
|
|
2120
|
-
cpuUsage = function() {
|
|
2121
|
-
return {};
|
|
2122
|
-
};
|
|
2123
|
-
resourceUsage = cpuUsage;
|
|
2124
|
-
memoryUsage = cpuUsage;
|
|
2125
|
-
kill = noop;
|
|
2126
|
-
exit = noop;
|
|
2127
|
-
openStdin = noop;
|
|
2128
|
-
allowedNodeEnvironmentFlags = {};
|
|
2129
|
-
features = {
|
|
2130
|
-
inspector: false,
|
|
2131
|
-
debug: false,
|
|
2132
|
-
uv: false,
|
|
2133
|
-
ipv6: false,
|
|
2134
|
-
tls_alpn: false,
|
|
2135
|
-
tls_sni: false,
|
|
2136
|
-
tls_ocsp: false,
|
|
2137
|
-
tls: false,
|
|
2138
|
-
cached_builtins: true
|
|
2139
|
-
};
|
|
2140
|
-
_fatalExceptions = noop;
|
|
2141
|
-
setUncaughtExceptionCaptureCallback = noop;
|
|
2142
|
-
_tickCallback = noop;
|
|
2143
|
-
_debugProcess = noop;
|
|
2144
|
-
_debugEnd = noop;
|
|
2145
|
-
_startProfilerIdleNotifier = noop;
|
|
2146
|
-
_stopProfilerIdleNotifier = noop;
|
|
2147
|
-
stdout = void 0;
|
|
2148
|
-
stderr = void 0;
|
|
2149
|
-
stdin = void 0;
|
|
2150
|
-
abort = noop;
|
|
2151
|
-
pid = 2;
|
|
2152
|
-
ppid = 1;
|
|
2153
|
-
execPath = "/bin/usr/node";
|
|
2154
|
-
debugPort = 9229;
|
|
2155
|
-
argv0 = "node";
|
|
2156
|
-
_preload_modules = [];
|
|
2157
|
-
setSourceMapsEnabled = noop;
|
|
2158
|
-
_performance = {
|
|
2159
|
-
now: typeof performance !== "undefined" ? performance.now.bind(performance) : void 0,
|
|
2160
|
-
timing: typeof performance !== "undefined" ? performance.timing : void 0
|
|
2161
|
-
};
|
|
2162
|
-
if (_performance.now === void 0) {
|
|
2163
|
-
nowOffset = Date.now();
|
|
2164
|
-
if (_performance.timing && _performance.timing.navigationStart) {
|
|
2165
|
-
nowOffset = _performance.timing.navigationStart;
|
|
2166
|
-
}
|
|
2167
|
-
_performance.now = () => Date.now() - nowOffset;
|
|
2168
|
-
}
|
|
2169
|
-
nanoPerSec = 1e9;
|
|
2170
|
-
hrtime.bigint = function(time) {
|
|
2171
|
-
var diff = hrtime(time);
|
|
2172
|
-
if (typeof BigInt === "undefined") {
|
|
2173
|
-
return diff[0] * nanoPerSec + diff[1];
|
|
2174
|
-
}
|
|
2175
|
-
return BigInt(diff[0] * nanoPerSec) + BigInt(diff[1]);
|
|
2176
|
-
};
|
|
2177
|
-
_maxListeners = 10;
|
|
2178
|
-
_events = {};
|
|
2179
|
-
_eventsCount = 0;
|
|
2180
|
-
addListener = on;
|
|
2181
|
-
once = on;
|
|
2182
|
-
off = on;
|
|
2183
|
-
removeListener = on;
|
|
2184
|
-
removeAllListeners = on;
|
|
2185
|
-
emit = noop;
|
|
2186
|
-
prependListener = on;
|
|
2187
|
-
prependOnceListener = on;
|
|
2188
|
-
process = {
|
|
2189
|
-
version,
|
|
2190
|
-
versions,
|
|
2191
|
-
arch,
|
|
2192
|
-
platform,
|
|
2193
|
-
browser,
|
|
2194
|
-
release,
|
|
2195
|
-
_rawDebug,
|
|
2196
|
-
moduleLoadList,
|
|
2197
|
-
binding,
|
|
2198
|
-
_linkedBinding,
|
|
2199
|
-
_events,
|
|
2200
|
-
_eventsCount,
|
|
2201
|
-
_maxListeners,
|
|
2202
|
-
on,
|
|
2203
|
-
addListener,
|
|
2204
|
-
once,
|
|
2205
|
-
off,
|
|
2206
|
-
removeListener,
|
|
2207
|
-
removeAllListeners,
|
|
2208
|
-
emit,
|
|
2209
|
-
prependListener,
|
|
2210
|
-
prependOnceListener,
|
|
2211
|
-
listeners,
|
|
2212
|
-
domain,
|
|
2213
|
-
_exiting,
|
|
2214
|
-
config,
|
|
2215
|
-
dlopen,
|
|
2216
|
-
uptime,
|
|
2217
|
-
_getActiveRequests,
|
|
2218
|
-
_getActiveHandles,
|
|
2219
|
-
reallyExit,
|
|
2220
|
-
_kill,
|
|
2221
|
-
cpuUsage,
|
|
2222
|
-
resourceUsage,
|
|
2223
|
-
memoryUsage,
|
|
2224
|
-
kill,
|
|
2225
|
-
exit,
|
|
2226
|
-
openStdin,
|
|
2227
|
-
allowedNodeEnvironmentFlags,
|
|
2228
|
-
assert,
|
|
2229
|
-
features,
|
|
2230
|
-
_fatalExceptions,
|
|
2231
|
-
setUncaughtExceptionCaptureCallback,
|
|
2232
|
-
hasUncaughtExceptionCaptureCallback,
|
|
2233
|
-
emitWarning,
|
|
2234
|
-
nextTick,
|
|
2235
|
-
_tickCallback,
|
|
2236
|
-
_debugProcess,
|
|
2237
|
-
_debugEnd,
|
|
2238
|
-
_startProfilerIdleNotifier,
|
|
2239
|
-
_stopProfilerIdleNotifier,
|
|
2240
|
-
stdout,
|
|
2241
|
-
stdin,
|
|
2242
|
-
stderr,
|
|
2243
|
-
abort,
|
|
2244
|
-
umask,
|
|
2245
|
-
chdir,
|
|
2246
|
-
cwd,
|
|
2247
|
-
env,
|
|
2248
|
-
title,
|
|
2249
|
-
argv,
|
|
2250
|
-
execArgv,
|
|
2251
|
-
pid,
|
|
2252
|
-
ppid,
|
|
2253
|
-
execPath,
|
|
2254
|
-
debugPort,
|
|
2255
|
-
hrtime,
|
|
2256
|
-
argv0,
|
|
2257
|
-
_preload_modules,
|
|
2258
|
-
setSourceMapsEnabled
|
|
2259
|
-
};
|
|
2260
|
-
}
|
|
2261
|
-
});
|
|
2262
|
-
|
|
2263
|
-
// node_modules/esbuild-plugin-polyfill-node/polyfills/process.js
|
|
2264
|
-
var init_process2 = __esm({
|
|
2265
|
-
"node_modules/esbuild-plugin-polyfill-node/polyfills/process.js"() {
|
|
2266
|
-
init_process();
|
|
2267
|
-
}
|
|
2268
|
-
});
|
|
2269
|
-
|
|
2270
|
-
// src/lib/BaseSuite.ts
|
|
2271
|
-
init_dirname();
|
|
2272
|
-
init_buffer2();
|
|
2273
|
-
init_process2();
|
|
2274
|
-
|
|
2275
|
-
// src/lib/pmProxy.ts
|
|
2276
|
-
init_dirname();
|
|
2277
|
-
init_buffer2();
|
|
2278
|
-
init_process2();
|
|
2279
|
-
var baseProxy = function(pm, mappings) {
|
|
2280
|
-
return new Proxy(pm, {
|
|
2281
|
-
get: (target, prop, receiver) => {
|
|
2282
|
-
for (const mapping of mappings) {
|
|
2283
|
-
const method = mapping[0];
|
|
2284
|
-
const arger = mapping[1];
|
|
2285
|
-
if (prop === method) {
|
|
2286
|
-
return (...x) => target[prop](arger(...x));
|
|
2287
|
-
}
|
|
2288
|
-
}
|
|
2289
|
-
return (...x) => target[prop](...x);
|
|
2290
|
-
}
|
|
2291
|
-
});
|
|
2292
|
-
};
|
|
2293
|
-
var butThenProxy = (pm, filepath, addArtifact) => {
|
|
2294
|
-
return baseProxy(pm, [
|
|
2295
|
-
[
|
|
2296
|
-
"screencast",
|
|
2297
|
-
(opts, p) => {
|
|
2298
|
-
const path = `${filepath}/butThen/${opts.path}`;
|
|
2299
|
-
addArtifact(path);
|
|
2300
|
-
return [
|
|
2301
|
-
{
|
|
2302
|
-
...opts,
|
|
2303
|
-
path
|
|
2304
|
-
},
|
|
2305
|
-
p
|
|
2306
|
-
];
|
|
2307
|
-
}
|
|
2308
|
-
],
|
|
2309
|
-
[
|
|
2310
|
-
"createWriteStream",
|
|
2311
|
-
(fp) => {
|
|
2312
|
-
const path = `${filepath}/butThen/${fp}`;
|
|
2313
|
-
addArtifact(path);
|
|
2314
|
-
return [path];
|
|
2315
|
-
}
|
|
2316
|
-
],
|
|
2317
|
-
[
|
|
2318
|
-
"writeFileSync",
|
|
2319
|
-
(fp, contents) => {
|
|
2320
|
-
const path = `${filepath}/butThen/${fp}`;
|
|
2321
|
-
addArtifact(path);
|
|
2322
|
-
return [path, contents];
|
|
2323
|
-
}
|
|
2324
|
-
],
|
|
2325
|
-
[
|
|
2326
|
-
"customScreenShot",
|
|
2327
|
-
(opts, p) => {
|
|
2328
|
-
const path = `${filepath}/butThen/${opts.path}`;
|
|
2329
|
-
addArtifact(path);
|
|
2330
|
-
return [
|
|
2331
|
-
{
|
|
2332
|
-
...opts,
|
|
2333
|
-
path
|
|
2334
|
-
},
|
|
2335
|
-
p
|
|
2336
|
-
];
|
|
2337
|
-
}
|
|
2338
|
-
]
|
|
2339
|
-
]);
|
|
2340
|
-
};
|
|
2341
|
-
var andWhenProxy = (pm, filepath, addArtifact) => {
|
|
2342
|
-
return baseProxy(pm, [
|
|
2343
|
-
[
|
|
2344
|
-
"screencast",
|
|
2345
|
-
(opts, p) => {
|
|
2346
|
-
const path = `${filepath}/andWhen/${opts.path}`;
|
|
2347
|
-
addArtifact(path);
|
|
2348
|
-
return [
|
|
2349
|
-
{
|
|
2350
|
-
...opts,
|
|
2351
|
-
path
|
|
2352
|
-
},
|
|
2353
|
-
p
|
|
2354
|
-
];
|
|
2355
|
-
}
|
|
2356
|
-
],
|
|
2357
|
-
[
|
|
2358
|
-
"createWriteStream",
|
|
2359
|
-
(fp) => {
|
|
2360
|
-
const path = `${filepath}/andWhen/${fp}`;
|
|
2361
|
-
addArtifact(path);
|
|
2362
|
-
return [path];
|
|
2363
|
-
}
|
|
2364
|
-
],
|
|
2365
|
-
[
|
|
2366
|
-
"writeFileSync",
|
|
2367
|
-
(fp, contents) => {
|
|
2368
|
-
const path = `${filepath}/andWhen/${fp}`;
|
|
2369
|
-
addArtifact(path);
|
|
2370
|
-
return [path, contents];
|
|
2371
|
-
}
|
|
2372
|
-
],
|
|
2373
|
-
[
|
|
2374
|
-
"customScreenShot",
|
|
2375
|
-
(opts, p) => {
|
|
2376
|
-
const path = `${filepath}/andWhen/${opts.path}`;
|
|
2377
|
-
addArtifact(path);
|
|
2378
|
-
return [
|
|
2379
|
-
{
|
|
2380
|
-
...opts,
|
|
2381
|
-
path
|
|
2382
|
-
},
|
|
2383
|
-
p
|
|
2384
|
-
];
|
|
2385
|
-
}
|
|
2386
|
-
]
|
|
2387
|
-
]);
|
|
2388
|
-
};
|
|
2389
|
-
var afterEachProxy = (pm, suite, given, addArtifact) => {
|
|
2390
|
-
return baseProxy(pm, [
|
|
2391
|
-
[
|
|
2392
|
-
"screencast",
|
|
2393
|
-
(opts, p) => {
|
|
2394
|
-
const path = `suite-${suite}/given-${given}/afterEach/${opts.path}`;
|
|
2395
|
-
addArtifact(path);
|
|
2396
|
-
return [
|
|
2397
|
-
{
|
|
2398
|
-
...opts,
|
|
2399
|
-
path
|
|
2400
|
-
},
|
|
2401
|
-
p
|
|
2402
|
-
];
|
|
2403
|
-
}
|
|
2404
|
-
],
|
|
2405
|
-
[
|
|
2406
|
-
"createWriteStream",
|
|
2407
|
-
(fp) => {
|
|
2408
|
-
const path = `suite-${suite}/afterEach/${fp}`;
|
|
2409
|
-
addArtifact(path);
|
|
2410
|
-
return [path];
|
|
2411
|
-
}
|
|
2412
|
-
],
|
|
2413
|
-
[
|
|
2414
|
-
"writeFileSync",
|
|
2415
|
-
(fp, contents) => {
|
|
2416
|
-
const path = `suite-${suite}/given-${given}/afterEach/${fp}`;
|
|
2417
|
-
addArtifact(path);
|
|
2418
|
-
return [path, contents];
|
|
2419
|
-
}
|
|
2420
|
-
],
|
|
2421
|
-
[
|
|
2422
|
-
"customScreenShot",
|
|
2423
|
-
(opts, p) => {
|
|
2424
|
-
const path = `suite-${suite}/given-${given}/afterEach/${opts.path}`;
|
|
2425
|
-
addArtifact(path);
|
|
2426
|
-
return [
|
|
2427
|
-
{
|
|
2428
|
-
...opts,
|
|
2429
|
-
path
|
|
2430
|
-
},
|
|
2431
|
-
p
|
|
2432
|
-
];
|
|
2433
|
-
}
|
|
2434
|
-
]
|
|
2435
|
-
]);
|
|
2436
|
-
};
|
|
2437
|
-
var beforeEachProxy = (pm, suite, addArtifact) => {
|
|
2438
|
-
return baseProxy(pm, [
|
|
2439
|
-
[
|
|
2440
|
-
"screencast",
|
|
2441
|
-
(opts, p) => {
|
|
2442
|
-
const path = `suite-${suite}/beforeEach/${opts.path}`;
|
|
2443
|
-
addArtifact(path);
|
|
2444
|
-
return [
|
|
2445
|
-
{
|
|
2446
|
-
...opts,
|
|
2447
|
-
path
|
|
2448
|
-
},
|
|
2449
|
-
p
|
|
2450
|
-
];
|
|
2451
|
-
}
|
|
2452
|
-
],
|
|
2453
|
-
[
|
|
2454
|
-
"writeFileSync",
|
|
2455
|
-
(fp, contents) => {
|
|
2456
|
-
const path = `suite-${suite}/beforeEach/${fp}`;
|
|
2457
|
-
addArtifact(path);
|
|
2458
|
-
return [path, contents];
|
|
2459
|
-
}
|
|
2460
|
-
],
|
|
2461
|
-
[
|
|
2462
|
-
"customScreenShot",
|
|
2463
|
-
(opts, p) => {
|
|
2464
|
-
const path = `suite-${suite}/beforeEach/${opts.path}`;
|
|
2465
|
-
addArtifact(path);
|
|
2466
|
-
return [
|
|
2467
|
-
{
|
|
2468
|
-
...opts,
|
|
2469
|
-
path
|
|
2470
|
-
},
|
|
2471
|
-
p
|
|
2472
|
-
];
|
|
2473
|
-
}
|
|
2474
|
-
],
|
|
2475
|
-
[
|
|
2476
|
-
"createWriteStream",
|
|
2477
|
-
(fp) => {
|
|
2478
|
-
const path = `suite-${suite}/beforeEach/${fp}`;
|
|
2479
|
-
addArtifact(path);
|
|
2480
|
-
return [path];
|
|
2481
|
-
}
|
|
2482
|
-
]
|
|
2483
|
-
]);
|
|
2484
|
-
};
|
|
2485
|
-
var beforeAllProxy = (pm, suite, addArtifact) => {
|
|
2486
|
-
return baseProxy(pm, [
|
|
2487
|
-
[
|
|
2488
|
-
"writeFileSync",
|
|
2489
|
-
(fp, contents) => {
|
|
2490
|
-
const path = `suite-${suite}/beforeAll/${fp}`;
|
|
2491
|
-
addArtifact(path);
|
|
2492
|
-
return [path, contents];
|
|
2493
|
-
}
|
|
2494
|
-
],
|
|
2495
|
-
[
|
|
2496
|
-
"customScreenShot",
|
|
2497
|
-
(opts, p) => {
|
|
2498
|
-
const path = `suite-${suite}/beforeAll/${opts.path}`;
|
|
2499
|
-
addArtifact(path);
|
|
2500
|
-
return [
|
|
2501
|
-
{
|
|
2502
|
-
...opts,
|
|
2503
|
-
path
|
|
2504
|
-
},
|
|
2505
|
-
p
|
|
2506
|
-
];
|
|
2507
|
-
}
|
|
2508
|
-
],
|
|
2509
|
-
[
|
|
2510
|
-
"createWriteStream",
|
|
2511
|
-
(fp) => {
|
|
2512
|
-
const path = `suite-${suite}/beforeAll/${fp}`;
|
|
2513
|
-
addArtifact(path);
|
|
2514
|
-
return [path];
|
|
2515
|
-
}
|
|
2516
|
-
]
|
|
2517
|
-
]);
|
|
2518
|
-
};
|
|
2519
|
-
var afterAllProxy = (pm, suite, addArtifact) => {
|
|
2520
|
-
return baseProxy(pm, [
|
|
2521
|
-
[
|
|
2522
|
-
"createWriteStream",
|
|
2523
|
-
(fp) => {
|
|
2524
|
-
const path = `suite-${suite}/afterAll/${fp}`;
|
|
2525
|
-
addArtifact(path);
|
|
2526
|
-
return [path];
|
|
2527
|
-
}
|
|
2528
|
-
],
|
|
2529
|
-
[
|
|
2530
|
-
"writeFileSync",
|
|
2531
|
-
(fp, contents) => {
|
|
2532
|
-
const path = `suite-${suite}/afterAll/${fp}`;
|
|
2533
|
-
addArtifact(path);
|
|
2534
|
-
return [path, contents];
|
|
2535
|
-
}
|
|
2536
|
-
],
|
|
2537
|
-
[
|
|
2538
|
-
"customScreenShot",
|
|
2539
|
-
(opts, p) => {
|
|
2540
|
-
const path = `suite-${suite}/afterAll/${opts.path}`;
|
|
2541
|
-
addArtifact(path);
|
|
2542
|
-
return [
|
|
2543
|
-
{
|
|
2544
|
-
...opts,
|
|
2545
|
-
path
|
|
2546
|
-
},
|
|
2547
|
-
p
|
|
2548
|
-
];
|
|
2549
|
-
}
|
|
2550
|
-
]
|
|
2551
|
-
]);
|
|
2552
|
-
};
|
|
2553
|
-
|
|
2554
|
-
// src/lib/BaseSuite.ts
|
|
2555
|
-
var BaseSuite = class {
|
|
2556
|
-
constructor(name, index, givens = {}) {
|
|
2557
|
-
this.artifacts = [];
|
|
2558
|
-
const suiteName = name || "testSuite";
|
|
2559
|
-
if (!suiteName) {
|
|
2560
|
-
throw new Error("BaseSuite requires a non-empty name");
|
|
2561
|
-
}
|
|
2562
|
-
this.name = suiteName;
|
|
2563
|
-
this.index = index;
|
|
2564
|
-
this.givens = givens;
|
|
2565
|
-
this.fails = 0;
|
|
2566
|
-
}
|
|
2567
|
-
addArtifact(path) {
|
|
2568
|
-
console.log("Suite addArtifact", path);
|
|
2569
|
-
const normalizedPath = path.replace(/\\/g, "/");
|
|
2570
|
-
this.artifacts.push(normalizedPath);
|
|
2571
|
-
}
|
|
2572
|
-
features() {
|
|
2573
|
-
try {
|
|
2574
|
-
const features2 = Object.keys(this.givens).map((k) => this.givens[k].features).flat().filter((value, index, array) => {
|
|
2575
|
-
return array.indexOf(value) === index;
|
|
2576
|
-
});
|
|
2577
|
-
return features2 || [];
|
|
2578
|
-
} catch (e) {
|
|
2579
|
-
console.error("[ERROR] Failed to extract features:", JSON.stringify(e));
|
|
2580
|
-
return [];
|
|
2581
|
-
}
|
|
2582
|
-
}
|
|
2583
|
-
toObj() {
|
|
2584
|
-
const givens = Object.keys(this.givens).map((k) => this.givens[k].toObj());
|
|
2585
|
-
return {
|
|
2586
|
-
name: this.name,
|
|
2587
|
-
givens,
|
|
2588
|
-
fails: this.fails,
|
|
2589
|
-
failed: this.failed,
|
|
2590
|
-
features: this.features()
|
|
2591
|
-
};
|
|
2592
|
-
}
|
|
2593
|
-
setup(s, artifactory, tr, pm) {
|
|
2594
|
-
return new Promise((res) => res(s));
|
|
2595
|
-
}
|
|
2596
|
-
assertThat(t) {
|
|
2597
|
-
return !!t;
|
|
2598
|
-
}
|
|
2599
|
-
afterAll(store, artifactory, pm) {
|
|
2600
|
-
return store;
|
|
2601
|
-
}
|
|
2602
|
-
async run(input, testResourceConfiguration, artifactory, tLog, pm) {
|
|
2603
|
-
this.testResourceConfiguration = testResourceConfiguration;
|
|
2604
|
-
const suiteArtifactory = (fPath, value) => artifactory(`suite-${this.index}-${this.name}/${fPath}`, value);
|
|
2605
|
-
const sNdx = this.index;
|
|
2606
|
-
const proxiedPm = beforeAllProxy(pm, sNdx.toString(), this);
|
|
2607
|
-
const subject = await this.setup(
|
|
2608
|
-
input,
|
|
2609
|
-
suiteArtifactory,
|
|
2610
|
-
testResourceConfiguration,
|
|
2611
|
-
proxiedPm
|
|
2612
|
-
);
|
|
2613
|
-
for (const [gKey, g] of Object.entries(this.givens)) {
|
|
2614
|
-
const giver = this.givens[gKey];
|
|
2615
|
-
this.store = await giver.give(
|
|
2616
|
-
subject,
|
|
2617
|
-
gKey,
|
|
2618
|
-
testResourceConfiguration,
|
|
2619
|
-
this.assertThat,
|
|
2620
|
-
suiteArtifactory,
|
|
2621
|
-
tLog,
|
|
2622
|
-
pm,
|
|
2623
|
-
sNdx
|
|
2624
|
-
).catch((e) => {
|
|
2625
|
-
this.failed = true;
|
|
2626
|
-
this.fails = this.fails + 1;
|
|
2627
|
-
throw e;
|
|
2628
|
-
});
|
|
2629
|
-
}
|
|
2630
|
-
try {
|
|
2631
|
-
const afterAllPm = afterAllProxy(pm, sNdx.toString(), this);
|
|
2632
|
-
this.afterAll(this.store, artifactory, afterAllPm);
|
|
2633
|
-
} catch (e) {
|
|
2634
|
-
console.error(JSON.stringify(e));
|
|
2635
|
-
}
|
|
2636
|
-
return this;
|
|
2637
|
-
}
|
|
2638
|
-
};
|
|
2639
|
-
|
|
2640
|
-
// src/Web.ts
|
|
2641
|
-
init_dirname();
|
|
2642
|
-
init_buffer2();
|
|
2643
|
-
init_process2();
|
|
2644
|
-
|
|
2645
|
-
// src/PM/web.ts
|
|
2646
|
-
init_dirname();
|
|
2647
|
-
init_buffer2();
|
|
2648
|
-
init_process2();
|
|
2649
|
-
|
|
2650
|
-
// src/PM/index.ts
|
|
2651
|
-
init_dirname();
|
|
2652
|
-
init_buffer2();
|
|
2653
|
-
init_process2();
|
|
2654
|
-
var PM = class {
|
|
2655
|
-
};
|
|
2656
|
-
|
|
2657
|
-
// src/PM/web.ts
|
|
2658
|
-
var PM_Web = class extends PM {
|
|
2659
|
-
constructor(t) {
|
|
2660
|
-
super();
|
|
2661
|
-
this.testResourceConfiguration = t;
|
|
2662
|
-
}
|
|
2663
|
-
start() {
|
|
2664
|
-
return new Promise((r) => r());
|
|
2665
|
-
}
|
|
2666
|
-
stop() {
|
|
2667
|
-
return new Promise((r) => r());
|
|
2668
|
-
}
|
|
2669
|
-
getInnerHtml(selector, page) {
|
|
2670
|
-
throw new Error("web.ts getInnHtml not implemented");
|
|
2671
|
-
}
|
|
2672
|
-
pages() {
|
|
2673
|
-
throw new Error("Method not implemented.");
|
|
2674
|
-
}
|
|
2675
|
-
stopSideCar(n) {
|
|
2676
|
-
return window["stopSideCar"](n, this.testResourceConfiguration.name);
|
|
2677
|
-
}
|
|
2678
|
-
launchSideCar(n) {
|
|
2679
|
-
return window["launchSideCar"](n, this.testResourceConfiguration.name);
|
|
2680
|
-
}
|
|
2681
|
-
waitForSelector(p, s) {
|
|
2682
|
-
return window["waitForSelector"](p, s);
|
|
2683
|
-
}
|
|
2684
|
-
screencast(opts, page) {
|
|
2685
|
-
return window["screencast"](
|
|
2686
|
-
{
|
|
2687
|
-
...opts,
|
|
2688
|
-
path: this.testResourceConfiguration.fs + "/" + opts.path
|
|
2689
|
-
},
|
|
2690
|
-
page.mainFrame()._id,
|
|
2691
|
-
this.testResourceConfiguration.name
|
|
2692
|
-
);
|
|
2693
|
-
}
|
|
2694
|
-
screencastStop(recorder) {
|
|
2695
|
-
return window["screencastStop"](recorder);
|
|
2696
|
-
}
|
|
2697
|
-
closePage(p) {
|
|
2698
|
-
return window["closePage"](p);
|
|
2699
|
-
}
|
|
2700
|
-
goto(p, url) {
|
|
2701
|
-
return window["goto"](p, url);
|
|
2702
|
-
}
|
|
2703
|
-
newPage() {
|
|
2704
|
-
return window["newPage"]();
|
|
2705
|
-
}
|
|
2706
|
-
$(selector) {
|
|
2707
|
-
return window["$"](selector);
|
|
2708
|
-
}
|
|
2709
|
-
isDisabled(selector) {
|
|
2710
|
-
return window["isDisabled"](selector);
|
|
2711
|
-
}
|
|
2712
|
-
getAttribute(selector, attribute) {
|
|
2713
|
-
return window["getAttribute"](selector, attribute);
|
|
2714
|
-
}
|
|
2715
|
-
getValue(selector) {
|
|
2716
|
-
return window["getValue"](selector);
|
|
2717
|
-
}
|
|
2718
|
-
focusOn(selector) {
|
|
2719
|
-
return window["focusOn"](selector);
|
|
2720
|
-
}
|
|
2721
|
-
typeInto(value) {
|
|
2722
|
-
return window["typeInto"](value);
|
|
2723
|
-
}
|
|
2724
|
-
async page(x) {
|
|
2725
|
-
return window["page"](x);
|
|
2726
|
-
}
|
|
2727
|
-
click(selector) {
|
|
2728
|
-
return window["click"](selector);
|
|
2729
|
-
}
|
|
2730
|
-
customScreenShot(x, y) {
|
|
2731
|
-
const opts = x[0];
|
|
2732
|
-
const page = x[1];
|
|
2733
|
-
return window["customScreenShot"](
|
|
2734
|
-
{
|
|
2735
|
-
...opts,
|
|
2736
|
-
path: this.testResourceConfiguration.fs + "/" + opts.path
|
|
2737
|
-
},
|
|
2738
|
-
this.testResourceConfiguration.name,
|
|
2739
|
-
page
|
|
2740
|
-
);
|
|
2741
|
-
}
|
|
2742
|
-
existsSync(destFolder) {
|
|
2743
|
-
return window["existsSync"](destFolder);
|
|
2744
|
-
}
|
|
2745
|
-
mkdirSync(x) {
|
|
2746
|
-
return window["mkdirSync"](this.testResourceConfiguration.fs + "/");
|
|
2747
|
-
}
|
|
2748
|
-
write(uid, contents) {
|
|
2749
|
-
return window["write"](uid, contents);
|
|
2750
|
-
}
|
|
2751
|
-
writeFileSync(x) {
|
|
2752
|
-
const z = arguments["0"];
|
|
2753
|
-
const filepath = z[0];
|
|
2754
|
-
const contents = z[1];
|
|
2755
|
-
return window["writeFileSync"](
|
|
2756
|
-
this.testResourceConfiguration.fs + "/" + filepath,
|
|
2757
|
-
contents,
|
|
2758
|
-
this.testResourceConfiguration.name
|
|
2759
|
-
);
|
|
2760
|
-
}
|
|
2761
|
-
createWriteStream(filepath) {
|
|
2762
|
-
return window["createWriteStream"](
|
|
2763
|
-
this.testResourceConfiguration.fs + "/" + filepath,
|
|
2764
|
-
this.testResourceConfiguration.name
|
|
2765
|
-
);
|
|
2766
|
-
}
|
|
2767
|
-
end(uid) {
|
|
2768
|
-
return window["end"](uid);
|
|
2769
|
-
}
|
|
2770
|
-
customclose() {
|
|
2771
|
-
window["customclose"](
|
|
2772
|
-
this.testResourceConfiguration.fs,
|
|
2773
|
-
this.testResourceConfiguration.name
|
|
2774
|
-
);
|
|
2775
|
-
}
|
|
2776
|
-
testArtiFactoryfileWriter(tLog, callback) {
|
|
2777
|
-
return (fPath, value) => {
|
|
2778
|
-
callback(
|
|
2779
|
-
new Promise((res, rej) => {
|
|
2780
|
-
tLog("testArtiFactory =>", fPath);
|
|
2781
|
-
})
|
|
2782
|
-
);
|
|
2783
|
-
};
|
|
2784
|
-
}
|
|
2785
|
-
};
|
|
2786
|
-
|
|
2787
|
-
// src/lib/core.ts
|
|
2788
|
-
init_dirname();
|
|
2789
|
-
init_buffer2();
|
|
2790
|
-
init_process2();
|
|
2791
|
-
|
|
2792
|
-
// src/lib/index.ts
|
|
2793
|
-
init_dirname();
|
|
2794
|
-
init_buffer2();
|
|
2795
|
-
init_process2();
|
|
2796
|
-
var BaseAdapter = () => ({
|
|
2797
|
-
beforeAll: async (s) => s,
|
|
2798
|
-
beforeEach: async function(subject, initialValues, x, testResource, pm) {
|
|
2799
|
-
return subject;
|
|
2800
|
-
},
|
|
2801
|
-
afterEach: async (s) => s,
|
|
2802
|
-
afterAll: (store) => void 0,
|
|
2803
|
-
butThen: async (store, thenCb) => {
|
|
2804
|
-
return thenCb(store);
|
|
2805
|
-
},
|
|
2806
|
-
andWhen: async (store, whenCB, testResource, pm) => {
|
|
2807
|
-
try {
|
|
2808
|
-
await whenCB(store, testResource, pm);
|
|
2809
|
-
} catch (error) {
|
|
2810
|
-
console.error("Error in andWhen:", error);
|
|
2811
|
-
throw error;
|
|
2812
|
-
}
|
|
2813
|
-
},
|
|
2814
|
-
assertThis: (x) => x
|
|
2815
|
-
});
|
|
2816
|
-
var DefaultAdapter = (p) => {
|
|
2817
|
-
return {
|
|
2818
|
-
...BaseAdapter,
|
|
2819
|
-
...p
|
|
2820
|
-
};
|
|
2821
|
-
};
|
|
2822
|
-
var defaultTestResourceRequirement = {
|
|
2823
|
-
ports: 0
|
|
2824
|
-
};
|
|
2825
|
-
|
|
2826
|
-
// src/lib/abstractBase.ts
|
|
2827
|
-
init_dirname();
|
|
2828
|
-
init_buffer2();
|
|
2829
|
-
init_process2();
|
|
2830
|
-
var BaseGiven = class {
|
|
2831
|
-
constructor(name, features2, whens, thens, givenCB, initialValues) {
|
|
2832
|
-
this.artifacts = [];
|
|
2833
|
-
this.name = name;
|
|
2834
|
-
this.features = features2;
|
|
2835
|
-
this.whens = whens;
|
|
2836
|
-
this.thens = thens;
|
|
2837
|
-
this.givenCB = givenCB;
|
|
2838
|
-
this.initialValues = initialValues;
|
|
2839
|
-
}
|
|
2840
|
-
addArtifact(path) {
|
|
2841
|
-
console.log("Given addArtifact", path);
|
|
2842
|
-
const normalizedPath = path.replace(/\\/g, "/");
|
|
2843
|
-
this.artifacts.push(normalizedPath);
|
|
2844
|
-
}
|
|
2845
|
-
beforeAll(store) {
|
|
2846
|
-
return store;
|
|
2847
|
-
}
|
|
2848
|
-
toObj() {
|
|
2849
|
-
return {
|
|
2850
|
-
key: this.key,
|
|
2851
|
-
name: this.name,
|
|
2852
|
-
whens: this.whens.map((w) => {
|
|
2853
|
-
if (w && w.toObj)
|
|
2854
|
-
return w.toObj();
|
|
2855
|
-
console.error("w is not as expected!", JSON.stringify(w));
|
|
2856
|
-
return {};
|
|
2857
|
-
}),
|
|
2858
|
-
thens: this.thens.map((t) => t.toObj()),
|
|
2859
|
-
error: this.error ? [this.error, this.error.stack] : null,
|
|
2860
|
-
failed: this.failed,
|
|
2861
|
-
features: this.features,
|
|
2862
|
-
artifacts: this.artifacts
|
|
2863
|
-
};
|
|
2864
|
-
}
|
|
2865
|
-
async afterEach(store, key, artifactory, pm) {
|
|
2866
|
-
return store;
|
|
2867
|
-
}
|
|
2868
|
-
async give(subject, key, testResourceConfiguration, tester, artifactory, tLog, pm, suiteNdx) {
|
|
2869
|
-
this.key = key;
|
|
2870
|
-
tLog(`
|
|
2871
|
-
${this.key}`);
|
|
2872
|
-
tLog(`
|
|
2873
|
-
Given: ${this.name}`);
|
|
2874
|
-
const givenArtifactory = (fPath, value) => artifactory(`given-${key}/${fPath}`, value);
|
|
2875
|
-
this.uberCatcher((e) => {
|
|
2876
|
-
console.error(e.toString());
|
|
2877
|
-
this.error = e.error;
|
|
2878
|
-
tLog(e.stack);
|
|
2879
|
-
});
|
|
2880
|
-
try {
|
|
2881
|
-
const proxiedPm = beforeEachProxy(
|
|
2882
|
-
pm,
|
|
2883
|
-
suiteNdx.toString(),
|
|
2884
|
-
this.addArtifact.bind(this)
|
|
2885
|
-
);
|
|
2886
|
-
this.store = await this.givenThat(
|
|
2887
|
-
subject,
|
|
2888
|
-
testResourceConfiguration,
|
|
2889
|
-
givenArtifactory,
|
|
2890
|
-
this.givenCB,
|
|
2891
|
-
this.initialValues,
|
|
2892
|
-
proxiedPm
|
|
2893
|
-
);
|
|
2894
|
-
} catch (e) {
|
|
2895
|
-
this.failed = true;
|
|
2896
|
-
this.error = e.stack;
|
|
2897
|
-
}
|
|
2898
|
-
try {
|
|
2899
|
-
for (const [whenNdx, whenStep] of this.whens.entries()) {
|
|
2900
|
-
await whenStep.test(
|
|
2901
|
-
this.store,
|
|
2902
|
-
testResourceConfiguration,
|
|
2903
|
-
tLog,
|
|
2904
|
-
pm,
|
|
2905
|
-
`suite-${suiteNdx}/given-${key}/when/${whenNdx}`
|
|
2906
|
-
);
|
|
2907
|
-
}
|
|
2908
|
-
for (const [thenNdx, thenStep] of this.thens.entries()) {
|
|
2909
|
-
const t = await thenStep.test(
|
|
2910
|
-
this.store,
|
|
2911
|
-
testResourceConfiguration,
|
|
2912
|
-
tLog,
|
|
2913
|
-
pm,
|
|
2914
|
-
`suite-${suiteNdx}/given-${key}/then-${thenNdx}`
|
|
2915
|
-
);
|
|
2916
|
-
tester(t);
|
|
2917
|
-
}
|
|
2918
|
-
} catch (e) {
|
|
2919
|
-
this.error = e.stack;
|
|
2920
|
-
this.failed = true;
|
|
2921
|
-
} finally {
|
|
2922
|
-
try {
|
|
2923
|
-
const proxiedPm = afterEachProxy(
|
|
2924
|
-
pm,
|
|
2925
|
-
suiteNdx.toString(),
|
|
2926
|
-
key,
|
|
2927
|
-
this.addArtifact.bind(this)
|
|
2928
|
-
);
|
|
2929
|
-
await this.afterEach(this.store, this.key, givenArtifactory, proxiedPm);
|
|
2930
|
-
} catch (e) {
|
|
2931
|
-
this.failed = e;
|
|
2932
|
-
throw e;
|
|
2933
|
-
}
|
|
2934
|
-
}
|
|
2935
|
-
return this.store;
|
|
2936
|
-
}
|
|
2937
|
-
};
|
|
2938
|
-
var BaseWhen = class {
|
|
2939
|
-
constructor(name, whenCB) {
|
|
2940
|
-
this.artifacts = [];
|
|
2941
|
-
this.name = name;
|
|
2942
|
-
this.whenCB = whenCB;
|
|
2943
|
-
}
|
|
2944
|
-
addArtifact(path) {
|
|
2945
|
-
console.log("When addArtifact", path);
|
|
2946
|
-
const normalizedPath = path.replace(/\\/g, "/");
|
|
2947
|
-
this.artifacts.push(normalizedPath);
|
|
2948
|
-
}
|
|
2949
|
-
toObj() {
|
|
2950
|
-
const obj = {
|
|
2951
|
-
name: this.name,
|
|
2952
|
-
error: this.error ? `${this.error.name}: ${this.error.message}
|
|
2953
|
-
${this.error.stack}` : null,
|
|
2954
|
-
artifacts: this.artifacts || []
|
|
2955
|
-
};
|
|
2956
|
-
console.log(
|
|
2957
|
-
`[TOOBJ] Serializing ${this.constructor.name} with artifacts:`,
|
|
2958
|
-
obj.artifacts
|
|
2959
|
-
);
|
|
2960
|
-
return obj;
|
|
2961
|
-
}
|
|
2962
|
-
async test(store, testResourceConfiguration, tLog, pm, filepath) {
|
|
2963
|
-
try {
|
|
2964
|
-
const proxiedPm = andWhenProxy(pm, filepath, this.addArtifact.bind(this));
|
|
2965
|
-
const result = await this.andWhen(
|
|
2966
|
-
store,
|
|
2967
|
-
this.whenCB,
|
|
2968
|
-
testResourceConfiguration,
|
|
2969
|
-
proxiedPm
|
|
2970
|
-
);
|
|
2971
|
-
return result;
|
|
2972
|
-
} catch (e) {
|
|
2973
|
-
console.error(
|
|
2974
|
-
"[ERROR] When step failed:",
|
|
2975
|
-
this.name.toString(),
|
|
2976
|
-
e.toString()
|
|
2977
|
-
);
|
|
2978
|
-
this.error = e;
|
|
2979
|
-
throw e;
|
|
2980
|
-
}
|
|
2981
|
-
}
|
|
2982
|
-
};
|
|
2983
|
-
var BaseThen = class {
|
|
2984
|
-
constructor(name, thenCB) {
|
|
2985
|
-
this.artifacts = [];
|
|
2986
|
-
this.name = name;
|
|
2987
|
-
this.thenCB = thenCB;
|
|
2988
|
-
this.error = false;
|
|
2989
|
-
this.artifacts = [];
|
|
2990
|
-
}
|
|
2991
|
-
addArtifact(path) {
|
|
2992
|
-
console.log("Then addArtifact", path);
|
|
2993
|
-
const normalizedPath = path.replace(/\\/g, "/");
|
|
2994
|
-
this.artifacts.push(normalizedPath);
|
|
2995
|
-
}
|
|
2996
|
-
toObj() {
|
|
2997
|
-
const obj = {
|
|
2998
|
-
name: this.name,
|
|
2999
|
-
error: this.error,
|
|
3000
|
-
artifacts: this.artifacts
|
|
3001
|
-
};
|
|
3002
|
-
return obj;
|
|
3003
|
-
}
|
|
3004
|
-
async test(store, testResourceConfiguration, tLog, pm, filepath) {
|
|
3005
|
-
const proxiedPm = butThenProxy(pm, filepath, this.addArtifact.bind(this));
|
|
3006
|
-
return this.butThen(
|
|
3007
|
-
store,
|
|
3008
|
-
async (s) => {
|
|
3009
|
-
try {
|
|
3010
|
-
if (typeof this.thenCB === "function") {
|
|
3011
|
-
return await this.thenCB(s, proxiedPm);
|
|
3012
|
-
} else {
|
|
3013
|
-
return this.thenCB;
|
|
3014
|
-
}
|
|
3015
|
-
} catch (e) {
|
|
3016
|
-
console.error(e.stack);
|
|
3017
|
-
}
|
|
3018
|
-
},
|
|
3019
|
-
testResourceConfiguration,
|
|
3020
|
-
proxiedPm
|
|
3021
|
-
).catch((e) => {
|
|
3022
|
-
this.error = e.stack;
|
|
3023
|
-
});
|
|
3024
|
-
}
|
|
3025
|
-
};
|
|
3026
|
-
|
|
3027
|
-
// src/lib/classBuilder.ts
|
|
3028
|
-
init_dirname();
|
|
3029
|
-
init_buffer2();
|
|
3030
|
-
init_process2();
|
|
3031
|
-
|
|
3032
|
-
// src/lib/basebuilder.ts
|
|
3033
|
-
init_dirname();
|
|
3034
|
-
init_buffer2();
|
|
3035
|
-
init_process2();
|
|
3036
|
-
var BaseBuilder = class {
|
|
3037
|
-
constructor(input, suitesOverrides, givenOverides, whenOverides, thenOverides, testResourceRequirement, testSpecification) {
|
|
3038
|
-
this.artifacts = [];
|
|
3039
|
-
this.artifacts = [];
|
|
3040
|
-
this.testResourceRequirement = testResourceRequirement;
|
|
3041
|
-
this.suitesOverrides = suitesOverrides;
|
|
3042
|
-
this.givenOverides = givenOverides;
|
|
3043
|
-
this.whenOverides = whenOverides;
|
|
3044
|
-
this.thenOverides = thenOverides;
|
|
3045
|
-
this.testSpecification = testSpecification;
|
|
3046
|
-
this.specs = testSpecification(
|
|
3047
|
-
this.Suites(),
|
|
3048
|
-
this.Given(),
|
|
3049
|
-
this.When(),
|
|
3050
|
-
this.Then()
|
|
3051
|
-
);
|
|
3052
|
-
this.testJobs = this.specs.map((suite) => {
|
|
3053
|
-
const suiteRunner = (suite2) => async (puppetMaster, tLog) => {
|
|
3054
|
-
try {
|
|
3055
|
-
const x = await suite2.run(
|
|
3056
|
-
input,
|
|
3057
|
-
puppetMaster.testResourceConfiguration,
|
|
3058
|
-
(fPath, value) => puppetMaster.testArtiFactoryfileWriter(
|
|
3059
|
-
tLog,
|
|
3060
|
-
(p) => {
|
|
3061
|
-
this.artifacts.push(p);
|
|
3062
|
-
}
|
|
3063
|
-
)(
|
|
3064
|
-
puppetMaster.testResourceConfiguration.fs + "/" + fPath,
|
|
3065
|
-
value
|
|
3066
|
-
),
|
|
3067
|
-
tLog,
|
|
3068
|
-
puppetMaster
|
|
3069
|
-
);
|
|
3070
|
-
return x;
|
|
3071
|
-
} catch (e) {
|
|
3072
|
-
console.error(e.stack);
|
|
3073
|
-
}
|
|
3074
|
-
};
|
|
3075
|
-
const runner = suiteRunner(suite);
|
|
3076
|
-
return {
|
|
3077
|
-
test: suite,
|
|
3078
|
-
toObj: () => {
|
|
3079
|
-
return suite.toObj();
|
|
3080
|
-
},
|
|
3081
|
-
runner,
|
|
3082
|
-
receiveTestResourceConfig: async function(puppetMaster) {
|
|
3083
|
-
const tLog = async (...l) => {
|
|
3084
|
-
};
|
|
3085
|
-
try {
|
|
3086
|
-
const suiteDone = await runner(puppetMaster, tLog);
|
|
3087
|
-
const fails = suiteDone.fails;
|
|
3088
|
-
await puppetMaster.writeFileSync([
|
|
3089
|
-
`tests.json`,
|
|
3090
|
-
JSON.stringify(this.toObj(), null, 2)
|
|
3091
|
-
]);
|
|
3092
|
-
return {
|
|
3093
|
-
failed: fails > 0,
|
|
3094
|
-
fails,
|
|
3095
|
-
artifacts: this.artifacts || [],
|
|
3096
|
-
features: suiteDone.features()
|
|
3097
|
-
};
|
|
3098
|
-
} catch (e) {
|
|
3099
|
-
console.error(e.stack);
|
|
3100
|
-
return {
|
|
3101
|
-
failed: true,
|
|
3102
|
-
fails: -1,
|
|
3103
|
-
artifacts: this.artifacts || [],
|
|
3104
|
-
features: []
|
|
3105
|
-
};
|
|
3106
|
-
}
|
|
3107
|
-
}
|
|
3108
|
-
};
|
|
3109
|
-
});
|
|
3110
|
-
}
|
|
3111
|
-
// testsJson() {
|
|
3112
|
-
// puppetMaster.writeFileSync(
|
|
3113
|
-
// `tests.json`,
|
|
3114
|
-
// JSON.stringify({ features: suiteDone.features() }, null, 2)
|
|
3115
|
-
// );
|
|
3116
|
-
// }
|
|
3117
|
-
Specs() {
|
|
3118
|
-
return this.specs;
|
|
3119
|
-
}
|
|
3120
|
-
Suites() {
|
|
3121
|
-
return this.suitesOverrides;
|
|
3122
|
-
}
|
|
3123
|
-
Given() {
|
|
3124
|
-
return this.givenOverides;
|
|
3125
|
-
}
|
|
3126
|
-
When() {
|
|
3127
|
-
return this.whenOverides;
|
|
3128
|
-
}
|
|
3129
|
-
Then() {
|
|
3130
|
-
return this.thenOverides;
|
|
3131
|
-
}
|
|
3132
|
-
};
|
|
3133
|
-
|
|
3134
|
-
// src/lib/classBuilder.ts
|
|
3135
|
-
var ClassBuilder = class extends BaseBuilder {
|
|
3136
|
-
constructor(testImplementation, testSpecification, input, suiteKlasser, givenKlasser, whenKlasser, thenKlasser, testResourceRequirement) {
|
|
3137
|
-
const classySuites = Object.entries(testImplementation.suites).reduce(
|
|
3138
|
-
(a, [key], index) => {
|
|
3139
|
-
a[key] = (somestring, givens) => {
|
|
3140
|
-
return new suiteKlasser.prototype.constructor(
|
|
3141
|
-
somestring,
|
|
3142
|
-
index,
|
|
3143
|
-
givens
|
|
3144
|
-
);
|
|
3145
|
-
};
|
|
3146
|
-
return a;
|
|
3147
|
-
},
|
|
3148
|
-
{}
|
|
3149
|
-
);
|
|
3150
|
-
const classyGivens = Object.entries(testImplementation.givens).reduce(
|
|
3151
|
-
(a, [key, g]) => {
|
|
3152
|
-
a[key] = (features2, whens, thens, ...initialValues) => {
|
|
3153
|
-
return new givenKlasser.prototype.constructor(
|
|
3154
|
-
key,
|
|
3155
|
-
features2,
|
|
3156
|
-
whens,
|
|
3157
|
-
thens,
|
|
3158
|
-
testImplementation.givens[key],
|
|
3159
|
-
initialValues
|
|
3160
|
-
);
|
|
3161
|
-
};
|
|
3162
|
-
return a;
|
|
3163
|
-
},
|
|
3164
|
-
{}
|
|
3165
|
-
);
|
|
3166
|
-
const classyWhens = Object.entries(testImplementation.whens).reduce(
|
|
3167
|
-
(a, [key, whEn]) => {
|
|
3168
|
-
a[key] = (...payload) => {
|
|
3169
|
-
return new whenKlasser.prototype.constructor(
|
|
3170
|
-
`${whEn.name}: ${payload && payload.toString()}`,
|
|
3171
|
-
whEn(...payload)
|
|
3172
|
-
);
|
|
3173
|
-
};
|
|
3174
|
-
return a;
|
|
3175
|
-
},
|
|
3176
|
-
{}
|
|
3177
|
-
);
|
|
3178
|
-
const classyThens = Object.entries(
|
|
3179
|
-
testImplementation.thens
|
|
3180
|
-
).reduce(
|
|
3181
|
-
(a, [key, thEn]) => {
|
|
3182
|
-
a[key] = (expected, ...x) => {
|
|
3183
|
-
return new thenKlasser.prototype.constructor(
|
|
3184
|
-
`${thEn.name}: ${expected && expected.toString()}`,
|
|
3185
|
-
thEn(expected, ...x)
|
|
3186
|
-
);
|
|
3187
|
-
};
|
|
3188
|
-
return a;
|
|
3189
|
-
},
|
|
3190
|
-
{}
|
|
3191
|
-
);
|
|
3192
|
-
super(
|
|
3193
|
-
input,
|
|
3194
|
-
classySuites,
|
|
3195
|
-
classyGivens,
|
|
3196
|
-
classyWhens,
|
|
3197
|
-
classyThens,
|
|
3198
|
-
testResourceRequirement,
|
|
3199
|
-
testSpecification
|
|
3200
|
-
);
|
|
3201
|
-
}
|
|
3202
|
-
};
|
|
3203
|
-
|
|
3204
|
-
// src/lib/core.ts
|
|
3205
|
-
var TesterantoCore = class extends ClassBuilder {
|
|
3206
|
-
constructor(input, testSpecification, testImplementation, testResourceRequirement = defaultTestResourceRequirement, testAdapter, uberCatcher) {
|
|
3207
|
-
const fullAdapter = DefaultAdapter(testAdapter);
|
|
3208
|
-
super(
|
|
3209
|
-
testImplementation,
|
|
3210
|
-
testSpecification,
|
|
3211
|
-
input,
|
|
3212
|
-
class extends BaseSuite {
|
|
3213
|
-
afterAll(store, artifactory, pm) {
|
|
3214
|
-
return fullAdapter.afterAll(store, pm);
|
|
3215
|
-
}
|
|
3216
|
-
assertThat(t) {
|
|
3217
|
-
return fullAdapter.assertThis(t);
|
|
3218
|
-
}
|
|
3219
|
-
async setup(s, artifactory, tr, pm) {
|
|
3220
|
-
return (fullAdapter.beforeAll || (async (input2, artifactory2, tr2, pm2) => input2))(
|
|
3221
|
-
s,
|
|
3222
|
-
this.testResourceConfiguration,
|
|
3223
|
-
// artifactory,
|
|
3224
|
-
pm
|
|
3225
|
-
);
|
|
3226
|
-
}
|
|
3227
|
-
},
|
|
3228
|
-
class Given extends BaseGiven {
|
|
3229
|
-
constructor() {
|
|
3230
|
-
super(...arguments);
|
|
3231
|
-
this.uberCatcher = uberCatcher;
|
|
3232
|
-
}
|
|
3233
|
-
async givenThat(subject, testResource, artifactory, initializer, initialValues, pm) {
|
|
3234
|
-
return fullAdapter.beforeEach(
|
|
3235
|
-
subject,
|
|
3236
|
-
initializer,
|
|
3237
|
-
testResource,
|
|
3238
|
-
initialValues,
|
|
3239
|
-
pm
|
|
3240
|
-
);
|
|
3241
|
-
}
|
|
3242
|
-
afterEach(store, key, artifactory, pm) {
|
|
3243
|
-
return new Promise(
|
|
3244
|
-
(res) => res(fullAdapter.afterEach(store, key, pm))
|
|
3245
|
-
);
|
|
3246
|
-
}
|
|
3247
|
-
},
|
|
3248
|
-
class When extends BaseWhen {
|
|
3249
|
-
async andWhen(store, whenCB, testResource, pm) {
|
|
3250
|
-
return await fullAdapter.andWhen(store, whenCB, testResource, pm);
|
|
3251
|
-
}
|
|
3252
|
-
},
|
|
3253
|
-
class Then extends BaseThen {
|
|
3254
|
-
async butThen(store, thenCB, testResource, pm) {
|
|
3255
|
-
return await fullAdapter.butThen(store, thenCB, testResource, pm);
|
|
3256
|
-
}
|
|
3257
|
-
},
|
|
3258
|
-
testResourceRequirement
|
|
3259
|
-
);
|
|
3260
|
-
}
|
|
3261
|
-
};
|
|
3262
|
-
|
|
3263
|
-
// src/Web.ts
|
|
3264
|
-
var WebTesteranto = class extends TesterantoCore {
|
|
3265
|
-
constructor(input, testSpecification, testImplementation, testResourceRequirement, testAdapter) {
|
|
3266
|
-
super(
|
|
3267
|
-
input,
|
|
3268
|
-
testSpecification,
|
|
3269
|
-
testImplementation,
|
|
3270
|
-
testResourceRequirement,
|
|
3271
|
-
testAdapter,
|
|
3272
|
-
(cb) => {
|
|
3273
|
-
}
|
|
3274
|
-
);
|
|
3275
|
-
}
|
|
3276
|
-
async receiveTestResourceConfig(partialTestResource) {
|
|
3277
|
-
const t = partialTestResource;
|
|
3278
|
-
const pm = new PM_Web(t);
|
|
3279
|
-
return await this.testJobs[0].receiveTestResourceConfig(pm);
|
|
3280
|
-
}
|
|
3281
|
-
};
|
|
3282
|
-
var Web_default = async (input, testSpecification, testImplementation, testAdapter, testResourceRequirement = defaultTestResourceRequirement) => {
|
|
3283
|
-
return new WebTesteranto(
|
|
3284
|
-
input,
|
|
3285
|
-
testSpecification,
|
|
3286
|
-
testImplementation,
|
|
3287
|
-
testResourceRequirement,
|
|
3288
|
-
testAdapter
|
|
3289
|
-
);
|
|
3290
|
-
};
|
|
3291
|
-
|
|
3292
|
-
export {
|
|
3293
|
-
__commonJS,
|
|
3294
|
-
__toESM,
|
|
3295
|
-
init_dirname,
|
|
3296
|
-
process_exports,
|
|
3297
|
-
init_process2 as init_process,
|
|
3298
|
-
Buffer2 as Buffer,
|
|
3299
|
-
init_buffer2 as init_buffer,
|
|
3300
|
-
BaseGiven,
|
|
3301
|
-
BaseWhen,
|
|
3302
|
-
BaseThen,
|
|
3303
|
-
BaseBuilder,
|
|
3304
|
-
BaseSuite,
|
|
3305
|
-
Web_default
|
|
3306
|
-
};
|
|
3307
|
-
/*! Bundled license information:
|
|
3308
|
-
|
|
3309
|
-
@jspm/core/nodelibs/browser/chunk-DtuTasat.js:
|
|
3310
|
-
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
3311
|
-
*/
|