@iota-uz/sdk 0.46.0 → 0.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/client-host/identity.d.ts +4 -4
- package/dist/client-host/identity.js +2 -2
- package/dist/lens/{CascadePanel-Bha4qY7J.js → CascadePanel-BlYJd18G.js} +1 -1
- package/dist/lens/{ChartDataEquivalent-Bwgn4yYB.js → ChartDataEquivalent-B6xSOdzC.js} +1 -1
- package/dist/lens/{ChartPanel-BZpzBuwl.js → ChartPanel-BIJjrs5D.js} +159 -159
- package/dist/lens/{CoveragePanel-D40AuKkD.js → CoveragePanel-CHtXDMtt.js} +1 -1
- package/dist/lens/{GaugePanel-C9k2TuJH.js → GaugePanel-By0TOJPa.js} +1 -1
- package/dist/lens/LensDashboard.d.ts +13 -0
- package/dist/lens/LensDashboard.d.ts.map +1 -1
- package/dist/lens/{MapPanel-ZYxfDsPM.js → MapPanel-Cw4ELCiM.js} +3 -3
- package/dist/lens/{MetricFlowPanel-CmESLoLK.js → MetricFlowPanel-Gr5wi3nI.js} +2 -2
- package/dist/lens/{MetricHierarchyPanel-UZVuJ5P2.js → MetricHierarchyPanel-VLA_5LXX.js} +2 -2
- package/dist/lens/{MetricRelationshipPanel-CXLdScAy.js → MetricRelationshipPanel-DFP566_c.js} +2 -2
- package/dist/lens/{PrintReport-lrfdCTZO.js → PrintReport-C0OV1iHP.js} +5 -5
- package/dist/lens/{QualityChip-BYz-DHfs.js → QualityChip-DTi-0jdh.js} +1 -1
- package/dist/lens/SaveInvestigation-CX1Abyl8.js +309 -0
- package/dist/lens/TablePanel-BusKU7cU.js +994 -0
- package/dist/lens/{adapter-CeAqYWqm.js → adapter-CQg4-M7p.js} +7 -7
- package/dist/lens/contract/schemas.d.ts +2 -0
- package/dist/lens/contract/schemas.d.ts.map +1 -1
- package/dist/lens/contract/types.d.ts +12 -0
- package/dist/lens/contract/types.d.ts.map +1 -1
- package/dist/lens/{dashboardEdit-DKVE_6J_.js → dashboardEdit-CJgCVfi_.js} +1 -1
- package/dist/lens/explore/DrillOverlay.d.ts +38 -0
- package/dist/lens/explore/DrillOverlay.d.ts.map +1 -1
- package/dist/lens/explore/ExplorePanel.d.ts.map +1 -1
- package/dist/lens/explore/SaveInvestigation.d.ts +21 -0
- package/dist/lens/explore/SaveInvestigation.d.ts.map +1 -0
- package/dist/lens/explore/drillHost.d.ts +25 -0
- package/dist/lens/explore/drillHost.d.ts.map +1 -0
- package/dist/lens/explore/investigation.d.ts +174 -0
- package/dist/lens/explore/investigation.d.ts.map +1 -0
- package/dist/lens/explore/provenanceLabels.d.ts +10 -0
- package/dist/lens/explore/provenanceLabels.d.ts.map +1 -0
- package/dist/lens/index-DR7Hf8Km.js +19805 -0
- package/dist/lens/{index-DkVTXC8W.js → index-DZFw4cqF.js} +1 -1
- package/dist/lens/index.d.ts +7 -1
- package/dist/lens/index.d.ts.map +1 -1
- package/dist/lens/index.js +67 -53
- package/dist/lens/{install-CQ_iMuAE.js → install-B2lTK6uo.js} +1 -1
- package/dist/lens/{install-Ch0_qifK.js → install-BXr4Mnc0.js} +1 -1
- package/dist/lens/{install-CKmxqMe1.js → install-CicNQ_ks.js} +1 -1
- package/dist/lens/{install-BwD_xNlp.js → install-d8A0WPiw.js} +1 -1
- package/dist/lens/{keys-BBmWdfaH.js → keys-C-Akc9lZ.js} +2 -2
- package/dist/lens/panels/ChartPanel.d.ts.map +1 -1
- package/dist/lens/panels/TablePanel.d.ts.map +1 -1
- package/dist/lens/panels/actions.d.ts.map +1 -1
- package/dist/lens/panels/panelFailure.d.ts.map +1 -1
- package/dist/lens/{prefetch-BXoUIIgq.js → prefetch-C9kxuIs8.js} +2 -2
- package/dist/lens/{prefetchPanels-a-zs_bDm.js → prefetchPanels-gbY9RIqL.js} +1 -1
- package/dist/lens/{print-CpgWJxDG.js → print-CllsAP3d.js} +1 -1
- package/dist/lens/reports/ReportCompositionEditor.d.ts +8 -2
- package/dist/lens/reports/ReportCompositionEditor.d.ts.map +1 -1
- package/dist/lens/reports/ReportDefinitionEditor.d.ts +54 -0
- package/dist/lens/reports/ReportDefinitionEditor.d.ts.map +1 -0
- package/dist/lens/reports/ReportPicker.d.ts +6 -0
- package/dist/lens/reports/ReportPicker.d.ts.map +1 -1
- package/dist/lens/reports/dashboardEdit.d.ts +3 -0
- package/dist/lens/reports/dashboardEdit.d.ts.map +1 -1
- package/dist/lens/reports/editing.d.ts +35 -0
- package/dist/lens/reports/editing.d.ts.map +1 -1
- package/dist/lens/reports/picker.d.ts +4 -1
- package/dist/lens/reports/picker.d.ts.map +1 -1
- package/dist/lens/runtime/index.d.ts +0 -1
- package/dist/lens/runtime/index.d.ts.map +1 -1
- package/dist/lens/runtime/messages.d.ts +2 -2
- package/dist/lens/runtime/messages.d.ts.map +1 -1
- package/dist/lens/runtime/provider.d.ts +5 -1
- package/dist/lens/runtime/provider.d.ts.map +1 -1
- package/dist/lens/runtime/returnContext.d.ts +62 -0
- package/dist/lens/runtime/returnContext.d.ts.map +1 -0
- package/dist/lens/runtime/tableSummary.d.ts +9 -0
- package/dist/lens/runtime/tableSummary.d.ts.map +1 -0
- package/dist/lens/{scales-BLf9OweG.js → scales-CO6Q9RtG.js} +1 -1
- package/dist/lens/style.css +1 -1
- package/dist/runtime/README.md +24 -0
- package/dist/runtime/assert.d.ts +51 -0
- package/dist/runtime/assert.js +172 -0
- package/dist/runtime/build/README.txt +1 -0
- package/dist/runtime/build/extract.mjs +342 -0
- package/dist/runtime/build/shared-exports.json +388 -0
- package/dist/runtime/build/test-child.mjs +136 -0
- package/dist/runtime/build/theme/tailwind.config.js +121 -0
- package/dist/runtime/build/theme/theme.css +462 -0
- package/dist/runtime/build/theme/utilities.css +1 -0
- package/dist/runtime/build/vendor/lib/lib.d.ts +22 -0
- package/dist/runtime/build/vendor/lib/lib.decorators.d.ts +384 -0
- package/dist/runtime/build/vendor/lib/lib.decorators.legacy.d.ts +22 -0
- package/dist/runtime/build/vendor/lib/lib.dom.asynciterable.d.ts +41 -0
- package/dist/runtime/build/vendor/lib/lib.dom.d.ts +28983 -0
- package/dist/runtime/build/vendor/lib/lib.dom.iterable.d.ts +491 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.collection.d.ts +147 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.core.d.ts +597 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.d.ts +28 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.generator.d.ts +77 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.iterable.d.ts +590 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.promise.d.ts +81 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.proxy.d.ts +128 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.reflect.d.ts +144 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.symbol.d.ts +46 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- package/dist/runtime/build/vendor/lib/lib.es2016.array.include.d.ts +116 -0
- package/dist/runtime/build/vendor/lib/lib.es2016.d.ts +21 -0
- package/dist/runtime/build/vendor/lib/lib.es2016.full.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.es2016.intl.d.ts +31 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.arraybuffer.d.ts +21 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.d.ts +26 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.date.d.ts +31 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.full.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.intl.d.ts +44 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.object.d.ts +49 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.sharedmemory.d.ts +135 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.string.d.ts +45 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.typedarrays.d.ts +53 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.asynciterable.d.ts +53 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.intl.d.ts +83 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.promise.d.ts +30 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.regexp.d.ts +37 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.array.d.ts +79 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.intl.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.object.d.ts +33 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.string.d.ts +37 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.symbol.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.bigint.d.ts +731 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.d.ts +27 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.date.d.ts +42 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.intl.d.ts +474 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.number.d.ts +28 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.promise.d.ts +47 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.sharedmemory.d.ts +99 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.string.d.ts +44 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.intl.d.ts +166 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.promise.d.ts +48 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.string.d.ts +33 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.weakref.d.ts +78 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.array.d.ts +121 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.d.ts +25 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.error.d.ts +75 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.intl.d.ts +121 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.object.d.ts +26 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.regexp.d.ts +39 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.string.d.ts +25 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.array.d.ts +924 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.collection.d.ts +21 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.d.ts +22 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.intl.d.ts +56 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.arraybuffer.d.ts +65 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.collection.d.ts +29 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.d.ts +26 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.object.d.ts +29 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.promise.d.ts +35 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.regexp.d.ts +25 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.sharedmemory.d.ts +68 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.string.d.ts +29 -0
- package/dist/runtime/build/vendor/lib/lib.es5.d.ts +4585 -0
- package/dist/runtime/build/vendor/lib/lib.es6.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.array.d.ts +35 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.collection.d.ts +96 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.d.ts +25 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.decorators.d.ts +28 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.disposable.d.ts +193 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.intl.d.ts +21 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.iterator.d.ts +148 -0
- package/dist/runtime/build/vendor/node-types/assert/strict.d.ts +111 -0
- package/dist/runtime/build/vendor/node-types/assert.d.ts +1115 -0
- package/dist/runtime/build/vendor/node-types/async_hooks.d.ts +619 -0
- package/dist/runtime/build/vendor/node-types/buffer.buffer.d.ts +477 -0
- package/dist/runtime/build/vendor/node-types/buffer.d.ts +1941 -0
- package/dist/runtime/build/vendor/node-types/child_process.d.ts +1480 -0
- package/dist/runtime/build/vendor/node-types/cluster.d.ts +578 -0
- package/dist/runtime/build/vendor/node-types/compatibility/iterators.d.ts +21 -0
- package/dist/runtime/build/vendor/node-types/console.d.ts +453 -0
- package/dist/runtime/build/vendor/node-types/constants.d.ts +21 -0
- package/dist/runtime/build/vendor/node-types/crypto.d.ts +5484 -0
- package/dist/runtime/build/vendor/node-types/dgram.d.ts +715 -0
- package/dist/runtime/build/vendor/node-types/diagnostics_channel.d.ts +576 -0
- package/dist/runtime/build/vendor/node-types/dns/promises.d.ts +503 -0
- package/dist/runtime/build/vendor/node-types/dns.d.ts +923 -0
- package/dist/runtime/build/vendor/node-types/domain.d.ts +166 -0
- package/dist/runtime/build/vendor/node-types/events.d.ts +967 -0
- package/dist/runtime/build/vendor/node-types/fs/promises.d.ts +1354 -0
- package/dist/runtime/build/vendor/node-types/fs.d.ts +4777 -0
- package/dist/runtime/build/vendor/node-types/globals.d.ts +170 -0
- package/dist/runtime/build/vendor/node-types/globals.typedarray.d.ts +41 -0
- package/dist/runtime/build/vendor/node-types/http.d.ts +2246 -0
- package/dist/runtime/build/vendor/node-types/http2.d.ts +2882 -0
- package/dist/runtime/build/vendor/node-types/https.d.ts +585 -0
- package/dist/runtime/build/vendor/node-types/index.d.ts +101 -0
- package/dist/runtime/build/vendor/node-types/inspector.d.ts +323 -0
- package/dist/runtime/build/vendor/node-types/inspector.generated.d.ts +4406 -0
- package/dist/runtime/build/vendor/node-types/module.d.ts +844 -0
- package/dist/runtime/build/vendor/node-types/net.d.ts +1197 -0
- package/dist/runtime/build/vendor/node-types/os.d.ts +507 -0
- package/dist/runtime/build/vendor/node-types/package.json +140 -0
- package/dist/runtime/build/vendor/node-types/path.d.ts +200 -0
- package/dist/runtime/build/vendor/node-types/perf_hooks.d.ts +1054 -0
- package/dist/runtime/build/vendor/node-types/process.d.ts +2101 -0
- package/dist/runtime/build/vendor/node-types/punycode.d.ts +117 -0
- package/dist/runtime/build/vendor/node-types/querystring.d.ts +152 -0
- package/dist/runtime/build/vendor/node-types/readline/promises.d.ts +161 -0
- package/dist/runtime/build/vendor/node-types/readline.d.ts +600 -0
- package/dist/runtime/build/vendor/node-types/repl.d.ts +438 -0
- package/dist/runtime/build/vendor/node-types/sea.d.ts +162 -0
- package/dist/runtime/build/vendor/node-types/sqlite.d.ts +1182 -0
- package/dist/runtime/build/vendor/node-types/stream/consumers.d.ts +45 -0
- package/dist/runtime/build/vendor/node-types/stream/promises.d.ts +90 -0
- package/dist/runtime/build/vendor/node-types/stream/web.d.ts +596 -0
- package/dist/runtime/build/vendor/node-types/stream.d.ts +1707 -0
- package/dist/runtime/build/vendor/node-types/string_decoder.d.ts +67 -0
- package/dist/runtime/build/vendor/node-types/test.d.ts +2656 -0
- package/dist/runtime/build/vendor/node-types/timers/promises.d.ts +108 -0
- package/dist/runtime/build/vendor/node-types/timers.d.ts +285 -0
- package/dist/runtime/build/vendor/node-types/tls.d.ts +1314 -0
- package/dist/runtime/build/vendor/node-types/trace_events.d.ts +197 -0
- package/dist/runtime/build/vendor/node-types/ts5.6/buffer.buffer.d.ts +473 -0
- package/dist/runtime/build/vendor/node-types/ts5.6/compatibility/float16array.d.ts +71 -0
- package/dist/runtime/build/vendor/node-types/ts5.6/globals.typedarray.d.ts +36 -0
- package/dist/runtime/build/vendor/node-types/ts5.6/index.d.ts +103 -0
- package/dist/runtime/build/vendor/node-types/ts5.7/compatibility/float16array.d.ts +72 -0
- package/dist/runtime/build/vendor/node-types/ts5.7/index.d.ts +103 -0
- package/dist/runtime/build/vendor/node-types/tty.d.ts +209 -0
- package/dist/runtime/build/vendor/node-types/url.d.ts +1103 -0
- package/dist/runtime/build/vendor/node-types/util.d.ts +2379 -0
- package/dist/runtime/build/vendor/node-types/v8.d.ts +1010 -0
- package/dist/runtime/build/vendor/node-types/vm.d.ts +1160 -0
- package/dist/runtime/build/vendor/node-types/wasi.d.ts +202 -0
- package/dist/runtime/build/vendor/node-types/web-globals/abortcontroller.d.ts +34 -0
- package/dist/runtime/build/vendor/node-types/web-globals/crypto.d.ts +32 -0
- package/dist/runtime/build/vendor/node-types/web-globals/domexception.d.ts +68 -0
- package/dist/runtime/build/vendor/node-types/web-globals/events.d.ts +97 -0
- package/dist/runtime/build/vendor/node-types/web-globals/fetch.d.ts +62 -0
- package/dist/runtime/build/vendor/node-types/web-globals/navigator.d.ts +25 -0
- package/dist/runtime/build/vendor/node-types/web-globals/storage.d.ts +24 -0
- package/dist/runtime/build/vendor/node-types/web-globals/streams.d.ts +22 -0
- package/dist/runtime/build/vendor/node-types/worker_threads.d.ts +894 -0
- package/dist/runtime/build/vendor/node-types/zlib.d.ts +768 -0
- package/dist/runtime/build/vendor/node_modules/csstype/LICENSE +19 -0
- package/dist/runtime/build/vendor/node_modules/csstype/index.d.ts +22569 -0
- package/dist/runtime/build/vendor/node_modules/csstype/index.js.flow +6863 -0
- package/dist/runtime/build/vendor/node_modules/csstype/package.json +70 -0
- package/dist/runtime/build/vendor/node_modules/seroval/LICENSE +7 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/cjs/development/index.cjs +4232 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/cjs/production/index.cjs +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/esm/development/index.mjs +4209 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/esm/production/index.mjs +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/Serializer.d.ts +28 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/base-primitives.d.ts +28 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/compat.d.ts +15 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/constants.d.ts +105 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/constructors.d.ts +50 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/async-parser.d.ts +20 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/deserializer.d.ts +52 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/parser.d.ts +62 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/serializer.d.ts +103 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/sync-parser.d.ts +61 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/cross/index.d.ts +24 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/errors.d.ts +47 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/function-string.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/keys.d.ts +4 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/literals.d.ts +10 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/node.d.ts +8 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/opaque-reference.d.ts +9 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/plugin.d.ts +52 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/reference.d.ts +6 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/sequence.d.ts +11 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/special-reference.d.ts +16 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/stream.d.ts +17 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/string.d.ts +4 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/symbols.d.ts +14 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/tree/index.d.ts +21 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/types.d.ts +233 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/error.d.ts +6 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/get-identifier.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/get-object-flag.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/is-valid-identifier.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/promise-to-result.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/typed-array.d.ts +6 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/valid-properties.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/index.d.ts +18 -0
- package/dist/runtime/build/vendor/node_modules/seroval/package.json +67 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/Serializer.ts +119 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/base-primitives.ts +537 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/compat.ts +23 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/constants.ts +202 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/constructors.ts +265 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/async-parser.ts +666 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/deserializer.ts +832 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/parser.ts +335 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/serializer.ts +1524 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/sync-parser.ts +943 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/cross/index.ts +190 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/errors.ts +196 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/function-string.ts +31 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/keys.ts +17 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/literals.ts +43 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/node.ts +40 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/opaque-reference.ts +9 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/plugin.ts +105 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/reference.ts +66 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/sequence.ts +59 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/special-reference.ts +42 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/stream.ts +71 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/string.ts +86 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/symbols.ts +20 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/tree/index.ts +134 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/types.ts +377 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/error.ts +73 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/get-identifier.ts +18 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/get-object-flag.ts +14 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/is-valid-identifier.ts +12 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/promise-to-result.ts +9 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/typed-array.ts +56 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/valid-properties.ts +34 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/index.ts +36 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/LICENSE +7 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/cjs/development/web.cjs +826 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/cjs/production/web.cjs +1 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/esm/development/web.mjs +803 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/esm/production/web.mjs +1 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/abort-signal.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/blob.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/custom-event.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/dom-exception.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/event.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/file.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/form-data.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/headers.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/image-data.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/index.d.ts +15 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/readable-stream.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/request.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/response.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/url-search-params.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/url.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/package.json +70 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/abort-signal.ts +131 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/blob.ts +41 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/custom-event.ts +66 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/dom-exception.ts +57 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/event.ts +62 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/file.ts +50 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/form-data.ts +105 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/headers.ts +49 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/image-data.ts +74 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/index.ts +14 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/readable-stream.ts +148 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/request.ts +82 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/response.ts +65 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/url-search-params.ts +40 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/url.ts +37 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/dist/server.cjs +824 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/dist/server.js +770 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/dist/solid.cjs +1808 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/dist/solid.js +1753 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/jsx-runtime.d.ts +1 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/package.json +243 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/server.cjs +133 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/server.js +121 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/store.cjs +463 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/store.js +454 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/package.json +46 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/index.d.ts +12 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/modifiers.d.ts +6 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/mutable.d.ts +5 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/server.d.ts +17 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/store.d.ts +108 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/index.d.ts +23 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/jsx.d.ts +4253 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/array.d.ts +44 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/observable.d.ts +36 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/scheduler.d.ts +10 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/signal.d.ts +581 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/Suspense.d.ts +26 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/component.d.ts +111 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/flow.d.ts +118 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/hydration.d.ts +24 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/index.d.ts +4 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/server/index.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/server/reactive.d.ts +98 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/server/rendering.d.ts +160 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/server.cjs +900 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/server.js +786 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/web.cjs +884 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/web.js +772 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/package.json +46 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/dist/storage.cjs +12 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/dist/storage.js +10 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/package.json +15 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/types/index.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/client.d.ts +93 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/core.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/index.d.ts +50 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/jsx.d.ts +1 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/server-mock.d.ts +65 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/server.d.ts +187 -0
- package/dist/runtime/build/worker.mjs +293415 -0
- package/dist/runtime/catalog/sdk-natives.json +655 -0
- package/dist/runtime/cli/iota-ext.mjs +1028 -0
- package/dist/runtime/client-host/entry.d.ts +10 -0
- package/dist/runtime/client-host/entry.js +124 -0
- package/dist/runtime/client-host/hooks.d.ts +43 -0
- package/dist/runtime/client-host/hooks.js +94 -0
- package/dist/runtime/client-host/index.d.ts +9 -0
- package/dist/runtime/client-host/index.js +9 -0
- package/dist/runtime/client-host/islands.d.ts +44 -0
- package/dist/runtime/client-host/islands.js +165 -0
- package/dist/runtime/client-host/kit.d.ts +10 -0
- package/dist/runtime/client-host/kit.js +37 -0
- package/dist/runtime/client-host/page.d.ts +53 -0
- package/dist/runtime/client-host/page.js +217 -0
- package/dist/runtime/client-host/params.d.ts +8 -0
- package/dist/runtime/client-host/params.js +36 -0
- package/dist/runtime/client-host/protocol.d.ts +78 -0
- package/dist/runtime/client-host/protocol.js +26 -0
- package/dist/runtime/client-host/shared.d.ts +12 -0
- package/dist/runtime/client-host/shared.js +49 -0
- package/dist/runtime/client-host/shell.d.ts +88 -0
- package/dist/runtime/client-host/shell.js +195 -0
- package/dist/runtime/client-host/slots.d.ts +54 -0
- package/dist/runtime/client-host/slots.js +90 -0
- package/dist/runtime/client-host/styles.d.ts +7 -0
- package/dist/runtime/client-host/styles.js +61 -0
- package/dist/runtime/client-host/transport.d.ts +45 -0
- package/dist/runtime/client-host/transport.js +115 -0
- package/dist/runtime/client.d.ts +226 -0
- package/dist/runtime/client.js +121 -0
- package/dist/runtime/contracts.d.ts +204 -0
- package/dist/runtime/contracts.js +195 -0
- package/dist/runtime/docs/authoring.md +1609 -0
- package/dist/runtime/docs/example/docs/en/admin/limits.md +10 -0
- package/dist/runtime/docs/example/docs/en/getting-started.md +13 -0
- package/dist/runtime/docs/example/docs/en/points.md +9 -0
- package/dist/runtime/docs/example/docs/ru/getting-started.md +12 -0
- package/dist/runtime/docs/example/package.json +27 -0
- package/dist/runtime/docs/example/src/ClientScreen.tsx +10 -0
- package/dist/runtime/docs/example/src/RedemptionScreen.tsx +7 -0
- package/dist/runtime/docs/example/src/RewardsScreen.module.css +13 -0
- package/dist/runtime/docs/example/src/RewardsScreen.tsx +51 -0
- package/dist/runtime/docs/example/src/client.tsx +40 -0
- package/dist/runtime/docs/example/src/contracts.ts +132 -0
- package/dist/runtime/docs/example/src/css-modules.d.ts +5 -0
- package/dist/runtime/docs/example/src/server.test.ts +156 -0
- package/dist/runtime/docs/example/src/server.ts +188 -0
- package/dist/runtime/docs/example/tsconfig.json +16 -0
- package/dist/runtime/entity.d.ts +237 -0
- package/dist/runtime/entity.js +201 -0
- package/dist/runtime/fakes.d.ts +80 -0
- package/dist/runtime/fakes.js +88 -0
- package/dist/runtime/fixtures.d.ts +34 -0
- package/dist/runtime/fixtures.js +60 -0
- package/dist/runtime/help.d.ts +22 -0
- package/dist/runtime/help.js +51 -0
- package/dist/runtime/host/context.mjs +392 -0
- package/dist/runtime/host/errors.mjs +64 -0
- package/dist/runtime/host/loader.mjs +28 -0
- package/dist/runtime/host/protocol.mjs +4 -0
- package/dist/runtime/host/register.mjs +8 -0
- package/dist/runtime/host/sdk/assert.mjs +153 -0
- package/dist/runtime/host/sdk/client-host/hooks.mjs +86 -0
- package/dist/runtime/host/sdk/client-host/protocol.mjs +30 -0
- package/dist/runtime/host/sdk/client-host/slots.mjs +82 -0
- package/dist/runtime/host/sdk/client-host/styles.mjs +45 -0
- package/dist/runtime/host/sdk/client-host/transport.mjs +102 -0
- package/dist/runtime/host/sdk/client.mjs +115 -0
- package/dist/runtime/host/sdk/contracts.mjs +185 -0
- package/dist/runtime/host/sdk/entity.mjs +183 -0
- package/dist/runtime/host/sdk/fakes.mjs +88 -0
- package/dist/runtime/host/sdk/fixtures.mjs +56 -0
- package/dist/runtime/host/sdk/help.mjs +37 -0
- package/dist/runtime/host/sdk/index.mjs +83 -0
- package/dist/runtime/host/sdk/kit.mjs +11 -0
- package/dist/runtime/host/sdk/manifest.mjs +276 -0
- package/dist/runtime/host/sdk/model.mjs +4 -0
- package/dist/runtime/host/sdk/resource.mjs +34 -0
- package/dist/runtime/host/sdk/schema.mjs +75 -0
- package/dist/runtime/host/sdk/server.mjs +43 -0
- package/dist/runtime/host/sdk/testhost.mjs +992 -0
- package/dist/runtime/host/sdk/testing.mjs +21 -0
- package/dist/runtime/host/sdk/wire.mjs +207 -0
- package/dist/runtime/host/worker.mjs +252 -0
- package/dist/runtime/index.d.ts +10 -0
- package/dist/runtime/index.js +5 -0
- package/dist/runtime/kit.d.ts +5 -0
- package/dist/runtime/kit.js +14 -0
- package/dist/runtime/manifest.d.ts +17 -0
- package/dist/runtime/manifest.js +323 -0
- package/dist/runtime/model.d.ts +224 -0
- package/dist/runtime/model.js +3 -0
- package/dist/runtime/resource.d.ts +31 -0
- package/dist/runtime/resource.js +35 -0
- package/dist/runtime/schema.d.ts +97 -0
- package/dist/runtime/schema.js +73 -0
- package/dist/runtime/server.d.ts +445 -0
- package/dist/runtime/server.js +41 -0
- package/dist/runtime/testhost.d.ts +216 -0
- package/dist/runtime/testhost.js +1146 -0
- package/dist/runtime/testing.d.ts +10 -0
- package/dist/runtime/testing.js +7 -0
- package/dist/runtime/wire.d.ts +26 -0
- package/dist/runtime/wire.js +236 -0
- package/dist/sdk-identity.cjs +3 -3
- package/dist/sdk-identity.js +3 -3
- package/dist/sdk-identity.json +2 -2
- package/dist/solid-ui/embedded-css.d.ts +2 -0
- package/dist/solid-ui/embedded-css.js +1 -0
- package/dist/solid-ui/embedded.css +2 -0
- package/dist/testing/components.d.ts +73 -0
- package/dist/testing/components.js +96 -0
- package/dist/testing/htmx.d.ts +44 -0
- package/dist/testing/htmx.js +284 -0
- package/dist/testing/index.d.ts +4 -41
- package/dist/testing/index.js +3 -206
- package/dist/testing/scenarios.d.ts +83 -0
- package/dist/testing/scenarios.js +74 -0
- package/dist/testing/wait.d.ts +7 -0
- package/dist/testing/wait.js +19 -0
- package/package.json +33 -2
- package/dist/lens/TablePanel-C09tzJOL.js +0 -980
- package/dist/lens/index-DcVtZneD.js +0 -18473
- package/dist/lens/runtime/recovery.d.ts +0 -26
- package/dist/lens/runtime/recovery.d.ts.map +0 -1
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import { MANIFEST_SCHEMA } from "./model.js";
|
|
2
|
+
import { isBranded, isContract, isKitIssued } from "./resource.js";
|
|
3
|
+
export class ManifestError extends Error {
|
|
4
|
+
problems;
|
|
5
|
+
constructor(problems) {
|
|
6
|
+
super(`invalid extension package:\n${problems.map((p) => ` - ${p}`).join('\n')}`);
|
|
7
|
+
this.name = 'ManifestError';
|
|
8
|
+
this.problems = problems;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const NAMESPACE_PATTERN = /^[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)*$/;
|
|
12
|
+
const ID_PATTERN = /^[a-z][a-z0-9]*(\.[a-z][a-zA-Z0-9_]*)+$/;
|
|
13
|
+
const CRON_PATTERN = /^(@[a-z]+|\S+(\s+\S+){4})$/;
|
|
14
|
+
const CLIENT_KINDS = new Set(['page', 'navigation', 'slot', 'cell', 'shell']);
|
|
15
|
+
const CHANNELS = ['sms', 'email', 'inApp', 'push'];
|
|
16
|
+
const IMPLEMENTABLE = {
|
|
17
|
+
operation: () => 'operation',
|
|
18
|
+
command: (c) => (c.atomic === true ? 'atomic' : 'command'),
|
|
19
|
+
query: () => 'query',
|
|
20
|
+
workflow: () => 'workflow',
|
|
21
|
+
contactResolver: () => 'contactResolver',
|
|
22
|
+
deliveryPolicy: () => 'deliveryPolicy',
|
|
23
|
+
};
|
|
24
|
+
function typeRefs(type, out) {
|
|
25
|
+
if (!type)
|
|
26
|
+
return;
|
|
27
|
+
if (type.kind === 'ref' && type.entity)
|
|
28
|
+
out.push(type.entity);
|
|
29
|
+
type.properties?.forEach((p) => typeRefs(p.type, out));
|
|
30
|
+
typeRefs(type.items, out);
|
|
31
|
+
}
|
|
32
|
+
function referencedIds(r) {
|
|
33
|
+
const out = [];
|
|
34
|
+
r.fields?.forEach((f) => typeRefs(f.type, out));
|
|
35
|
+
for (const t of [r.input, r.output, r.params, r.payload, r.props])
|
|
36
|
+
typeRefs(t, out);
|
|
37
|
+
Object.values(r.signals ?? {}).forEach((t) => typeRefs(t, out));
|
|
38
|
+
out.push(...(r.errors ?? []));
|
|
39
|
+
for (const id of [r.base, r.subject, r.permission, r.route, r.overlay])
|
|
40
|
+
if (id)
|
|
41
|
+
out.push(id);
|
|
42
|
+
if ((r.kind === 'slot' || r.kind === 'cell') && r.target)
|
|
43
|
+
out.push(r.target);
|
|
44
|
+
return out;
|
|
45
|
+
}
|
|
46
|
+
/** Inside-package navigation references must resolve; ones pointing at core or other packages are checked at activation. */
|
|
47
|
+
function checkNavigation(resources, namespace, inPackage, problems) {
|
|
48
|
+
const ids = new Set(resources.map((r) => r.id));
|
|
49
|
+
const groups = new Set(resources.flatMap((r) => (r.kind === 'navigation' ? (r.groups ?? []).map((g) => g.id) : [])));
|
|
50
|
+
const known = (id) => ids.has(id) || groups.has(id);
|
|
51
|
+
for (const r of resources) {
|
|
52
|
+
const where = `resource "${r.id}"`;
|
|
53
|
+
if (r.nav?.group && inPackage(r.nav.group) && !groups.has(r.nav.group)) {
|
|
54
|
+
problems.push(`${where}: nav.group "${r.nav.group}" is not declared by a navigation(...) groups entry of "${namespace}"`);
|
|
55
|
+
}
|
|
56
|
+
if (r.nav?.parent && inPackage(r.nav.parent) && !known(r.nav.parent)) {
|
|
57
|
+
problems.push(`${where}: nav.parent "${r.nav.parent}" is not a page or group of "${namespace}"`);
|
|
58
|
+
}
|
|
59
|
+
for (const entry of r.palette ?? []) {
|
|
60
|
+
if (inPackage(entry.target) && !ids.has(entry.target)) {
|
|
61
|
+
problems.push(`${where}: palette entry "${entry.id}" targets "${entry.target}", which is not exported by "${namespace}"`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
for (const patch of r.patches ?? []) {
|
|
65
|
+
for (const id of [patch.ref, patch.parent]) {
|
|
66
|
+
if (id && inPackage(id) && !known(id))
|
|
67
|
+
problems.push(`${where}: nav patch references "${id}", which is not declared by "${namespace}"`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const lowerFirst = (name) => name.charAt(0).toLowerCase() + name.slice(1);
|
|
73
|
+
const MAX_SCAN_DEPTH = 6;
|
|
74
|
+
/** Finds a branded value hidden inside a plain object or array, e.g. `export const all = { Policy }`. */
|
|
75
|
+
function nestedBranded(value, seen = new Set(), depth = 0) {
|
|
76
|
+
if (typeof value !== 'object' || value === null || depth > MAX_SCAN_DEPTH || seen.has(value))
|
|
77
|
+
return undefined;
|
|
78
|
+
seen.add(value);
|
|
79
|
+
const proto = Object.getPrototypeOf(value);
|
|
80
|
+
if (!Array.isArray(value) && proto !== Object.prototype && proto !== null)
|
|
81
|
+
return undefined;
|
|
82
|
+
for (const [key, inner] of Object.entries(value)) {
|
|
83
|
+
if (isBranded(inner))
|
|
84
|
+
return key;
|
|
85
|
+
const found = nestedBranded(inner, seen, depth + 1);
|
|
86
|
+
if (found !== undefined)
|
|
87
|
+
return `${key}.${found}`;
|
|
88
|
+
}
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
91
|
+
/** Collects the manifest of a package, or throws a `ManifestError` listing every problem found. */
|
|
92
|
+
export function collectManifest(input) {
|
|
93
|
+
const problems = [];
|
|
94
|
+
const { namespace } = input;
|
|
95
|
+
const inPackage = (id) => id === namespace || id.startsWith(`${namespace}.`);
|
|
96
|
+
if (!NAMESPACE_PATTERN.test(namespace))
|
|
97
|
+
problems.push(`invalid namespace "${namespace}"`);
|
|
98
|
+
const owned = new Map(); // id → where it is declared
|
|
99
|
+
const claim = (id, where) => {
|
|
100
|
+
if (!ID_PATTERN.test(id)) {
|
|
101
|
+
problems.push(`${where}: invalid id "${id}"`);
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
if (!id.startsWith(`${namespace}.`)) {
|
|
105
|
+
problems.push(`${where}: id "${id}" is outside namespace "${namespace}"`);
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
const prior = owned.get(id);
|
|
109
|
+
if (prior !== undefined) {
|
|
110
|
+
problems.push(`${where}: id "${id}" is already declared by ${prior}`);
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
owned.set(id, where);
|
|
114
|
+
return true;
|
|
115
|
+
};
|
|
116
|
+
const resources = [];
|
|
117
|
+
const seen = new Set();
|
|
118
|
+
const declared = (id, where) => {
|
|
119
|
+
if (!resources.some((r) => r.id === id))
|
|
120
|
+
problems.push(`${where}: references "${id}" which is not exported by the contracts graph`);
|
|
121
|
+
};
|
|
122
|
+
/** A `foreign` contract belongs to the platform or another package and must come from the developer kit. */
|
|
123
|
+
const external = (c, where) => {
|
|
124
|
+
if (!isKitIssued(c))
|
|
125
|
+
problems.push(`${where}: "${c.id}" is marked foreign but was not issued by the developer kit`);
|
|
126
|
+
else if (inPackage(c.id))
|
|
127
|
+
problems.push(`${where}: kit contract "${c.id}" is inside this package's own namespace "${namespace}"`);
|
|
128
|
+
};
|
|
129
|
+
/** Referencing a contract: foreign ones must be kit-issued; own ones must be exported by the contracts graph. */
|
|
130
|
+
const reference = (c, where) => {
|
|
131
|
+
if (c.foreign)
|
|
132
|
+
external(c, where);
|
|
133
|
+
else if (!inPackage(c.id))
|
|
134
|
+
problems.push(`${where}: "${c.id}" is outside namespace "${namespace}"; contracts of other packages come from the developer kit`);
|
|
135
|
+
else
|
|
136
|
+
declared(c.id, where);
|
|
137
|
+
};
|
|
138
|
+
const collectResources = (graph, ns) => {
|
|
139
|
+
for (const [name, value] of Object.entries(ns)) {
|
|
140
|
+
const where = `${graph} export "${name}"`;
|
|
141
|
+
if (!isBranded(value)) {
|
|
142
|
+
const inner = nestedBranded(value);
|
|
143
|
+
if (inner !== undefined)
|
|
144
|
+
problems.push(`${where}: contains "${inner}"; export resources as top-level named exports`);
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
if (!isContract(value)) {
|
|
148
|
+
problems.push(`${where}: server value exported from the ${graph} graph`);
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
if (seen.has(value))
|
|
152
|
+
continue;
|
|
153
|
+
seen.add(value);
|
|
154
|
+
if (value.foreign) {
|
|
155
|
+
external(value, where);
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
// A slot declaration is a contract (other packages reference it through the kit); only contributions are client values.
|
|
159
|
+
const isClient = CLIENT_KINDS.has(value.kind) && !(value.kind === 'slot' && value.resource.target === undefined);
|
|
160
|
+
if (graph === 'contracts' && isClient) {
|
|
161
|
+
problems.push(`${where}: ${value.kind} belongs to the client graph`);
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (graph === 'client' && !isClient) {
|
|
165
|
+
problems.push(`${where}: ${value.kind} contract must be declared and exported from the contracts graph`);
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
const resource = { ...value.resource };
|
|
169
|
+
if (isClient) {
|
|
170
|
+
const implicit = value.implicitId;
|
|
171
|
+
if (implicit === 'export')
|
|
172
|
+
resource.id = `${namespace}.${lowerFirst(name)}`;
|
|
173
|
+
else if (implicit === 'navigation')
|
|
174
|
+
resource.id = `${namespace}.navigation`;
|
|
175
|
+
else if (implicit === 'shell')
|
|
176
|
+
resource.id = `${namespace}.shell`;
|
|
177
|
+
if (value.kind !== 'navigation')
|
|
178
|
+
resource.export = name;
|
|
179
|
+
}
|
|
180
|
+
if (claim(resource.id, where))
|
|
181
|
+
resources.push(resource);
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
collectResources('contracts', input.contracts);
|
|
185
|
+
collectResources('client', input.client);
|
|
186
|
+
for (const r of resources)
|
|
187
|
+
for (const id of referencedIds(r))
|
|
188
|
+
if (inPackage(id))
|
|
189
|
+
declared(id, `resource "${r.id}"`);
|
|
190
|
+
checkNavigation(resources, namespace, inPackage, problems);
|
|
191
|
+
const implementations = [];
|
|
192
|
+
const subscriptions = [];
|
|
193
|
+
const guards = [];
|
|
194
|
+
const templates = [];
|
|
195
|
+
const schedules = [];
|
|
196
|
+
const endpoints = [];
|
|
197
|
+
const implemented = new Map();
|
|
198
|
+
const templated = new Map();
|
|
199
|
+
for (const [name, value] of Object.entries(input.server)) {
|
|
200
|
+
const where = `server export "${name}"`;
|
|
201
|
+
if (!isBranded(value)) {
|
|
202
|
+
const inner = nestedBranded(value);
|
|
203
|
+
if (inner !== undefined)
|
|
204
|
+
problems.push(`${where}: contains "${inner}"; export resources as top-level named exports`);
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
if (isContract(value)) {
|
|
208
|
+
problems.push(`${where}: contract exported from the server graph; declare it in the contracts graph`);
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
if (seen.has(value))
|
|
212
|
+
continue;
|
|
213
|
+
seen.add(value);
|
|
214
|
+
const sv = value;
|
|
215
|
+
switch (sv.serverKind) {
|
|
216
|
+
case 'implementation': {
|
|
217
|
+
const c = sv.contract;
|
|
218
|
+
const kind = IMPLEMENTABLE[c.kind]?.(c);
|
|
219
|
+
if (kind === undefined) {
|
|
220
|
+
problems.push(`${where}: cannot implement contract "${c.id}" of kind "${c.kind}"`);
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
reference(c, where);
|
|
224
|
+
const prior = implemented.get(c.id);
|
|
225
|
+
if (prior !== undefined) {
|
|
226
|
+
problems.push(`${where}: "${c.id}" is already implemented by export "${prior}"`);
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
implemented.set(c.id, name);
|
|
230
|
+
implementations.push({ export: name, implements: c.id, kind });
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
case 'subscription': {
|
|
234
|
+
reference(sv.event, where);
|
|
235
|
+
if (claim(sv.id, where))
|
|
236
|
+
subscriptions.push({ id: sv.id, export: name, event: sv.event.id });
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
case 'guard': {
|
|
240
|
+
const g = sv;
|
|
241
|
+
const target = g.target;
|
|
242
|
+
const ok = (g.phase === 'input' && target.kind === 'command' && !target.atomic) ||
|
|
243
|
+
(g.phase === 'operation' && (target.kind === 'operation' || (target.kind === 'command' && target.atomic))) ||
|
|
244
|
+
(g.phase === 'write' && target.kind === 'entity');
|
|
245
|
+
if (!ok) {
|
|
246
|
+
problems.push(`${where}: ${g.phase} guard cannot target ${target.kind} "${target.id}"`);
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
reference(target, where);
|
|
250
|
+
if (claim(g.id, where))
|
|
251
|
+
guards.push({ id: g.id, export: name, target: target.id, phase: g.phase });
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
case 'templates': {
|
|
255
|
+
const channels = CHANNELS.filter((ch) => typeof sv.renderers[ch] === 'function');
|
|
256
|
+
const prior = templated.get(sv.notice.id);
|
|
257
|
+
if (prior !== undefined) {
|
|
258
|
+
problems.push(`${where}: notice "${sv.notice.id}" already has templates in export "${prior}"`);
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
if (channels.length === 0) {
|
|
262
|
+
problems.push(`${where}: templates for "${sv.notice.id}" define no channel`);
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
reference(sv.notice, where);
|
|
266
|
+
templated.set(sv.notice.id, name);
|
|
267
|
+
templates.push({ export: name, notice: sv.notice.id, channels });
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
case 'schedule': {
|
|
271
|
+
if (!CRON_PATTERN.test(sv.cron.trim()))
|
|
272
|
+
problems.push(`${where}: invalid cron "${sv.cron}"`);
|
|
273
|
+
else if (claim(sv.id, where)) {
|
|
274
|
+
schedules.push({ id: sv.id, export: name, cron: sv.cron.trim(), ...(sv.timezone ? { timezone: sv.timezone } : {}) });
|
|
275
|
+
}
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
case 'endpoint': {
|
|
279
|
+
if (!sv.spec.path.startsWith('/'))
|
|
280
|
+
problems.push(`${where}: endpoint path must start with "/"`);
|
|
281
|
+
else if (claim(sv.id, where)) {
|
|
282
|
+
endpoints.push({ id: sv.id, export: name, method: sv.spec.method, path: sv.spec.path, ...(sv.spec.public ? { public: true } : {}) });
|
|
283
|
+
}
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
default:
|
|
287
|
+
problems.push(`${where}: unknown server value`);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
if (problems.length > 0)
|
|
291
|
+
throw new ManifestError(problems);
|
|
292
|
+
const byId = (a, b) => a.id.localeCompare(b.id);
|
|
293
|
+
const byExport = (a, b) => a.export.localeCompare(b.export);
|
|
294
|
+
const manifest = {
|
|
295
|
+
schema: MANIFEST_SCHEMA,
|
|
296
|
+
namespace,
|
|
297
|
+
resources: resources.sort(byId),
|
|
298
|
+
};
|
|
299
|
+
if (implementations.length > 0)
|
|
300
|
+
manifest.implementations = implementations.sort(byExport);
|
|
301
|
+
if (subscriptions.length > 0)
|
|
302
|
+
manifest.subscriptions = subscriptions.sort(byId);
|
|
303
|
+
if (guards.length > 0)
|
|
304
|
+
manifest.guards = guards.sort(byId);
|
|
305
|
+
if (templates.length > 0)
|
|
306
|
+
manifest.templates = templates.sort(byExport);
|
|
307
|
+
if (schedules.length > 0)
|
|
308
|
+
manifest.schedules = schedules.sort(byId);
|
|
309
|
+
if (endpoints.length > 0)
|
|
310
|
+
manifest.endpoints = endpoints.sort(byId);
|
|
311
|
+
manifest.capabilities = capabilitiesOf(input.capabilities);
|
|
312
|
+
if (input.dependencies && Object.keys(input.dependencies).length > 0)
|
|
313
|
+
manifest.dependencies = { ...input.dependencies };
|
|
314
|
+
return manifest;
|
|
315
|
+
}
|
|
316
|
+
function capabilitiesOf(c) {
|
|
317
|
+
const out = {};
|
|
318
|
+
if (c?.network?.length)
|
|
319
|
+
out.network = [...c.network];
|
|
320
|
+
if (c?.secrets?.length)
|
|
321
|
+
out.secrets = [...c.secrets];
|
|
322
|
+
return out;
|
|
323
|
+
}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
export type Json = null | boolean | number | string | readonly Json[] | {
|
|
2
|
+
readonly [key: string]: Json | undefined;
|
|
3
|
+
};
|
|
4
|
+
/** A JSON value other than `null` (the wire rejects `null` for a `json` type unless it is `.nullable()`). */
|
|
5
|
+
export type JsonNotNull = Exclude<Json, null>;
|
|
6
|
+
/**
|
|
7
|
+
* `T` when every member of `T` is JSON, otherwise a type `T` is not assignable to. Unlike `T extends Json`
|
|
8
|
+
* it accepts `interface`s (which have no implicit index signature) and ignores symbol-keyed phantom brands
|
|
9
|
+
* such as the one on `Ref`. Use as `T extends JsonOf<T>`.
|
|
10
|
+
*/
|
|
11
|
+
export type JsonOf<T> = T extends string | number | boolean | null | undefined | void ? T : T extends bigint | symbol | ((...args: never[]) => unknown) ? never : T extends readonly (infer U)[] ? readonly JsonOf<U>[] : T extends object ? {
|
|
12
|
+
[K in keyof T as K extends symbol ? never : K]: JsonOf<T[K]>;
|
|
13
|
+
} : never;
|
|
14
|
+
declare const int64Brand: unique symbol;
|
|
15
|
+
declare const decimalBrand: unique symbol;
|
|
16
|
+
declare const dateBrand: unique symbol;
|
|
17
|
+
declare const datetimeBrand: unique symbol;
|
|
18
|
+
/** Decimal string of an integer within the signed 64-bit range. Never a JS number. */
|
|
19
|
+
export type Int64 = string & {
|
|
20
|
+
readonly [int64Brand]: true;
|
|
21
|
+
};
|
|
22
|
+
/** Exact decimal string, e.g. "12.50". */
|
|
23
|
+
export type Decimal = string & {
|
|
24
|
+
readonly [decimalBrand]: true;
|
|
25
|
+
};
|
|
26
|
+
/** "YYYY-MM-DD". */
|
|
27
|
+
export type ISODate = string & {
|
|
28
|
+
readonly [dateBrand]: true;
|
|
29
|
+
};
|
|
30
|
+
/** RFC 3339 with offset. */
|
|
31
|
+
export type ISODateTime = string & {
|
|
32
|
+
readonly [datetimeBrand]: true;
|
|
33
|
+
};
|
|
34
|
+
export type Label = Readonly<Record<string, string>>;
|
|
35
|
+
export type TypeKind = 'string' | 'int' | 'int64' | 'decimal' | 'bool' | 'date' | 'datetime' | 'uuid' | 'enum' | 'json' | 'ref' | 'object' | 'array';
|
|
36
|
+
export interface TypeJSON {
|
|
37
|
+
kind: TypeKind;
|
|
38
|
+
optional?: true;
|
|
39
|
+
nullable?: true;
|
|
40
|
+
values?: string[];
|
|
41
|
+
entity?: string;
|
|
42
|
+
properties?: PropertyJSON[];
|
|
43
|
+
items?: TypeJSON;
|
|
44
|
+
precision?: number;
|
|
45
|
+
scale?: number;
|
|
46
|
+
maxLength?: number;
|
|
47
|
+
}
|
|
48
|
+
export interface PropertyJSON {
|
|
49
|
+
name: string;
|
|
50
|
+
type: TypeJSON;
|
|
51
|
+
}
|
|
52
|
+
export type ResourceKind = 'entity' | 'overlay' | 'query' | 'command' | 'operation' | 'event' | 'workflow' | 'notice' | 'route' | 'permission' | 'issue' | 'domainError' | 'column' | 'page' | 'navigation' | 'slot' | 'cell' | 'shell' | 'contactResolver' | 'deliveryPolicy';
|
|
53
|
+
export interface FieldJSON {
|
|
54
|
+
id: string;
|
|
55
|
+
type: TypeJSON;
|
|
56
|
+
unique?: true;
|
|
57
|
+
index?: true;
|
|
58
|
+
default?: Json;
|
|
59
|
+
renamedFrom?: string[];
|
|
60
|
+
label?: Label;
|
|
61
|
+
}
|
|
62
|
+
export interface ConditionJSON {
|
|
63
|
+
eq?: Json;
|
|
64
|
+
ne?: Json;
|
|
65
|
+
in?: Json[];
|
|
66
|
+
lt?: Json;
|
|
67
|
+
lte?: Json;
|
|
68
|
+
gt?: Json;
|
|
69
|
+
gte?: Json;
|
|
70
|
+
isNull?: boolean;
|
|
71
|
+
like?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface FilterJSON {
|
|
74
|
+
fields?: Record<string, ConditionJSON>;
|
|
75
|
+
or?: FilterJSON[];
|
|
76
|
+
}
|
|
77
|
+
export interface ReadRuleJSON {
|
|
78
|
+
permission?: string;
|
|
79
|
+
all?: true;
|
|
80
|
+
rows?: FilterJSON;
|
|
81
|
+
}
|
|
82
|
+
export interface AccessJSON {
|
|
83
|
+
read?: ReadRuleJSON[];
|
|
84
|
+
fields?: Record<string, string[]>;
|
|
85
|
+
}
|
|
86
|
+
export interface NavJSON {
|
|
87
|
+
label: Label;
|
|
88
|
+
group?: string;
|
|
89
|
+
parent?: string;
|
|
90
|
+
icon?: string;
|
|
91
|
+
order?: number;
|
|
92
|
+
}
|
|
93
|
+
export interface NavPatchJSON {
|
|
94
|
+
ref: string;
|
|
95
|
+
hide?: true;
|
|
96
|
+
rename?: Label;
|
|
97
|
+
parent?: string;
|
|
98
|
+
order?: number;
|
|
99
|
+
}
|
|
100
|
+
export interface NavGroupJSON {
|
|
101
|
+
id: string;
|
|
102
|
+
label: Label;
|
|
103
|
+
icon?: string;
|
|
104
|
+
order?: number;
|
|
105
|
+
}
|
|
106
|
+
export interface WorkspaceJSON {
|
|
107
|
+
id: string;
|
|
108
|
+
label: Label;
|
|
109
|
+
icon?: string;
|
|
110
|
+
order?: number;
|
|
111
|
+
}
|
|
112
|
+
export interface PaletteEntryJSON {
|
|
113
|
+
id: string;
|
|
114
|
+
label: Label;
|
|
115
|
+
target: string;
|
|
116
|
+
keywords?: string[];
|
|
117
|
+
}
|
|
118
|
+
export interface ResourceJSON {
|
|
119
|
+
id: string;
|
|
120
|
+
kind: ResourceKind;
|
|
121
|
+
label?: Label;
|
|
122
|
+
description?: string;
|
|
123
|
+
fields?: FieldJSON[];
|
|
124
|
+
base?: string;
|
|
125
|
+
access?: AccessJSON;
|
|
126
|
+
/** Native entities only: the type of the record key (package entities are always uuid). */
|
|
127
|
+
keyType?: 'int64' | 'uuid' | 'string';
|
|
128
|
+
atomic?: true;
|
|
129
|
+
input?: TypeJSON;
|
|
130
|
+
output?: TypeJSON;
|
|
131
|
+
errors?: string[];
|
|
132
|
+
params?: TypeJSON;
|
|
133
|
+
payload?: TypeJSON;
|
|
134
|
+
subject?: string;
|
|
135
|
+
signals?: Record<string, TypeJSON>;
|
|
136
|
+
permission?: string;
|
|
137
|
+
path?: string;
|
|
138
|
+
route?: string;
|
|
139
|
+
nav?: NavJSON;
|
|
140
|
+
chunk?: string;
|
|
141
|
+
export?: string;
|
|
142
|
+
list?: string;
|
|
143
|
+
overlay?: string;
|
|
144
|
+
field?: string;
|
|
145
|
+
filterable?: true;
|
|
146
|
+
sortable?: true;
|
|
147
|
+
exportable?: true;
|
|
148
|
+
groups?: NavGroupJSON[];
|
|
149
|
+
patches?: NavPatchJSON[];
|
|
150
|
+
workspaces?: WorkspaceJSON[];
|
|
151
|
+
palette?: PaletteEntryJSON[];
|
|
152
|
+
/** Slot contribution: the slot ID; cell: the column ID. */
|
|
153
|
+
target?: string;
|
|
154
|
+
/** Slot declaration: the typed props its host page passes to every contribution. */
|
|
155
|
+
props?: TypeJSON;
|
|
156
|
+
/** Slot contribution: position among the contributions of the slot (ascending, default 0). */
|
|
157
|
+
order?: number;
|
|
158
|
+
}
|
|
159
|
+
export type ImplKind = 'command' | 'atomic' | 'operation' | 'query' | 'workflow' | 'contactResolver' | 'deliveryPolicy';
|
|
160
|
+
export interface ImplementationJSON {
|
|
161
|
+
export: string;
|
|
162
|
+
implements: string;
|
|
163
|
+
kind: ImplKind;
|
|
164
|
+
}
|
|
165
|
+
export interface SubscriptionJSON {
|
|
166
|
+
id: string;
|
|
167
|
+
export: string;
|
|
168
|
+
event: string;
|
|
169
|
+
}
|
|
170
|
+
export type GuardPhase = 'input' | 'operation' | 'write';
|
|
171
|
+
export interface GuardJSON {
|
|
172
|
+
id: string;
|
|
173
|
+
export: string;
|
|
174
|
+
target: string;
|
|
175
|
+
phase: GuardPhase;
|
|
176
|
+
}
|
|
177
|
+
export type Channel = 'sms' | 'email' | 'inApp' | 'push';
|
|
178
|
+
export interface TemplateJSON {
|
|
179
|
+
export: string;
|
|
180
|
+
notice: string;
|
|
181
|
+
channels: Channel[];
|
|
182
|
+
}
|
|
183
|
+
export interface ScheduleJSON {
|
|
184
|
+
id: string;
|
|
185
|
+
export: string;
|
|
186
|
+
cron: string;
|
|
187
|
+
timezone?: string;
|
|
188
|
+
}
|
|
189
|
+
export interface EndpointJSON {
|
|
190
|
+
id: string;
|
|
191
|
+
export: string;
|
|
192
|
+
method: string;
|
|
193
|
+
path: string;
|
|
194
|
+
public?: true;
|
|
195
|
+
}
|
|
196
|
+
export interface CapabilitiesJSON {
|
|
197
|
+
network?: string[];
|
|
198
|
+
secrets?: string[];
|
|
199
|
+
}
|
|
200
|
+
/** One document of a package in one locale (see build/docs.ts and manifest.Doc). */
|
|
201
|
+
export interface DocJSON {
|
|
202
|
+
path: string;
|
|
203
|
+
locale: string;
|
|
204
|
+
title: string;
|
|
205
|
+
order?: number;
|
|
206
|
+
audience?: string;
|
|
207
|
+
permission?: string;
|
|
208
|
+
}
|
|
209
|
+
export interface ManifestJSON {
|
|
210
|
+
schema: 'iota.manifest/1';
|
|
211
|
+
namespace: string;
|
|
212
|
+
resources: ResourceJSON[];
|
|
213
|
+
implementations?: ImplementationJSON[];
|
|
214
|
+
subscriptions?: SubscriptionJSON[];
|
|
215
|
+
guards?: GuardJSON[];
|
|
216
|
+
templates?: TemplateJSON[];
|
|
217
|
+
schedules?: ScheduleJSON[];
|
|
218
|
+
endpoints?: EndpointJSON[];
|
|
219
|
+
capabilities?: CapabilitiesJSON;
|
|
220
|
+
docs?: DocJSON[];
|
|
221
|
+
dependencies?: Record<string, string>;
|
|
222
|
+
}
|
|
223
|
+
export declare const MANIFEST_SCHEMA = "iota.manifest/1";
|
|
224
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ResourceJSON, ResourceKind } from './model.ts';
|
|
2
|
+
/** Every value the registry collects carries this brand. */
|
|
3
|
+
export declare const RESOURCE: unique symbol;
|
|
4
|
+
/** Set only on contracts issued through the developer-kit entry (`@iota-uz/sdk/runtime/kit`). */
|
|
5
|
+
export declare const KIT: unique symbol;
|
|
6
|
+
/** A pure, declared resource: carries the manifest JSON that describes it. */
|
|
7
|
+
export interface Contract<Id extends string = string, K extends ResourceKind = ResourceKind> {
|
|
8
|
+
readonly [RESOURCE]: true;
|
|
9
|
+
readonly id: Id;
|
|
10
|
+
readonly kind: K;
|
|
11
|
+
readonly resource: ResourceJSON;
|
|
12
|
+
/** Declared by another package or by the platform; referenced, never re-declared by this package. */
|
|
13
|
+
readonly foreign: boolean;
|
|
14
|
+
readonly [KIT]?: true;
|
|
15
|
+
}
|
|
16
|
+
export declare function isBranded(value: unknown): value is {
|
|
17
|
+
readonly [RESOURCE]: true;
|
|
18
|
+
};
|
|
19
|
+
export declare function isContract(value: unknown): value is Contract;
|
|
20
|
+
/** True for contracts issued by the developer kit; the only contracts allowed to be `foreign`. */
|
|
21
|
+
export declare function isKitIssued(value: Contract): boolean;
|
|
22
|
+
/** Internal constructor of every contract. `foreign` is reserved for the kit entry. */
|
|
23
|
+
export declare function contract<Id extends string, K extends ResourceKind>(resource: ResourceJSON & {
|
|
24
|
+
id: Id;
|
|
25
|
+
kind: K;
|
|
26
|
+
}, foreign?: boolean): Contract<Id, K>;
|
|
27
|
+
/**
|
|
28
|
+
* Omits the zero values Go's `omitempty` drops for typed fields (`false`, `""`, `[]`, `undefined`).
|
|
29
|
+
* Never use it for JSON-valued members (`default`, filter values): there `false`, `""`, `0` and `[]` are real values.
|
|
30
|
+
*/
|
|
31
|
+
export declare function omitEmpty<T extends object>(value: T): T;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Every value the registry collects carries this brand. */
|
|
2
|
+
export const RESOURCE = Symbol.for('iota.resource');
|
|
3
|
+
/** Set only on contracts issued through the developer-kit entry (`@iota-uz/sdk/runtime/kit`). */
|
|
4
|
+
export const KIT = Symbol.for('iota.kit');
|
|
5
|
+
export function isBranded(value) {
|
|
6
|
+
return typeof value === 'object' && value !== null && value[RESOURCE] === true;
|
|
7
|
+
}
|
|
8
|
+
export function isContract(value) {
|
|
9
|
+
if (!isBranded(value))
|
|
10
|
+
return false;
|
|
11
|
+
const v = value;
|
|
12
|
+
return typeof v.id === 'string' && typeof v.kind === 'string' && typeof v.resource === 'object';
|
|
13
|
+
}
|
|
14
|
+
/** True for contracts issued by the developer kit; the only contracts allowed to be `foreign`. */
|
|
15
|
+
export function isKitIssued(value) {
|
|
16
|
+
return value.foreign && value[KIT] === true;
|
|
17
|
+
}
|
|
18
|
+
/** Internal constructor of every contract. `foreign` is reserved for the kit entry. */
|
|
19
|
+
export function contract(resource, foreign = false) {
|
|
20
|
+
const base = { [RESOURCE]: true, id: resource.id, kind: resource.kind, resource, foreign };
|
|
21
|
+
return foreign ? { ...base, [KIT]: true } : base;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Omits the zero values Go's `omitempty` drops for typed fields (`false`, `""`, `[]`, `undefined`).
|
|
25
|
+
* Never use it for JSON-valued members (`default`, filter values): there `false`, `""`, `0` and `[]` are real values.
|
|
26
|
+
*/
|
|
27
|
+
export function omitEmpty(value) {
|
|
28
|
+
const out = {};
|
|
29
|
+
for (const [k, v] of Object.entries(value)) {
|
|
30
|
+
if (v === undefined || v === false || v === '' || (Array.isArray(v) && v.length === 0))
|
|
31
|
+
continue;
|
|
32
|
+
out[k] = v;
|
|
33
|
+
}
|
|
34
|
+
return out;
|
|
35
|
+
}
|