From d1ff1ac872903d7a592616364b5990af2b9f4424 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Sun, 16 Feb 2025 03:22:45 +0100 Subject: [PATCH] feat(vitepress-config): Add support for downloading and organizing additional documentation from external sources --- changelog.md | 6 + docs/.vitepress/config.ts | 11 + docs/.vitepress/helpers.ts | 32 ++ docs/api.global/docs_readme.md | 1 + docs/api.global/sdk_readme.md | 1 + docs/api.global/test-sdk_readme.md | 1 + docs/api.global/typedelectron_readme.md | 1 + .../typedrequest-interfaces_readme.md | 1 + docs/api.global/typedrequest_readme.md | 1 + docs/api.global/typedserver_readme.md | 1 + docs/api.global/typedsocket_readme.md | 1 + docs/apiclient.xyz/abuse_ch_readme.md | 1 + docs/apiclient.xyz/bobcat_readme.md | 1 + docs/apiclient.xyz/bunq_readme.md | 1 + docs/apiclient.xyz/cloudflare_readme.md | 1 + docs/apiclient.xyz/datev_readme.md | 1 + docs/apiclient.xyz/docker_readme.md | 1 + docs/apiclient.xyz/elasticsearch_readme.md | 1 + docs/apiclient.xyz/ghost_readme.md | 1 + docs/apiclient.xyz/gitlab_readme.md | 1 + docs/apiclient.xyz/helium_readme.md | 1 + docs/apiclient.xyz/hetznercloud_readme.md | 1 + docs/apiclient.xyz/kubernetes_readme.md | 1 + docs/apiclient.xyz/letterxpress_readme.md | 1 + docs/apiclient.xyz/lexoffice_readme.md | 1 + docs/apiclient.xyz/logdna_readme.md | 1 + docs/apiclient.xyz/logtail_readme.md | 1 + docs/apiclient.xyz/mailgun_readme.md | 1 + docs/apiclient.xyz/medium_readme.md | 1 + docs/apiclient.xyz/ora_readme.md | 1 + docs/apiclient.xyz/paddle_readme.md | 1 + docs/apiclient.xyz/paypal_readme.md | 1 + docs/apiclient.xyz/sentry_readme.md | 1 + docs/apiclient.xyz/slack_readme.md | 1 + docs/apiclient.xyz/tink_readme.md | 1 + docs/apiclient.xyz/zitadel_readme.md | 1 + docs/design.estate/dees-catalog_readme.md | 1 + docs/design.estate/dees-comms_readme.md | 1 + docs/design.estate/dees-document_readme.md | 1 + docs/design.estate/dees-domtools_readme.md | 1 + docs/design.estate/dees-editor_readme.md | 1 + docs/design.estate/dees-element_readme.md | 1 + docs/design.estate/dees-wcctools_readme.md | 1 + docs/design.estate/fontloader_readme.md | 1 + docs/design.estate/navigation_readme.md | 1 + docs/push.rocks/beautyfiglet_readme.md | 1 + docs/push.rocks/cloudly_readme.md | 354 ------------------ docs/push.rocks/commitinfo_readme.md | 1 + docs/push.rocks/consolecolor_readme.md | 1 + docs/push.rocks/coreflow_readme.md | 347 ----------------- docs/push.rocks/corerender_readme.md | 179 --------- docs/push.rocks/coretraffic_readme.md | 227 ----------- docs/push.rocks/early_readme.md | 1 + docs/push.rocks/gulp-function_readme.md | 1 + docs/push.rocks/isohash_readme.md | 1 + docs/push.rocks/isotransport_readme.md | 1 + docs/push.rocks/levelcache_readme.md | 1 + docs/push.rocks/lik_readme.md | 1 + docs/push.rocks/metadoc_readme.md | 1 + docs/push.rocks/mongodump_readme.md | 1 + docs/push.rocks/npmextra_readme.md | 1 + docs/push.rocks/nullresolve_readme.md | 169 --------- docs/push.rocks/platformclient_readme.md | 34 -- docs/push.rocks/platformservice_readme.md | 129 ------- docs/push.rocks/projectinfo_readme.md | 1 + docs/push.rocks/qenv_readme.md | 1 + docs/push.rocks/remoteingress_readme.md | 110 ------ docs/push.rocks/searchquery_readme.md | 1 + docs/push.rocks/smartacme_readme.md | 1 + docs/push.rocks/smartaction_readme.md | 1 + docs/push.rocks/smartai_readme.md | 1 + docs/push.rocks/smartantivirus_readme.md | 1 + docs/push.rocks/smartarchive_readme.md | 1 + docs/push.rocks/smartarray_readme.md | 1 + docs/push.rocks/smartbrowser_readme.md | 1 + docs/push.rocks/smartbucket_readme.md | 1 + docs/push.rocks/smartbuffer_readme.md | 1 + docs/push.rocks/smartcache_readme.md | 1 + docs/push.rocks/smartchok_readme.md | 1 + docs/push.rocks/smartcli_readme.md | 1 + docs/push.rocks/smartclickhouse_readme.md | 1 + docs/push.rocks/smartcls_readme.md | 1 + docs/push.rocks/smartcontext_readme.md | 1 + docs/push.rocks/smartcrypto_readme.md | 1 + docs/push.rocks/smartcsv_readme.md | 1 + docs/push.rocks/smartdaemon_readme.md | 1 + docs/push.rocks/smartdata_readme.md | 1 + docs/push.rocks/smartdebug_readme.md | 1 + docs/push.rocks/smartdelay_readme.md | 1 + docs/push.rocks/smartdeno_readme.md | 1 + docs/push.rocks/smartdiff_readme.md | 1 + docs/push.rocks/smartdns_readme.md | 1 + docs/push.rocks/smartdocumentation_readme.md | 1 + docs/push.rocks/smartdrive_readme.md | 1 + docs/push.rocks/smartenv_readme.md | 1 + docs/push.rocks/smartevent_readme.md | 1 + docs/push.rocks/smartexit_readme.md | 1 + docs/push.rocks/smartexpect_readme.md | 1 + docs/push.rocks/smartexpose_readme.md | 1 + docs/push.rocks/smartfeed_readme.md | 1 + .../push.rocks/smartfile-interfaces_readme.md | 1 + docs/push.rocks/smartfile_readme.md | 1 + docs/push.rocks/smartfm_readme.md | 1 + docs/push.rocks/smartformat_readme.md | 1 + docs/push.rocks/smartfuzzy_readme.md | 1 + docs/push.rocks/smartgit_readme.md | 1 + docs/push.rocks/smartguard_readme.md | 1 + docs/push.rocks/smartgulp_readme.md | 1 + docs/push.rocks/smarthash_readme.md | 1 + docs/push.rocks/smarthello_readme.md | 191 ---------- docs/push.rocks/smarthomebridge_readme.md | 1 + docs/push.rocks/smarti18n_readme.md | 1 + docs/push.rocks/smartimap_readme.md | 1 + docs/push.rocks/smartinteract_readme.md | 1 + docs/push.rocks/smartipc_readme.md | 1 + docs/push.rocks/smartjimp_readme.md | 1 + docs/push.rocks/smartjson_readme.md | 1 + docs/push.rocks/smartjwt_readme.md | 1 + docs/push.rocks/smartkey_readme.md | 1 + docs/push.rocks/smartlegal_readme.md | 1 + docs/push.rocks/smartlifecycle_readme.md | 1 + .../smartlog-destination-clickhouse_readme.md | 1 + .../smartlog-destination-devtools_readme.md | 1 + .../smartlog-destination-file_readme.md | 1 + .../smartlog-destination-local_readme.md | 1 + .../smartlog-destination-receiver_readme.md | 1 + docs/push.rocks/smartlog-interfaces_readme.md | 1 + docs/push.rocks/smartlog-receiver_readme.md | 1 + docs/push.rocks/smartlog-source-ora_readme.md | 1 + docs/push.rocks/smartlog_readme.md | 1 + docs/push.rocks/smartmail_readme.md | 1 + docs/push.rocks/smartmanifest_readme.md | 1 + docs/push.rocks/smartmarkdown_readme.md | 1 + docs/push.rocks/smartmatch_readme.md | 1 + docs/push.rocks/smartmetrics_readme.md | 1 + docs/push.rocks/smartmime_readme.md | 1 + docs/push.rocks/smartmoney_readme.md | 1 + docs/push.rocks/smartmongo_readme.md | 1 + docs/push.rocks/smartmustache_readme.md | 1 + docs/push.rocks/smartnetwork_readme.md | 1 + docs/push.rocks/smartnginx_readme.md | 1 + docs/push.rocks/smartnpm_readme.md | 1 + docs/push.rocks/smartntml_readme.md | 1 + docs/push.rocks/smartobject_readme.md | 1 + docs/push.rocks/smartocr_readme.md | 1 + docs/push.rocks/smartopen_readme.md | 1 + docs/push.rocks/smartparcel_readme.md | 1 + docs/push.rocks/smartpath_readme.md | 1 + docs/push.rocks/smartpdf_readme.md | 1 + docs/push.rocks/smartping_readme.md | 1 + docs/push.rocks/smartpnpm_readme.md | 1 + docs/push.rocks/smartpromise_readme.md | 1 + docs/push.rocks/smartproxy_readme.md | 1 + docs/push.rocks/smartpuppeteer_readme.md | 1 + docs/push.rocks/smartreport_readme.md | 1 + docs/push.rocks/smartrequest_readme.md | 1 + docs/push.rocks/smartrestic_readme.md | 1 + docs/push.rocks/smartrobots_readme.md | 1 + docs/push.rocks/smartrouter_readme.md | 1 + docs/push.rocks/smartrule_readme.md | 1 + docs/push.rocks/smartrx_readme.md | 1 + docs/push.rocks/smarts3_readme.md | 1 + docs/push.rocks/smartscaf_readme.md | 1 + docs/push.rocks/smartshell_readme.md | 1 + docs/push.rocks/smartsign_readme.md | 1 + docs/push.rocks/smartsitemap_readme.md | 1 + docs/push.rocks/smartsmtp_readme.md | 1 + docs/push.rocks/smartsocket_readme.md | 1 + docs/push.rocks/smartsourcemap_readme.md | 1 + docs/push.rocks/smartspawn_readme.md | 1 + docs/push.rocks/smartssh_readme.md | 1 + docs/push.rocks/smartssr_readme.md | 1 + docs/push.rocks/smartstate_readme.md | 1 + docs/push.rocks/smartstatus_readme.md | 1 + docs/push.rocks/smartstream_readme.md | 1 + docs/push.rocks/smartstring_readme.md | 1 + docs/push.rocks/smartswagger_readme.md | 1 + docs/push.rocks/smartsystem_readme.md | 1 + docs/push.rocks/smarttime_readme.md | 1 + docs/push.rocks/smartunique_readme.md | 1 + docs/push.rocks/smartuniverse_readme.md | 1 + docs/push.rocks/smartupdate_readme.md | 1 + docs/push.rocks/smarturl_readme.md | 1 + docs/push.rocks/smartvalidator_readme.md | 1 + docs/push.rocks/smartversion_readme.md | 1 + docs/push.rocks/smartvhost_readme.md | 1 + docs/push.rocks/smartwebdav_readme.md | 1 + docs/push.rocks/smartwhois_readme.md | 1 + docs/push.rocks/smartxml_readme.md | 1 + docs/push.rocks/smartyaml_readme.md | 1 + docs/push.rocks/spark_readme.md | 303 --------------- docs/push.rocks/tapbundle_readme.md | 1 + docs/push.rocks/taskbuffer_readme.md | 1 + docs/push.rocks/webdetector_readme.md | 1 + docs/push.rocks/webglobal_readme.md | 1 + docs/push.rocks/webjwt_readme.md | 1 + docs/push.rocks/webrequest_readme.md | 1 + docs/push.rocks/websetup_readme.md | 1 + docs/push.rocks/webstore_readme.md | 1 + docs/serve.zone/cloudly_readme.md | 1 + docs/serve.zone/coreflow_readme.md | 1 + docs/serve.zone/corerender_readme.md | 1 + docs/serve.zone/coretraffic_readme.md | 1 + docs/serve.zone/nullresolve_readme.md | 1 + docs/serve.zone/platformclient_readme.md | 1 + docs/serve.zone/platformservice_readme.md | 1 + docs/serve.zone/remoteingress_readme.md | 1 + docs/serve.zone/spark_readme.md | 1 + docs/social.io/catalog_readme.md | 38 ++ docs/social.io/interfaces_readme.md | 166 ++++++++ 210 files changed, 448 insertions(+), 2043 deletions(-) delete mode 100644 docs/push.rocks/cloudly_readme.md delete mode 100644 docs/push.rocks/coreflow_readme.md delete mode 100644 docs/push.rocks/corerender_readme.md delete mode 100644 docs/push.rocks/coretraffic_readme.md delete mode 100644 docs/push.rocks/nullresolve_readme.md delete mode 100644 docs/push.rocks/platformclient_readme.md delete mode 100644 docs/push.rocks/platformservice_readme.md delete mode 100644 docs/push.rocks/remoteingress_readme.md delete mode 100644 docs/push.rocks/smarthello_readme.md delete mode 100644 docs/push.rocks/spark_readme.md create mode 100644 docs/social.io/catalog_readme.md create mode 100644 docs/social.io/interfaces_readme.md diff --git a/changelog.md b/changelog.md index 2f5a176..88f3337 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2025-02-16 - 1.2.0 - feat(vitepress-config) +Add support for downloading and organizing additional documentation from external sources + +- Integrated new functionality to download readmes for 'social.io' and organize them in the documentation structure. +- Updated navigation to include new links for 'social.io' docs. + ## 2025-01-25 - 1.1.0 - feat(docs) Add integration for downloading and incorporating readme documents from external domains diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 615a67a..11ba8d2 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -35,6 +35,12 @@ export default async () => { plugins.path.join(paths.docsDir, 'serve.zone'), ); + await helpers.downloadReadmes( + 'https://code.foss.global', + 'social.io', + plugins.path.join(paths.docsDir, 'social.io'), + ); + return plugins.vitepress.defineConfig({ lang: 'en-US', @@ -80,6 +86,11 @@ export default async () => { items: await helpers.generateNavLinks('serve.zone'), collapsed: true, }, + { + text: 'social.io', + items: await helpers.generateNavLinks('social.io'), + collapsed: true, + }, ], }, ], diff --git a/docs/.vitepress/helpers.ts b/docs/.vitepress/helpers.ts index 924132b..0055d90 100644 --- a/docs/.vitepress/helpers.ts +++ b/docs/.vitepress/helpers.ts @@ -50,6 +50,38 @@ export async function downloadReadmes( ): Promise { // Ensure the output directory exists await plugins.fs.mkdir(outputDir, { recursive: true }); + /** + * Reads all existing .md files in the specified directory and deletes any + * whose frontmatter has `source === "gitea"`. + */ + async function removeGiteaSourceFiles(dirPath: string): Promise { + try { + const existingFiles = await plugins.fs.readdir(dirPath); + for (const file of existingFiles) { + if (file.endsWith('.md')) { + const filePath = plugins.path.join(dirPath, file); + const fileContent = await plugins.fs.readFile(filePath, 'utf8'); + + // Parse frontmatter + const smartfmInstance = new plugins.smartfm.Smartfm({ + fmType: 'yaml' + }); + const frontmatter = smartfmInstance.parse(fileContent); + + // If `source` is "gitea", delete this file + if (frontmatter.data && frontmatter.data.source === 'gitea') { + await plugins.fs.rm(filePath); + console.log(`Deleted file with frontmatter source === "gitea": ${filePath}`); + } + } + } + } catch (error) { + console.error('Error removing files with gitea source frontmatter:', error); + } + } + + // Call the function to remove existing .md files with frontmatter source === "gitea" + await removeGiteaSourceFiles(outputDir); // Helper function to construct headers const getHeaders = (additionalHeaders: Record = {}) => { diff --git a/docs/api.global/docs_readme.md b/docs/api.global/docs_readme.md index 0028c73..4de6f10 100644 --- a/docs/api.global/docs_readme.md +++ b/docs/api.global/docs_readme.md @@ -1,5 +1,6 @@ --- title: "@api.global/docs" +source: "gitea" --- # @apiglobal/private/docs Open Source headless CMS diff --git a/docs/api.global/sdk_readme.md b/docs/api.global/sdk_readme.md index 8b289a4..483beb1 100644 --- a/docs/api.global/sdk_readme.md +++ b/docs/api.global/sdk_readme.md @@ -1,5 +1,6 @@ --- title: "@api.global/sdk" +source: "gitea" --- # @api.global/sdk diff --git a/docs/api.global/test-sdk_readme.md b/docs/api.global/test-sdk_readme.md index 6ecdd80..3e19e16 100644 --- a/docs/api.global/test-sdk_readme.md +++ b/docs/api.global/test-sdk_readme.md @@ -1,5 +1,6 @@ --- title: "@api.global/test-sdk" +source: "gitea" --- # @api.global/test-sdk an sdk for testing ag handlers diff --git a/docs/api.global/typedelectron_readme.md b/docs/api.global/typedelectron_readme.md index b96ad3d..69523f1 100644 --- a/docs/api.global/typedelectron_readme.md +++ b/docs/api.global/typedelectron_readme.md @@ -1,5 +1,6 @@ --- title: "@api.global/typedelectron" +source: "gitea" --- # @api.global/typedelectron diff --git a/docs/api.global/typedrequest-interfaces_readme.md b/docs/api.global/typedrequest-interfaces_readme.md index cdaf088..73cda5d 100644 --- a/docs/api.global/typedrequest-interfaces_readme.md +++ b/docs/api.global/typedrequest-interfaces_readme.md @@ -1,5 +1,6 @@ --- title: "@api.global/typedrequest-interfaces" +source: "gitea" --- # @api.global/typedrequest-interfaces diff --git a/docs/api.global/typedrequest_readme.md b/docs/api.global/typedrequest_readme.md index 6116754..3c6ff97 100644 --- a/docs/api.global/typedrequest_readme.md +++ b/docs/api.global/typedrequest_readme.md @@ -1,5 +1,6 @@ --- title: "@api.global/typedrequest" +source: "gitea" --- # @api.global/typedrequest diff --git a/docs/api.global/typedserver_readme.md b/docs/api.global/typedserver_readme.md index 14fdc99..a6dfab8 100644 --- a/docs/api.global/typedserver_readme.md +++ b/docs/api.global/typedserver_readme.md @@ -1,5 +1,6 @@ --- title: "@api.global/typedserver" +source: "gitea" --- ```markdown # @api.global/typedserver diff --git a/docs/api.global/typedsocket_readme.md b/docs/api.global/typedsocket_readme.md index 5798307..f4a1ff9 100644 --- a/docs/api.global/typedsocket_readme.md +++ b/docs/api.global/typedsocket_readme.md @@ -1,5 +1,6 @@ --- title: "@api.global/typedsocket" +source: "gitea" --- # @api.global/typedsocket a typedrequest extension supporting websockets diff --git a/docs/apiclient.xyz/abuse_ch_readme.md b/docs/apiclient.xyz/abuse_ch_readme.md index 49c6e31..7f396bc 100644 --- a/docs/apiclient.xyz/abuse_ch_readme.md +++ b/docs/apiclient.xyz/abuse_ch_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/abuse.ch" +source: "gitea" --- # @apiclient.xyz/abuse.ch an unofficial client to retrieve abuse.ch data diff --git a/docs/apiclient.xyz/bobcat_readme.md b/docs/apiclient.xyz/bobcat_readme.md index 0e1f742..0b3c669 100644 --- a/docs/apiclient.xyz/bobcat_readme.md +++ b/docs/apiclient.xyz/bobcat_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/bobcat" +source: "gitea" --- # @mojoio/bobcat a module to talk to bobcat miners diff --git a/docs/apiclient.xyz/bunq_readme.md b/docs/apiclient.xyz/bunq_readme.md index 3d66e3b..7d414e9 100644 --- a/docs/apiclient.xyz/bunq_readme.md +++ b/docs/apiclient.xyz/bunq_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/bunq" +source: "gitea" --- # @mojoio/bunq a bunq api abstraction package diff --git a/docs/apiclient.xyz/cloudflare_readme.md b/docs/apiclient.xyz/cloudflare_readme.md index e0fda36..6d3893c 100644 --- a/docs/apiclient.xyz/cloudflare_readme.md +++ b/docs/apiclient.xyz/cloudflare_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/cloudflare" +source: "gitea" --- # @apiclient.xyz/cloudflare easy cloudflare management diff --git a/docs/apiclient.xyz/datev_readme.md b/docs/apiclient.xyz/datev_readme.md index b5d4de5..10b4cb8 100644 --- a/docs/apiclient.xyz/datev_readme.md +++ b/docs/apiclient.xyz/datev_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/datev" +source: "gitea" --- # @mojoio/datev an unofficial api client for the datev connect online xml api diff --git a/docs/apiclient.xyz/docker_readme.md b/docs/apiclient.xyz/docker_readme.md index 7e7b241..46ab0f9 100644 --- a/docs/apiclient.xyz/docker_readme.md +++ b/docs/apiclient.xyz/docker_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/docker" +source: "gitea" --- # @apiclient.xyz/docker diff --git a/docs/apiclient.xyz/elasticsearch_readme.md b/docs/apiclient.xyz/elasticsearch_readme.md index 5081b75..3c5dec0 100644 --- a/docs/apiclient.xyz/elasticsearch_readme.md +++ b/docs/apiclient.xyz/elasticsearch_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/elasticsearch" +source: "gitea" --- # @mojoio/elasticsearch log to elasticsearch in a kibana compatible format diff --git a/docs/apiclient.xyz/ghost_readme.md b/docs/apiclient.xyz/ghost_readme.md index 02a8298..49fa5a9 100644 --- a/docs/apiclient.xyz/ghost_readme.md +++ b/docs/apiclient.xyz/ghost_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/ghost" +source: "gitea" --- # @apiclient.xyz/ghost An unofficial Ghost API package diff --git a/docs/apiclient.xyz/gitlab_readme.md b/docs/apiclient.xyz/gitlab_readme.md index 100af90..2a54d22 100644 --- a/docs/apiclient.xyz/gitlab_readme.md +++ b/docs/apiclient.xyz/gitlab_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/gitlab" +source: "gitea" --- # @mojoio/gitlab a gitlab api abstraction package diff --git a/docs/apiclient.xyz/helium_readme.md b/docs/apiclient.xyz/helium_readme.md index d171481..c65143a 100644 --- a/docs/apiclient.xyz/helium_readme.md +++ b/docs/apiclient.xyz/helium_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/helium" +source: "gitea" --- # @mojoio/helium a helium api package diff --git a/docs/apiclient.xyz/hetznercloud_readme.md b/docs/apiclient.xyz/hetznercloud_readme.md index 9871eec..6fbd160 100644 --- a/docs/apiclient.xyz/hetznercloud_readme.md +++ b/docs/apiclient.xyz/hetznercloud_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/hetznercloud" +source: "gitea" --- # @apiclient.xyz/hetznercloud An unofficial API client for the Hetzner Cloud API diff --git a/docs/apiclient.xyz/kubernetes_readme.md b/docs/apiclient.xyz/kubernetes_readme.md index 0a8238b..4ef2ca6 100644 --- a/docs/apiclient.xyz/kubernetes_readme.md +++ b/docs/apiclient.xyz/kubernetes_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/kubernetes" +source: "gitea" --- # @mojoio/kubernetes a simmplified kubernetes api abstraction diff --git a/docs/apiclient.xyz/letterxpress_readme.md b/docs/apiclient.xyz/letterxpress_readme.md index 02b04a4..d518374 100644 --- a/docs/apiclient.xyz/letterxpress_readme.md +++ b/docs/apiclient.xyz/letterxpress_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/letterxpress" +source: "gitea" --- # @mojoio/letterxpress an unofficial API package for the letterxpress API diff --git a/docs/apiclient.xyz/lexoffice_readme.md b/docs/apiclient.xyz/lexoffice_readme.md index 44b203e..5a6ee90 100644 --- a/docs/apiclient.xyz/lexoffice_readme.md +++ b/docs/apiclient.xyz/lexoffice_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/lexoffice" +source: "gitea" --- # @mojoio/lexoffice an unofficial api client for lexoffice diff --git a/docs/apiclient.xyz/logdna_readme.md b/docs/apiclient.xyz/logdna_readme.md index d380855..9a56eb6 100644 --- a/docs/apiclient.xyz/logdna_readme.md +++ b/docs/apiclient.xyz/logdna_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/logdna" +source: "gitea" --- # @mojoio/logdna an unoffical package for the logdna api diff --git a/docs/apiclient.xyz/logtail_readme.md b/docs/apiclient.xyz/logtail_readme.md index a1d504f..c76486f 100644 --- a/docs/apiclient.xyz/logtail_readme.md +++ b/docs/apiclient.xyz/logtail_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/logtail" +source: "gitea" --- # @mojoio/logtail an unofficial api abstraction package for logtail.com taolored to the smartlog ecosystem diff --git a/docs/apiclient.xyz/mailgun_readme.md b/docs/apiclient.xyz/mailgun_readme.md index 9060790..e2a6235 100644 --- a/docs/apiclient.xyz/mailgun_readme.md +++ b/docs/apiclient.xyz/mailgun_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/mailgun" +source: "gitea" --- # @mojoio/mailgun an api abstraction package for mailgun diff --git a/docs/apiclient.xyz/medium_readme.md b/docs/apiclient.xyz/medium_readme.md index 012c803..9816010 100644 --- a/docs/apiclient.xyz/medium_readme.md +++ b/docs/apiclient.xyz/medium_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/medium" +source: "gitea" --- # @apiclient.xyz/medium diff --git a/docs/apiclient.xyz/ora_readme.md b/docs/apiclient.xyz/ora_readme.md index 8a339c4..abf0a21 100644 --- a/docs/apiclient.xyz/ora_readme.md +++ b/docs/apiclient.xyz/ora_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/ora" +source: "gitea" --- # @mojoio/ora an api abstraction package for ora.pm diff --git a/docs/apiclient.xyz/paddle_readme.md b/docs/apiclient.xyz/paddle_readme.md index f3110bc..53f8ef5 100644 --- a/docs/apiclient.xyz/paddle_readme.md +++ b/docs/apiclient.xyz/paddle_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/paddle" +source: "gitea" --- # @mojoio/paddle an unofficial paddle API package diff --git a/docs/apiclient.xyz/paypal_readme.md b/docs/apiclient.xyz/paypal_readme.md index b9307bc..9daf374 100644 --- a/docs/apiclient.xyz/paypal_readme.md +++ b/docs/apiclient.xyz/paypal_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/paypal" +source: "gitea" --- # @mojoio/paypal an unofficial paypal API package diff --git a/docs/apiclient.xyz/sentry_readme.md b/docs/apiclient.xyz/sentry_readme.md index fe064de..988666f 100644 --- a/docs/apiclient.xyz/sentry_readme.md +++ b/docs/apiclient.xyz/sentry_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/sentry" +source: "gitea" --- # @mojoio/sentry an unofficial abstraction package for sentry.io diff --git a/docs/apiclient.xyz/slack_readme.md b/docs/apiclient.xyz/slack_readme.md index 748e9c9..cf5f9a4 100644 --- a/docs/apiclient.xyz/slack_readme.md +++ b/docs/apiclient.xyz/slack_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/slack" +source: "gitea" --- # @mojoio/slack slack api abstraction for the mojo.io ecosystem diff --git a/docs/apiclient.xyz/tink_readme.md b/docs/apiclient.xyz/tink_readme.md index 8671ea5..915784a 100644 --- a/docs/apiclient.xyz/tink_readme.md +++ b/docs/apiclient.xyz/tink_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/tink" +source: "gitea" --- # @apiclient.xyz/tink an unofficial api abstraction for tink.com diff --git a/docs/apiclient.xyz/zitadel_readme.md b/docs/apiclient.xyz/zitadel_readme.md index c026978..3e549a5 100644 --- a/docs/apiclient.xyz/zitadel_readme.md +++ b/docs/apiclient.xyz/zitadel_readme.md @@ -1,5 +1,6 @@ --- title: "@apiclient.xyz/zitadel" +source: "gitea" --- # @apiclient.xyz/zitadel diff --git a/docs/design.estate/dees-catalog_readme.md b/docs/design.estate/dees-catalog_readme.md index 0103a34..298737d 100644 --- a/docs/design.estate/dees-catalog_readme.md +++ b/docs/design.estate/dees-catalog_readme.md @@ -1,5 +1,6 @@ --- title: "@design.estate/dees-catalog" +source: "gitea" --- # @design.estate/dees-catalog An extensive library for building modern web applications with dynamic components using Web Components, JavaScript, and TypeScript. diff --git a/docs/design.estate/dees-comms_readme.md b/docs/design.estate/dees-comms_readme.md index f508815..b2fa4da 100644 --- a/docs/design.estate/dees-comms_readme.md +++ b/docs/design.estate/dees-comms_readme.md @@ -1,5 +1,6 @@ --- title: "@design.estate/dees-comms" +source: "gitea" --- # @design.estate/dees-comms a comms module for communicating within the DOM diff --git a/docs/design.estate/dees-document_readme.md b/docs/design.estate/dees-document_readme.md index ad47be2..867120b 100644 --- a/docs/design.estate/dees-document_readme.md +++ b/docs/design.estate/dees-document_readme.md @@ -1,5 +1,6 @@ --- title: "@design.estate/dees-document" +source: "gitea" --- # @design.estate/dees-document diff --git a/docs/design.estate/dees-domtools_readme.md b/docs/design.estate/dees-domtools_readme.md index 04b6335..83b836e 100644 --- a/docs/design.estate/dees-domtools_readme.md +++ b/docs/design.estate/dees-domtools_readme.md @@ -1,5 +1,6 @@ --- title: "@design.estate/dees-domtools" +source: "gitea" --- # @design.estate/dees-domtools tools to simplify complex css structures diff --git a/docs/design.estate/dees-editor_readme.md b/docs/design.estate/dees-editor_readme.md index d31ed38..c4918eb 100644 --- a/docs/design.estate/dees-editor_readme.md +++ b/docs/design.estate/dees-editor_readme.md @@ -1,5 +1,6 @@ --- title: "@design.estate/dees-editor" +source: "gitea" --- # @design.estate/dees-editor an advanced editor for markdown documents based on monaco. diff --git a/docs/design.estate/dees-element_readme.md b/docs/design.estate/dees-element_readme.md index fd371c6..dbfdc91 100644 --- a/docs/design.estate/dees-element_readme.md +++ b/docs/design.estate/dees-element_readme.md @@ -1,5 +1,6 @@ --- title: "@design.estate/dees-element" +source: "gitea" --- # @design.estate/dees-element a custom element class extending lit element class diff --git a/docs/design.estate/dees-wcctools_readme.md b/docs/design.estate/dees-wcctools_readme.md index 8988efe..28301c9 100644 --- a/docs/design.estate/dees-wcctools_readme.md +++ b/docs/design.estate/dees-wcctools_readme.md @@ -1,5 +1,6 @@ --- title: "@design.estate/dees-wcctools" +source: "gitea" --- # @design.estate/dees-wcctools wcc tools for creating element catalogues diff --git a/docs/design.estate/fontloader_readme.md b/docs/design.estate/fontloader_readme.md index 1413202..a63596b 100644 --- a/docs/design.estate/fontloader_readme.md +++ b/docs/design.estate/fontloader_readme.md @@ -1,5 +1,6 @@ --- title: "@design.estate/fontloader" +source: "gitea" --- # @designestate/fontloader a fontloader for managing font loading from A to Z diff --git a/docs/design.estate/navigation_readme.md b/docs/design.estate/navigation_readme.md index db86b3f..63041e0 100644 --- a/docs/design.estate/navigation_readme.md +++ b/docs/design.estate/navigation_readme.md @@ -1,5 +1,6 @@ --- title: "@design.estate/navigation" +source: "gitea" --- # @designestate/navigation A module for opinionated navigation abstraction. diff --git a/docs/push.rocks/beautyfiglet_readme.md b/docs/push.rocks/beautyfiglet_readme.md index c8e6473..c731f3b 100644 --- a/docs/push.rocks/beautyfiglet_readme.md +++ b/docs/push.rocks/beautyfiglet_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/beautyfiglet" +source: "gitea" --- # @push.rocks/beautyfiglet A Node.js module that facilitates the creation of ASCII art using figlet with customizable fonts and layouts. diff --git a/docs/push.rocks/cloudly_readme.md b/docs/push.rocks/cloudly_readme.md deleted file mode 100644 index 18e4696..0000000 --- a/docs/push.rocks/cloudly_readme.md +++ /dev/null @@ -1,354 +0,0 @@ ---- -title: "@serve.zone/cloudly" ---- -# @serve.zone/cloudly - -A multi-cloud management tool utilizing Docker Swarmkit for orchestrating containerized apps across various cloud providers, with web, CLI, and API interfaces for configuration and integration management. - -## Install - -To install `@serve.zone/cloudly`, run the following command in your terminal: - -```bash -npm install @serve.zone/cloudly --save -``` - -This will install the package and add it to your project's `package.json` dependencies. - -## Usage - -`@serve.zone/cloudly` is designed to provide a unified interface for managing multi-cloud environments, encapsulating complex cloud interactions with Docker Swarmkit into simpler, programmable entities. This document will guide you through various use-cases and implementation examples to give you a comprehensive understanding of the module's capabilities. - -### Prerequisites - -Before you begin, ensure your environment is set up correctly: -- You have Node.js installed (preferably the latest LTS version). -- Your environment is configured to use TypeScript if you're working in a TypeScript project. - -### Basic Setup - -#### Creating a Cloudly Instance - -The foundation of working with `@serve.zone/cloudly` involves creating an instance of the `Cloudly` class. This instance serves as the gateway to managing cloud resources and orchestrates interactions within the platform. Here’s how to get started: - -```typescript -import { Cloudly, ICloudlyConfig } from '@serve.zone/cloudly'; - -const myCloudlyConfig: ICloudlyConfig = { - cfToken: 'your_cloudflare_api_token', - hetznerToken: 'your_hetzner_api_token', - environment: 'development', - letsEncryptEmail: 'lets_encrypt_email@example.com', - publicUrl: 'example.com', - publicPort: '8443', - mongoDescriptor: { - mongoDbUrl: 'mongodb+srv://:@.mongodb.net/myFirstDatabase', - mongoDbName: 'myDatabase', - mongoDbUser: 'myUser', - mongoDbPass: 'myPassword', - }, -}; - -const myCloudlyInstance = new Cloudly(myCloudlyConfig); -``` - -The configuration object `ICloudlyConfig` provides essential information needed for initializing external services, such as Cloudflare, Hetzner, and a MongoDB server. Adjust the parameters to match your actual service credentials and specifications. - -### Core Features and Use Cases - -#### Orchestrating Docker Swarmkit Clusters - -Docker Swarmkit cluster management is a primary feature of `@serve.zone/cloudly`. Through its abstracted, programmable interface, you can operate clusters effortlessly. Here’s an example of how to create a cluster using `Cloudly`: - -```typescript -import { Cloudly } from '@serve.zone/cloudly'; - -interface ICluster { - name: string; - id: string; - cloudlyUrl: string; - servers: string[]; - sshKeys: string[]; -} - -async function manageClusters() { - const myCloudlyConfig = { - cfToken: 'your_cloudflare_api_token', - environment: 'development', - mongoDescriptor: { - mongoDbUrl: 'mongodb+srv://:@.mongodb.net/myFirstDatabase', - mongoDbName: 'myDatabase', - mongoDbUser: 'myUser', - mongoDbPass: 'myPassword', - }, - letsEncryptEmail: 'lets_encrypt_email@example.com', - publicUrl: 'example.com', - publicPort: 8443, - hetznerToken: 'your_hetzner_api_token', - }; - - const myCloudlyInstance = new Cloudly(myCloudlyConfig); - await myCloudlyInstance.start(); - - const newCluster: ICluster = { - name: 'example_cluster', - id: 'example_cluster_id', - cloudlyUrl: 'https://example.com:8443', - servers: [], - sshKeys: [], - }; - - // Store the newly created cluster with Cloudly - const storedCluster = await myCloudlyInstance.clusterManager.storeCluster(newCluster); - console.log('Cluster stored:', storedCluster); -} - -manageClusters(); -``` - -In this scenario, a cluster called `example_cluster` is initialized using the `Cloudly` instance. This method represents a central mechanism to efficiently handle cluster entities and associated metadata. - -#### Integrating With Cloudflare for DNS Management - -`@serve.zone/cloudly` provides built-in capabilities for managing DNS records through integration with Cloudflare. Using the `CloudflareConnector`, you can programmatically create, manage, and delete DNS entries: - -```typescript -import { Cloudly } from '@serve.zone/cloudly'; - -async function configureCloudflareDNS() { - const myCloudlyConfig = { - cfToken: 'your_cloudflare_api_token', - environment: 'development', - letsEncryptEmail: 'lets_encrypt_email@example.com', - publicUrl: 'example.com', - publicPort: 8443, - hetznerToken: 'your_hetzner_api_token', - mongoDescriptor: { - mongoDbUrl: 'mongodb+srv://:@.mongodb.net/myFirstDatabase', - mongoDbName: 'myDatabase', - mongoDbUser: 'myUser', - mongoDbPass: 'myPassword', - }, - }; - - const myCloudlyInstance = new Cloudly(myCloudlyConfig); - await myCloudlyInstance.start(); - - const cfConnector = myCloudlyInstance.cloudflareConnector.cloudflare; - - const dnsRecord = await cfConnector.createDNSRecord('example.com', 'sub.example.com', 'A', '127.0.0.1'); - console.log('DNS Record:', dnsRecord); -} - -configureCloudflareDNS(); -``` - -Here, you create an A record for the subdomain `sub.example.com` pointing to `127.0.0.1`. All communication with Cloudflare is handled directly through the interface without manual intervention. - -#### Dynamic Interaction with DigitalOcean - -DigitalOcean resource management, including droplet creation, is simplified in Cloudly. By extending the API to encapsulate calls to external providers, Cloudly provides a seamless experience: - -```typescript -import { Cloudly } from '@serve.zone/cloudly'; - -async function createDigitalOceanDroplets() { - const myCloudlyConfig = { - cfToken: 'your_cloudflare_api_token', - environment: 'development', - letsEncryptEmail: 'lets_encrypt_email@example.com', - publicUrl: 'example.com', - publicPort: 8443, - hetznerToken: 'your_hetzner_api_token', - mongoDescriptor: { - mongoDbUrl: 'mongodb+srv://:@.mongodb.net/myFirstDatabase', - mongoDbName: 'myDatabase', - mongoDbUser: 'myUser', - mongoDbPass: 'myPassword', - }, - }; - - const myCloudlyInstance = new Cloudly(myCloudlyConfig); - await myCloudlyInstance.start(); - - const doConnector = myCloudlyInstance.digitaloceanConnector; - - const droplet = await doConnector.createDroplet('example-droplet', 'nyc3', 's-1vcpu-1gb', 'ubuntu-20-04-x64'); - console.log('Droplet created:', droplet); -} - -createDigitalOceanDroplets(); -``` - -In this script, a droplet named `example-droplet` is created within the `nyc3` region using the `ubuntu-20-04-x64` image. The module abstracts complexities by directly interfacing with DigitalOcean. - -### Advanced Use Cases - -#### Implementing Web Management Interface - -`@serve.zone/cloudly` facilitates dashboard management with advanced Web Components built with `@design.estate`. This section of the library allows the creation of dynamic, interactive panels for real-time resource management in a modern browser interface. - -```typescript -import { html } from '@design.estate/dees-element'; - -const renderDashboard = () => { - return html` - - - - - - - - - - `; -}; - -document.body.appendChild(renderDashboard()); -``` - -Utilizing the custom web components designed specifically for Cloudly, dashboards are adaptable, interactive, and maintainable. These elements allow you to structure a complete cloud management center without needing to delve into detailed UI engineering. - -#### Comprehensive Log Management - -With Cloudly’s Log Management capabilities, you can track and analyze system logs for better insights into your cloud ecosystem’s behavior: - -```typescript -import { Cloudly } from '@serve.zone/cloudly'; - -async function initiateLogManagement() { - const myCloudlyConfig = { - cfToken: 'your_cloudflare_api_token', - environment: 'development', - letsEncryptEmail: 'lets_encrypt_email@example.com', - publicUrl: 'example.com', - publicPort: 8443, - hetznerToken: 'your_hetzner_api_token', - mongoDescriptor: { - mongoDbUrl: 'mongodb+srv://:@.mongodb.net/myFirstDatabase', - mongoDbName: 'myDatabase', - mongoDbUser: 'myUser', - mongoDbPass: 'myPassword', - }, - }; - - const myCloudlyInstance = new Cloudly(myCloudlyConfig); - await myCloudlyInstance.start(); - - const logs = await myCloudlyInstance.logManager.fetchLogs(); - console.log('Logs:', logs); -} - -initiateLogManagement(); -``` - -Cloudly provides the tools needed to collect and process logs within your cloud infrastructure. Logs are an essential part of system validation, troubleshooting, monitoring, and auditing. - -#### Secret Management and Bundles - -Managing secrets securely and efficiently is critical for cloud operations. Cloudly allows you to create and manage secret groups and bundles that can be used across multiple applications and environments: - -```typescript -import { Cloudly } from '@serve.zone/cloudly'; - -async function createSecrets() { - const myCloudlyConfig = { - cfToken: 'your_cloudflare_api_token', - environment: 'development', - letsEncryptEmail: 'lets_encrypt_email@example.com', - publicUrl: 'example.com', - publicPort: 8443, - hetznerToken: 'your_hetzner_api_token', - mongoDescriptor: { - mongoDbUrl: 'mongodb+srv://:@.mongodb.net/myFirstDatabase', - mongoDbName: 'myDatabase', - mongoDbUser: 'myUser', - mongoDbPass: 'myPassword', - }, - }; - - const myCloudlyInstance = new Cloudly(myCloudlyConfig); - await myCloudlyInstance.start(); - - const newSecretGroup = await myCloudlyInstance.secretManager.createSecretGroup({ - name: 'example_secret_group', - secrets: [ - { key: 'SECRET_KEY', value: 's3cr3t' }, - ], - }); - - const newSecretBundle = await myCloudlyInstance.secretManager.createSecretBundle({ - name: 'example_bundle', - secretGroups: [newSecretGroup], - }); - - console.log('Created Secret Group and Bundle:', newSecretGroup, newSecretBundle); -} - -createSecrets(); -``` - -Secrets, such as API keys and sensitive configuration data, are managed efficiently using secret groups and bundles. This structured approach to secret management enhances both security and accessibility. - -### Task Scheduling and Management - -With task buffers, you can schedule and manage background tasks integral to cloud operations: - -```typescript -import { Cloudly } from '@serve.zone/cloudly'; -import { TaskBuffer } from '@push.rocks/taskbuffer'; - -async function scheduleTasks() { - const myCloudlyConfig = { - cfToken: 'your_cloudflare_api_token', - environment: 'development', - letsEncryptEmail: 'lets_encrypt_email@example.com', - publicUrl: 'example.com', - publicPort: 8443, - hetznerToken: 'your_hetzner_api_token', - mongoDescriptor: { - mongoDbUrl: 'mongodb+srv://:@.mongodb.net/myFirstDatabase', - mongoDbName: 'myDatabase', - mongoDbUser: 'myUser', - mongoDbPass: 'myPassword', - }, - }; - - const myCloudlyInstance = new Cloudly(myCloudlyConfig); - await myCloudlyInstance.start(); - - const taskManager = new TaskBuffer(); - taskManager.scheduleEvery('minute', async () => { - console.log('Running scheduled task...'); - // Task logic - }); - - console.log('Tasks scheduled.'); -} - -scheduleTasks(); -``` - -The example demonstrates setting up periodic task execution using task buffers as part of Cloudly's task management. Whether it's maintenance routines, data updates, or resource checks, tasks can be managed effectively. - -This comprehensive overview of `@serve.zone/cloudly` is designed to help you leverage its full capabilities in managing multi-cloud environments. Each example is meant to serve as a starting point, and you are encouraged to explore further by consulting the relevant sections in the documentation, engaging with community discussions, or experimenting in your own environment. - -## License and Legal Information - -This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. - -**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file. - -### Trademarks - -This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH. - -### Company Information - -Task Venture Capital GmbH -Registered at District court Bremen HRB 35230 HB, Germany - -For any legal inquiries or if you require further information, please contact us via email at hello@task.vc. - -By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works. diff --git a/docs/push.rocks/commitinfo_readme.md b/docs/push.rocks/commitinfo_readme.md index 352b110..fa50eaf 100644 --- a/docs/push.rocks/commitinfo_readme.md +++ b/docs/push.rocks/commitinfo_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/commitinfo" +source: "gitea" --- # @push.rocks/commitinfo bake commitinfos into code diff --git a/docs/push.rocks/consolecolor_readme.md b/docs/push.rocks/consolecolor_readme.md index 3bf063a..1ccac9d 100644 --- a/docs/push.rocks/consolecolor_readme.md +++ b/docs/push.rocks/consolecolor_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/consolecolor" +source: "gitea" --- # @push.rocks/consolecolor diff --git a/docs/push.rocks/coreflow_readme.md b/docs/push.rocks/coreflow_readme.md deleted file mode 100644 index 16a7a22..0000000 --- a/docs/push.rocks/coreflow_readme.md +++ /dev/null @@ -1,347 +0,0 @@ ---- -title: "@serve.zone/coreflow" ---- -# @serve.zone/coreflow - -A comprehensive solution for managing Docker and scaling applications across servers, handling tasks from service provisioning to network traffic management. - -## Install - -To install @serve.zone/coreflow, you can use npm with the following command: - -```sh -npm install @serve.zone/coreflow --save -``` - -Given that this is a private package, make sure you have access to the required npm registry and that you are authenticated properly. - -## Usage - -Coreflow is designed as an advanced tool for managing Docker-based applications and services, enabling efficient scaling across servers, and handling multiple aspects of service provisioning and network traffic management. Below are examples and explanations to illustrate its capabilities and how you can leverage Coreflow in your infrastructure. Note that these examples are based on TypeScript and use ESM syntax. - -### Prerequisites - -Before you start, ensure you have Docker and Docker Swarm configured in your environment as Coreflow operates on top of these technologies. Additionally, verify that your environment variables are properly set up for accessing Coreflow's functionalities. - -### Setting Up Coreflow - -To get started, you need to import and initialize Coreflow within your application. Here's an example of how to do this in a TypeScript module: - -```typescript -import { Coreflow } from '@serve.zone/coreflow'; - -// Initialize Coreflow -const coreflowInstance = new Coreflow(); - -// Start Coreflow -await coreflowInstance.start(); - -// Example: Add your logic here for handling Docker events -coreflowInstance.handleDockerEvents().then(() => { - console.log('Docker events are being handled.'); -}); - -// Stop Coreflow when done -await coreflowInstance.stop(); -``` - -In the above example: - -- The Coreflow instance is initialized. -- Coreflow is started, which internally initializes various managers and connectors. -- The method `handleDockerEvents` is used to handle Docker events. -- Finally, Coreflow is stopped gracefully. - -### Configuring Service Connections - -Coreflow manages applications and services, often requiring direct interactions with other services like a database, message broker, or external API. Coreflow simplifies these connections through its configuration and service discovery layers. - -```typescript -// Assuming coreflowInstance is already started as per previous examples -const serviceConnection = coreflowInstance.createServiceConnection({ - serviceName: 'myDatabaseService', - servicePort: 3306, -}); - -serviceConnection.connect().then(() => { - console.log('Successfully connected to the service'); -}); -``` - -### Scaling Your Application - -Coreflow excels in scaling applications across multiple servers. This involves not just replicating services, but also ensuring they are properly networked, balanced, and monitored. - -```typescript -const scalingPolicy = { - serviceName: 'apiService', - replicaCount: 5, // Target number of replicas - maxReplicaCount: 10, // Maximum number of replicas - minReplicaCount: 2, // Minimum number of replicas -}; - -coreflowInstance.applyScalingPolicy(scalingPolicy).then(() => { - console.log('Scaling policy applied successfully.'); -}); -``` - -In the above example: - -- A scaling policy is defined with target, maximum, and minimum replica counts for the `apiService`. -- The `applyScalingPolicy` method of the Coreflow instance is used to apply this scaling policy. - -### Managing Network Traffic - -One of Coreflow's key features is its ability to manage network traffic, ensuring that it is efficiently distributed among various services based on load, priority, and other custom rules. - -```typescript -import { TrafficRule } from '@serve.zone/coreflow'; - -const rule: TrafficRule = { - serviceName: 'webService', - externalPort: 80, - internalPort: 3000, - protocol: 'http', -}; - -coreflowInstance.applyTrafficRule(rule).then(() => { - console.log('Traffic rule applied successfully.'); -}); -``` - -In the above example: - -- A traffic rule is defined for the `webService`, redirecting external traffic from port 80 to the service's internal port 3000. -- The `applyTrafficRule` method is used to enforce this rule. - -### Continuous Deployment - -Coreflow integrates continuous integration and deployment processes, allowing seamless updates and rollbacks for your services: - -```typescript -const deploymentConfig = { - serviceName: 'userAuthService', - image: 'myregistry.com/userauthservice:latest', - updatePolicy: 'rolling', // or "recreate" -}; - -coreflowInstance.deployService(deploymentConfig).then(() => { - console.log('Service deployed successfully.'); -}); -``` - -In the above example: - -- A deployment configuration is created for the `userAuthService` using the latest image from the specified registry. -- The `deployService` method is then used to deploy the service using the specified update policy (e.g., rolling updates or recreating the service). - -### Observability and Monitoring - -To keep track of your applications' health and performance, Coreflow provides tools for logging, monitoring, and alerting. - -```typescript -coreflowInstance.monitorService('webService').on('serviceHealthUpdate', (healthStatus) => { - console.log(`Received health update for webService: ${healthStatus}`); -}); -``` - -In the above example: - -- The `monitorService` method is used to monitor the health status of the `webService`. -- When a health update event is received, it is logged to the console. - -### Detailed Example: Setting Up and Managing Coreflow - -Here is a detailed example that covers various features, from setup to scaling and traffic management. - -#### Step 1: Initialize Coreflow - -```typescript -import { Coreflow } from '@serve.zone/coreflow'; - -const coreflowInstance = new Coreflow(); - -async function initializeCoreflow() { - await coreflowInstance.start(); - console.log('Coreflow initialized.'); - await manageServices(); -} - -initializeCoreflow().catch((error) => { - console.error('Error initializing Coreflow:', error); -}); -``` - -#### Step 2: Handling Docker Events - -```typescript -coreflowInstance.handleDockerEvents().then(() => { - console.log('Docker events are being handled.'); -}); -``` - -#### Step 3: Configuring and Connecting to a Service - -```typescript -const serviceConnection = coreflowInstance.createServiceConnection({ - serviceName: 'databaseService', - servicePort: 5432, -}); - -serviceConnection.connect().then(() => { - console.log('Successfully connected to the database service.'); -}); -``` - -#### Step 4: Applying a Scaling Policy - -```typescript -const scalingPolicy = { - serviceName: 'microserviceA', - replicaCount: 3, // Starting with 3 replicas - maxReplicaCount: 10, // Allowing up to 10 replicas - minReplicaCount: 2, // Ensuring at least 2 replicas -}; - -coreflowInstance.applyScalingPolicy(scalingPolicy).then(() => { - console.log('Scaling policy applied for microserviceA'); -}); -``` - -#### Step 5: Managing Network Traffic - -```typescript -import { TrafficRule } from '@serve.zone/coreflow'; - -const trafficRules: TrafficRule[] = [ - { - serviceName: 'frontendService', - externalPort: 80, - internalPort: 3000, - protocol: 'http', - }, - { - serviceName: 'apiService', - externalPort: 443, - internalPort: 4000, - protocol: 'https', - }, -]; - -Promise.all(trafficRules.map((rule) => coreflowInstance.applyTrafficRule(rule))).then(() => { - console.log('Traffic rules applied.'); -}); -``` - -#### Step 6: Deploying a Service - -```typescript -const deploymentConfig = { - serviceName: 'authService', - image: 'myregistry.com/authservice:latest', - updatePolicy: 'rolling', // Performing rolling updates -}; - -coreflowInstance.deployService(deploymentConfig).then(() => { - console.log('AuthService deployed successfully.'); -}); -``` - -#### Step 7: Monitoring a Service - -```typescript -coreflowInstance.monitorService('frontendService').on('serviceHealthUpdate', (healthStatus) => { - console.log(`Health update for frontendService: ${healthStatus}`); -}); -``` - -### Advanced Usage: Task Scheduling and Traffic Configuration - -In more complex scenarios, you might want to leverage Coreflow's ability to schedule tasks and manage traffic configurations. - -#### Scheduling Tasks - -Coreflow supports scheduling updates and other tasks using the `taskBuffer` API. - -```typescript -import { Task } from '@push.rocks/taskbuffer'; - -const checkinTask = new Task({ - name: 'checkin', - buffered: true, - taskFunction: async () => { - console.log('Running checkin task...'); - }, -}); - -const taskManager = coreflowInstance.taskManager; -taskManager.addAndScheduleTask(checkinTask, '0 * * * * *'); // Scheduling task to run every minute -taskManager.start().then(() => { - console.log('Task manager started.'); -}); -``` - -#### Managing Traffic Routing - -Coreflow can manage complex traffic routing scenarios, such as configuring reverse proxies for different services. - -```typescript -import { CoretrafficConnector } from '@serve.zone/coreflow'; - -// Assume coreflowInstance is already started -const coretrafficConnector = new CoretrafficConnector(coreflowInstance); - -const reverseProxyConfigs = [ - { - hostName: 'example.com', - destinationIp: '192.168.1.100', - destinationPort: '3000', - privateKey: '', - publicKey: '', - }, - { - hostName: 'api.example.com', - destinationIp: '192.168.1.101', - destinationPort: '4000', - privateKey: '', - publicKey: '', - }, -]; - -coretrafficConnector.setReverseConfigs(reverseProxyConfigs).then(() => { - console.log('Reverse proxy configurations applied.'); -}); -``` - -### Integrating with Cloudly - -Coreflow is designed to integrate seamlessly with Cloudly, a configuration management and orchestration tool. - -#### Starting the Cloudly Connector - -```typescript -const cloudlyConnector = coreflowInstance.cloudlyConnector; - -cloudlyConnector.start().then(() => { - console.log('Cloudly connector started.'); -}); -``` - -#### Retrieving and Applying Configurations from Cloudly - -```typescript -cloudlyConnector.getConfigFromCloudly().then((config) => { - console.log('Received configuration from Cloudly:', config); - - coreflowInstance.clusterManager.provisionWorkloadServices(config).then(() => { - console.log('Workload services provisioned based on Cloudly config.'); - }); -}); -``` - -### Conclusion - -Coreflow is a powerful and flexible tool for managing Docker-based applications, scaling services, configuring network traffic, handling continuous deployments, and ensuring observability of your infrastructure. The examples provided aim to give a comprehensive understanding of how to use Coreflow in various scenarios, ensuring it meets your DevOps and CI/CD needs. - -By leveraging Coreflow's rich feature set, you can optimize your infrastructure for high availability, scalability, and efficient operation across multiple servers and environments. -undefined diff --git a/docs/push.rocks/corerender_readme.md b/docs/push.rocks/corerender_readme.md deleted file mode 100644 index 11bc45d..0000000 --- a/docs/push.rocks/corerender_readme.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -title: "@serve.zone/corerender" ---- -# Corerender -A rendering service for serve.zone that preserves styles for web components. - -## Install - -To install Corerender in your project, you can use npm. Make sure you have Node.js installed and then run the following command in your terminal: - -```shell -npm install corerender -``` - -This will add `corerender` as a dependency to your project, allowing you to use its rendering services to preserve styles for web components efficiently. - -## Usage - -Welcome to the comprehensive usage guide for `corerender`, a powerful rendering service designed to integrate seamlessly within your web applications, ensuring that styles for web components are preserved properly. The guide is structured to provide a thorough understanding of `corerender`'s capabilities, demonstrating its flexibility and efficiency through realistic scenarios. - -### Setting Up Your Environment - -First things first, let’s get `corerender` up and running in your project. Ensure you've installed the package as detailed in the [Install](#install) section. Since `corerender` is a TypeScript-friendly library, it is recommended to use TypeScript for development to leverage the full power of type safety and IntelliSense. - -### Basic Render Service Setup - -```typescript -import { Rendertron } from 'corerender'; - -const rendertronInstance = new Rendertron(); - -(async () => { - console.log('Starting rendertron...'); - await rendertronInstance.start(); - console.log('Rendertron started successfully!'); -})(); - -``` - -The code initializes an instance of `Rendertron` and starts the service asynchronously. `Rendertron` is the core class responsible for managing the rendering processes, including task scheduling and storing rendering results persistently in a database. - -### Understanding the Rendertron Architecture - -The architecture of `Rendertron` is designed to support web component rendering through several integral components: - -1. **Prerender Manager**: Manages the creation and retrieval of prerender results. -2. **Task Manager**: Handles scheduling tasks for prerendering operations and cleanup routines. -3. **Utility Service Server**: Provides the server interface that accepts/render requests and serves prerendered content efficiently. - -### Using the Prerender Manager - -The `PrerenderManager` is responsible for generating and caching the rendering results of webpages. Here’s how you can use the `PrerenderManager` to prerender a webpage: - -```typescript -import { PrerenderManager } from 'corerender/dist_ts/rendertron.classes.prerendermanager'; - -(async () => { - const prerenderManager = new PrerenderManager(); - await prerenderManager.start(); - - const urlToPrerender = 'https://example.com'; - const prerenderResult = await prerenderManager.getPrerenderResultForUrl(urlToPrerender); - console.log(`Prerendered content for ${urlToPrerender}:`); - console.log(prerenderResult); - - await prerenderManager.stop(); -})(); -``` - -The above script demonstrates accessing a webpage's prerendered content. It initializes the `PrerenderManager`, specifies a URL, and requests the rendering result, which is stored or retrieved from the database. - -### Scheduling Prerendering Tasks - -The `TaskManager` class allows for efficiently scheduling tasks, such as regular prerendering of local domains and cleanup of outdated render results: - -```typescript -import { TaskManager } from 'corerender/dist_ts/rendertron.taskmanager'; - -const taskManager = new TaskManager(rendertronInstance); -taskManager.start(); - -// Example: Manual trigger of a specific task -taskManager.triggerTaskByName('prerenderLocalDomains'); - -taskManager.stop(); -``` - -`TaskManager` works closely with the `Rendertron` service to ensure tasks are executed as per defined schedules (e.g., every 30 minutes or daily). It allows manual triggering for immediate execution outside the schedule. - -### Managing Render Results - -The pre-rendered results are stored using `smartdata`’s `SmartDataDbDoc`. You may need advanced control over whether these are retrieved, created anew, or updated: - -```typescript -import { PrerenderResult } from 'corerender/dist_ts/rendertron.classes.prerenderresult'; - -(async () => { - const url = 'https://example.com'; - let prerenderResult = await PrerenderResult.getPrerenderResultForUrl(prerenderManager, url); - - // Check if an updated result is necessary - if (prerenderResultNeedsUpdate(prerenderResult)) { - prerenderResult = await PrerenderResult.createPrerenderResultForUrl(prerenderManager, url); - } - - console.log(`Final Prerendered content for ${url}:`, prerenderResult.renderResultString); -})(); -``` - -### Integrating with External Systems - -`Corerender` can be integrated into broader systems that programmatically manage URLs and rendering frequencies. For instance, parsing and prerendering sitemaps: - -```typescript -class IntegrationExample { - private prerenderManager: PrerenderManager; - - constructor() { - this.prerenderManager = new PrerenderManager(); - } - - async prerenderFromSitemap(sitemapUrl: string) { - await this.prerenderManager.prerenderSitemap(sitemapUrl); - console.log('Finished prerendering sitemap:', sitemapUrl); - } -} - -(async () => { - const integrationExample = new IntegrationExample(); - await integrationExample.prerenderFromSitemap('https://example.com/sitemap.xml'); -})(); -``` - -### Server-Side Rendering Directly with SmartSSR - -`Rendertron` uses the highly efficient `smartssr` for SSR requests. You can easily direct incoming server requests to utilize this rendering pipeline: - -```typescript -import { typedserver } from 'corerender/dist_ts/rendertron.plugins'; - -const serviceServerInstance = new typedserver.utilityservers.UtilityServiceServer({ - serviceDomain: 'rendertron.example.com', - serviceName: 'RendertronService', - serviceVersion: '2.0.61', // Replace with dynamic version retrieval if needed - addCustomRoutes: async (serverArg) => { - serverArg.addRoute( - '/render/*', - new typedserver.servertools.Handler('GET', async (req, res) => { - const requestedUrl = req.url.replace('/render/', ''); - const prerenderedContent = await prerenderManager.getPrerenderResultForUrl(requestedUrl); - res.write(prerenderedContent); - res.end(); - }) - ); - }, -}); - -(async () => { - await serviceServerInstance.start(); - console.log('SSR Server Started'); -})(); -``` - -### Customizing the Logger - -`Rendertron` employs the `smartlog` package for logging activities across the service. To customize logging, instantiate a logger with custom configurations: - -```typescript -import { smartlog } from 'corerender/dist_ts/rendertron.plugins'; - -const customLogger = smartlog.Smartlog.create({ /* custom options */ }); -customLogger.log('info', 'Custom logger integrated successfully.'); -``` - -### Closing Remarks - -With these examples, you should have a robust understanding of how to implement `corerender` in your web application. It’s a powerful service that takes care of rendering optimizations, allowing developers to focus on building components and architecture, with clear workflows to handle tasks and results efficiently. - -undefined \ No newline at end of file diff --git a/docs/push.rocks/coretraffic_readme.md b/docs/push.rocks/coretraffic_readme.md deleted file mode 100644 index ccf244d..0000000 --- a/docs/push.rocks/coretraffic_readme.md +++ /dev/null @@ -1,227 +0,0 @@ ---- -title: "@serve.zone/coretraffic" ---- -# CoreTraffic - -route traffic within your docker setup. TypeScript ready. - -## Install - -To install `coretraffic`, you should have Node.js already set up on your system. Assuming Node.js and npm are ready, install the package via the npm registry with the following command: - -```bash -npm install coretraffic -``` - -To make the most out of `coretraffic`, ensure TypeScript is set up in your development environment, as this module is TypeScript ready and provides enhanced IntelliSense. - -## Usage - -`coretraffic` is designed to manage and route traffic within a Docker setup, offering robust solutions to your traffic management needs with an emphasis on efficiency and reliability. Utilizing TypeScript for static typing, you get enhanced code completion and fewer runtime errors. The module is set up to handle the intricacies of proxy configuration and routing, providing a powerful foundation for any Docker-based traffic management application. - -Below, we'll delve into the capabilities and features of `coretraffic`, complete with comprehensive examples to get you started. - -### Initializing CoreTraffic - -First, you'll want to create an instance of the `CoreTraffic` class. This serves as the entry point to accessing the module's capabilities. - -```typescript -import { CoreTraffic } from 'coretraffic'; - -// Create an instance of CoreTraffic -const coreTrafficInstance = new CoreTraffic(); -``` - -This initializes the `coreTrafficInstance` with default properties, ready to configure routing settings and handle proxy configurations. - -### Starting and Stopping CoreTraffic - -Controlling the lifecycle of your `CoreTraffic` instance is key to effective traffic management. You can start and stop the instance with straightforward method calls. - -#### Starting CoreTraffic - -To begin managing traffic, start the instance. This sets up the internal network proxy and SSL redirection services, making them ready to handle incoming requests. - -```typescript -async function startCoreTraffic() { - await coreTrafficInstance.start(); - console.log('CoreTraffic is now running.'); -} - -startCoreTraffic(); -``` - -This code initializes all internal components, including `NetworkProxy` and `SslRedirect`, beginning to route traffic as configured. - -#### Stopping CoreTraffic - -When you no longer need to route traffic, shutting down the instance cleanly is important. `CoreTraffic` provides a `stop` method for this purpose. - -```typescript -async function stopCoreTraffic() { - await coreTrafficInstance.stop(); - console.log('CoreTraffic has stopped.'); -} - -stopCoreTraffic(); -``` - -This ensures all background tasks are halted, and network configurations are cleaned up. - -### Configuring Network Proxy - -A core feature of `CoreTraffic` is its ability to configure network proxies dynamically. At its heart is the `NetworkProxy` class, a powerful tool for managing routing configurations. - -#### Adding Default Headers - -You may wish to integrate unique headers across all routed requests, possible with the `addDefaultHeaders` method. This is useful for tagging requests or managing CORS. - -```typescript -coreTrafficInstance.networkProxy.addDefaultHeaders({ - 'x-powered-by': 'coretraffic', - 'custom-header': 'custom-value' -}); -``` - -This injects custom headers into all outgoing responses managed by `coretraffic`, thereby allowing customized interaction with requests as needed. - -#### Proxy Configuration Updates - -Dynamic updates to proxy configurations can be facilitated via tasks managed by `CoretrafficTaskManager`. This feature allows adjustment of routing rules without interrupting service. - -```typescript -import { IReverseProxyConfig } from '@tsclass/network'; - -const configureRouting = async () => { - const reverseProxyConfig: IReverseProxyConfig[] = [{ - // Example configuration, adjust as needed - host: 'example.com', - target: 'http://internal-service:3000', - }]; - - await coreTrafficInstance.taskmanager.setupRoutingTask.trigger(reverseProxyConfig); - console.log('Updated routing configurations'); -}; - -configureRouting(); -``` - -In this example, a reverse proxy configuration is defined, specifying that requests to `example.com` should be directed to an internal service. - -### SSL Redirection - -`CoreTraffic` supports SSL redirection, an essential feature for secure communications. The `SslRedirect` component listens on one port to redirect traffic to the secure version on another port. - -```typescript -// SslRedirect is initialized on port 7999 by default -console.log('SSL Redirection is active!'); -``` - -Out-of-the-box, this listens on the configurable port and safely forwards insecure HTTP traffic to its HTTPS counterpart. - -### Coreflow Connector - -A unique aspect of `coretraffic` is its integration capability with `Coreflow`, allowing communication between different network nodes. The `CoreflowConnector` facilitates receiving configuration updates via a socket connection. - -#### Setting up the CoreflowConnector - -```typescript -const coreflowConnector = coreTrafficInstance.coreflowConnector; - -async function connectCoreflow() { - await coreflowConnector.start(); - console.log('Coreflow connector activated.'); -} - -connectCoreflow(); -``` - -This method enables a persistent connection to a Coreflow server, allowing real-time configuration updates and management of routing policies. - -#### Stopping the CoreflowConnector - -To disconnect cleanly: - -```typescript -async function disconnectCoreflow() { - await coreflowConnector.stop(); - console.log('Coreflow connector terminated.'); -} - -disconnectCoreflow(); -``` - -This halts the connection, ensuring no dangling resources remain when shutting down your application. - -### Task Management - -The `CoretrafficTaskManager` handles complex, buffered tasks. Flexibility and power are at your fingertips with this system, ideal for timed or queued execution needs. - -#### Managing Tasks - -Here is how you would initiate the task manager: - -```typescript -const taskManager = coreTrafficInstance.taskmanager; - -// Start tasks -taskManager.start() - .then(() => console.log('Task manager is running')) - .catch(err => console.error('Failed to start task manager', err)); -``` - -Stop tasks once processing is no longer required: - -```typescript -taskManager.stop() - .then(() => console.log('Task manager stopped')) - .catch(err => console.error('Failed to stop task manager', err)); -``` - -### Logging and Debugging - -Effective logging is provided using `Smartlog`, designed to track detailed application insights and report on activity and actions within `coretraffic`. - -#### Configuring Log Levels - -`coretraffic` supports log levels which can be adjusted as per your requirements: - -```typescript -import { logger } from './coretraffic.logging.ts'; - -logger.log('info', 'System initialized'); -logger.log('debug', 'Detailed debugging process'); -logger.log('warn', 'Potential issue detected'); -logger.log('error', 'An error has occurred'); -``` - -These log entries help monitor logic flow and catch issues during development or deployment in production environments. - -### Test Setup - -For those interested in testing, `coretraffic` uses `tapbundle` and `tstest` to ensure reliability and correctness. A sample test module is provided to demonstrate initialization and lifecycle actions. - -Here’s an example of a non-CI test scenario: - -```typescript -import * as coretraffic from '../ts/index.js'; -import { tap, expect } from '@push.rocks/tapbundle'; - -let testCoreTraffic; - -tap.test('should create and handle coretraffic instances', async () => { - testCoreTraffic = new coretraffic.CoreTraffic(); - expect(testCoreTraffic).toBeInstanceOf(coretraffic.CoreTraffic); - - await testCoreTraffic.start(); - await new Promise(resolve => setTimeout(resolve, 10000)); // Keep alive for demonstration - await testCoreTraffic.stop(); -}); - -tap.start(); -``` - -This test suite validates essential functionality within development iterations, ensuring `coretraffic` performs as expected. - -`coretraffic` offers a vast landscape of operations within Docker environments, handling traffic with modularity and efficiency. Whether starting simple routing tasks or integrating with complex systems like Coreflow, this module provides robust support where needed most. Embrace your traffic management challenges with the dedicated features of `coretraffic`. -undefined \ No newline at end of file diff --git a/docs/push.rocks/early_readme.md b/docs/push.rocks/early_readme.md index 6af5c82..7a7a1cb 100644 --- a/docs/push.rocks/early_readme.md +++ b/docs/push.rocks/early_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/early" +source: "gitea" --- # @push.rocks/early minimal and fast loading plugin for startup time measuring diff --git a/docs/push.rocks/gulp-function_readme.md b/docs/push.rocks/gulp-function_readme.md index 2ffd0c2..5024ef1 100644 --- a/docs/push.rocks/gulp-function_readme.md +++ b/docs/push.rocks/gulp-function_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/gulp-function" +source: "gitea" --- # @push.rocks/gulp-function diff --git a/docs/push.rocks/isohash_readme.md b/docs/push.rocks/isohash_readme.md index 9aa072c..8864340 100644 --- a/docs/push.rocks/isohash_readme.md +++ b/docs/push.rocks/isohash_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/isohash" +source: "gitea" --- # @push.rocks/isohash a hash package that works cross environment diff --git a/docs/push.rocks/isotransport_readme.md b/docs/push.rocks/isotransport_readme.md index 786886c..b628737 100644 --- a/docs/push.rocks/isotransport_readme.md +++ b/docs/push.rocks/isotransport_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/isotransport" +source: "gitea" --- # @push.rocks/isotransport a bi-directional, multiplatform, best-effort transport diff --git a/docs/push.rocks/levelcache_readme.md b/docs/push.rocks/levelcache_readme.md index 8a6cafd..c67a8e0 100644 --- a/docs/push.rocks/levelcache_readme.md +++ b/docs/push.rocks/levelcache_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/levelcache" +source: "gitea" --- # @push.rocks/levelcache A cache that utilizes memory, disk, and S3 for data storage and backup. diff --git a/docs/push.rocks/lik_readme.md b/docs/push.rocks/lik_readme.md index 6e4a769..c949def 100644 --- a/docs/push.rocks/lik_readme.md +++ b/docs/push.rocks/lik_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/lik" +source: "gitea" --- # @push.rocks/lik light little helpers for node diff --git a/docs/push.rocks/metadoc_readme.md b/docs/push.rocks/metadoc_readme.md index b143939..6131fbd 100644 --- a/docs/push.rocks/metadoc_readme.md +++ b/docs/push.rocks/metadoc_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/metadoc" +source: "gitea" --- # @push.rocks/metadoc a metadoc module for progressivly enhancing documents diff --git a/docs/push.rocks/mongodump_readme.md b/docs/push.rocks/mongodump_readme.md index 642469c..129922a 100644 --- a/docs/push.rocks/mongodump_readme.md +++ b/docs/push.rocks/mongodump_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/mongodump" +source: "gitea" --- # @push.rocks/mongodump a tool to handle dumps of MongoDB databases diff --git a/docs/push.rocks/npmextra_readme.md b/docs/push.rocks/npmextra_readme.md index 4147aa5..77876a1 100644 --- a/docs/push.rocks/npmextra_readme.md +++ b/docs/push.rocks/npmextra_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/npmextra" +source: "gitea" --- # @push.rocks/npmextra A utility to enhance npm with additional configuration, tool management capabilities, and a key-value store for project setups. diff --git a/docs/push.rocks/nullresolve_readme.md b/docs/push.rocks/nullresolve_readme.md deleted file mode 100644 index c833b0d..0000000 --- a/docs/push.rocks/nullresolve_readme.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: "@serve.zone/nullresolve" ---- -# @losslessone_private/nullresolve - -The nullresolve is a robust service designed to manage and handle requests effectively within the servzone architecture. It ensures requests that would normally remain unserved receive appropriate handling and feedback. - -## Install - -To install the `@losslessone_private/nullresolve` package, it is essential to first set up a proper environment for handling private npm packages due to its private nature. This can be achieved through npm or yarn, which are both suitable JavaScript package managers. - -### Step-by-Step Installation: - -1. **Ensure you are logged into npm** with sufficient permissions to access private packages: - ```bash - npm login - ``` - Authentication is necessary for accessing private modules like `@losslessone_private/nullresolve`. - -2. **Install Using npm:** - ```bash - npm install @losslessone_private/nullresolve - ``` - If you are using a specific registry for your company or project, make sure to specify it in your npm configuration. - -3. **Install Using Yarn:** - ```bash - yarn add @losslessone_private/nullresolve - ``` - -After these steps, the module should be ready for use in your JavaScript or TypeScript project. - -## Usage - -The purpose of `nullresolve` is pivotal within a network ecosystem, particularly one that interfaces directly with user requests and external resources. Below, a comprehensive guide exists to demonstrate effective usage of this module within applications. - -### Quick Start Example - -Initialization and launching of a nullresolve service can be done succinctly: - -```typescript -// Import the NullResolve class from the package -import { NullResolve } from '@losslessone_private/nullresolve'; - -// Create an instance of NullResolve -const myNullResolveService = new NullResolve(); - -// Start the service -myNullResolveService.start().then(() => { - console.log('NullResolve service is running!'); -}).catch((error) => { - console.error('Error starting NullResolve service:', error); -}); - -// Stop the service gracefully -process.on('SIGINT', async () => { - await myNullResolveService.stop(); - console.log('NullResolve service stopped.'); - process.exit(0); -}); -``` - -### Detailed Guide: Handling Requests and Custom Routes - -`nullresolve` can swiftly handle complex request scenarios utilizing its robust framework. Here's a detailed example of setting up custom handler routes that can respond with various HTTP statuses or custom messages based on the request: - -```typescript -import { NullResolve } from '@losslessone_private/nullresolve'; - -// Initialize the service -const myService = new NullResolve(); - -// Start the service with custom routes -myService.serviceServer.addCustomRoutes(async (server) => { - server.addRoute( - '/error/:code', - new plugins.typedserver.servertools.Handler('GET', async (req, res) => { - let message; - switch (req.params.code) { - case '404': - message = 'This resource was not found.'; - break; - case '500': - message = 'Internal Server Error. Please try later.'; - break; - default: - message = 'An unexpected error occurred.'; - } - res.status(200).send(`

${message}

`); - }) - ); -}); - -// Activating the service -myService.start().then(() => { - console.log('Custom route service started.'); -}).catch((err) => { - console.error('Error while starting the service:', err); -}); -``` - -### Integrating Logging and Monitoring - -Given the mission-critical nature of services like `nullresolve`, reliable logging is indispensable to monitor activities and diagnose issues swiftly. This is integrated by default using the `smartlog` module for robust logging capabilities: - -```typescript -import { logger } from './nullresolve.logging.js'; - -// Utilize the logger for tracking and problem-solving -logger.info('Service Log: nullresolve service initiated'); -logger.warn('Warning Log: Potential issue detected'); -logger.error('Error Log: An error occurred in service operation'); -``` - -### Advanced Configuration - -For systems requiring specialized setups, nullresolve offers configurability through both code and external configuration objects: - -```typescript -// Customize through code -const config = { - domain: 'customdomain.com', - port: 8080, - routes: [ - { - method: 'GET', - path: '/status/check', - handler: async (req, res) => { - res.status(200).send('Service is operational.'); - } - } - ] -}; - -myService.configure(config); - -// Running the service with a new configuration -myService.start(); -``` - -### Graceful Shutdown and Resource Management - -Services such as the one provided by `nullresolve` must incorporate mechanisms to stop gracefully, allowing them to release resources and finish current tasks before complete termination: - -```typescript -process.on('SIGTERM', async () => { - logger.info('Service is stopping gracefully.'); - await myService.stop(); - logger.info('Service has been successfully stopped.'); - process.exit(0); -}); -``` - -### Custom Error Handling Strategies - -It is often beneficial to ensure that the service reacts gracefully during unexpected shutdowns or errors. Here's an example of implementing a strategy for error handling: - -```typescript -const handleCriticalError = (err: Error) => { - logger.error(`Critical Error: ${err.message}`); - process.exit(1); -}; - -process.on('unhandledRejection', handleCriticalError); -process.on('uncaughtException', handleCriticalError); -``` - -By deploying `nullresolve` strategically within your infrastructure, it can transform how unhandled requests and errors are addressed, providing comprehensive protection and valuable insights into system status and health. This guide should serve to ensure effective deployment, utilization, and management of this sophisticated null service. -undefined \ No newline at end of file diff --git a/docs/push.rocks/platformclient_readme.md b/docs/push.rocks/platformclient_readme.md deleted file mode 100644 index fe8ee7c..0000000 --- a/docs/push.rocks/platformclient_readme.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "@serve.zone/platformclient" ---- -# @serve.zone/platformclient -a module that makes it really easy to use the serve.zone platform inside your app - -## Availabililty and Links -* [npmjs.org (npm package)](https://www.npmjs.com/package/@serve.zone/platformclient) -* [gitlab.com (source)](https://gitlab.com/serve.zone/platformclient) -* [github.com (source mirror)](https://github.com/serve.zone/platformclient) -* [docs (typedoc)](https://serve.zone.gitlab.io/platformclient/) - -## Status for master - -Status Category | Status Badge --- | -- -GitLab Pipelines | [![pipeline status](https://gitlab.com/serve.zone/platformclient/badges/master/pipeline.svg)](https://lossless.cloud) -GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/serve.zone/platformclient/badges/master/coverage.svg)](https://lossless.cloud) -npm | [![npm downloads per month](https://badgen.net/npm/dy/@serve.zone/platformclient)](https://lossless.cloud) -Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/serve.zone/platformclient)](https://lossless.cloud) -TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud) -node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) -Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud) -PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@serve.zone/platformclient)](https://lossless.cloud) -PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@serve.zone/platformclient)](https://lossless.cloud) -BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@serve.zone/platformclient)](https://lossless.cloud) - -## Usage -Use TypeScript for best in class intellisense -For further information read the linked docs at the top of this readme. - -## Legal -> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc) -| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy) diff --git a/docs/push.rocks/platformservice_readme.md b/docs/push.rocks/platformservice_readme.md deleted file mode 100644 index 539136e..0000000 --- a/docs/push.rocks/platformservice_readme.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: "@serve.zone/platformservice" ---- -# @serve.zone/platformservice - -contains the platformservice container with mail, sms, letter, ai services. - -## Install - -To install `@serve.zone/platformservice`, run the following command: - -```sh -npm install @serve.zone/platformservice --save -``` - -Make sure you have Node.js and npm installed on your system to use this package. - -## Usage - -This document provides extensive usage scenarios for the `@serve.zone/platformservice`, a comprehensive ESM module written in TypeScript offering a wide range of services such as mail, SMS, letter, and artificial intelligence (AI) functionalities. This service is an exemplar of a modular design, allowing users to leverage various communication methods and AI services efficiently. Key features provided by this platform include sending and receiving emails, managing SMS services, letter dispatching, and utilizing AI for diverse purposes. - -### Prerequisites - -Before diving into the examples, ensure you have the platform service installed and configured correctly. The package leverages environment variables for configuration, so you must set up the necessary variables, including service endpoints, authentication tokens, and database connections. - -### Initialization - -First, initialize the platform service, ensuring all dependencies are correctly loaded and configured: - -```ts -import { SzPlatformService } from '@serve.zone/platformservice'; - -async function initService() { - const platformService = new SzPlatformService(); - await platformService.start(); - console.log('Platform service initialized successfully.'); -} - -initService(); -``` - -### Sending Emails - -One of the primary services offered is email management. Here's how to send an email using the platform service: - -```ts -import { EmailService, IEmailOptions } from '@serve.zone/platformservice'; - -async function sendEmail() { - const emailOptions: IEmailOptions = { - from: 'no-reply@example.com', - to: 'recipient@example.com', - subject: 'Test Email', - body: '

This is a test email

', - }; - - const emailService = new EmailService('MAILGUN_API_KEY'); // Replace with your real API key - await emailService.sendEmail(emailOptions); - - console.log('Email sent successfully.'); -} - -sendEmail(); -``` - -### Managing SMS - -Similar to email, the platform also facilitates SMS sending: - -```ts -import { SmsService, ISmsConstructorOptions } from '@serve.zone/platformservice'; - -async function sendSms() { - const smsOptions: ISmsConstructorOptions = { - apiGatewayApiToken: 'SMS_API_TOKEN', // Replace with your real token - }; - - const smsService = new SmsService(smsOptions); - await smsService.sendSms(1234567890, 'SENDER_NAME', 'This is a test SMS.'); - - console.log('SMS sent successfully.'); -} - -sendSms(); -``` - -### Dispatching Letters - -For physical mail correspondence, the platform provides a letter service: - -```ts -import { LetterService, ILetterConstructorOptions } from '@serve.zone/platformservice'; - -async function sendLetter() { - const letterOptions: ILetterConstructorOptions = { - letterxpressUser: 'USER', - letterxpressToken: 'TOKEN', - }; - - const letterService = new LetterService(letterOptions); - await letterService.sendLetter('This is a test letter body.', {address: 'Recipient Address', name: 'Recipient Name'}); - - console.log('Letter dispatched successfully.'); -} - -sendLetter(); -``` - -### Leveraging AI Services - -The platform also integrates AI functionalities, allowing for innovative use cases like generating content, analyzing text, or automating responses: - -```ts -import { AiService } from '@serve.zone/platformservice'; - -async function useAiService() { - const aiService = new AiService('OPENAI_API_KEY'); // Replace with your real API key - const response = await aiService.generateText('Prompt for the AI service.'); - - console.log(`AI response: ${response}`); -} - -useAiService(); -``` - -### Conclusion - -The `@serve.zone/platformservice` offers a robust set of features for modern application requirements, including but not limited to communication and AI services. By following the examples above, developers can integrate these services into their applications, harnessing the power of email, SMS, letters, and artificial intelligence seamlessly. -undefined \ No newline at end of file diff --git a/docs/push.rocks/projectinfo_readme.md b/docs/push.rocks/projectinfo_readme.md index 145dc40..0d61e0e 100644 --- a/docs/push.rocks/projectinfo_readme.md +++ b/docs/push.rocks/projectinfo_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/projectinfo" +source: "gitea" --- # @push.rocks/projectinfo diff --git a/docs/push.rocks/qenv_readme.md b/docs/push.rocks/qenv_readme.md index 269ab98..ad3db41 100644 --- a/docs/push.rocks/qenv_readme.md +++ b/docs/push.rocks/qenv_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/qenv" +source: "gitea" --- # @push.rocks/qenv easy promised environments diff --git a/docs/push.rocks/remoteingress_readme.md b/docs/push.rocks/remoteingress_readme.md deleted file mode 100644 index 102b164..0000000 --- a/docs/push.rocks/remoteingress_readme.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: "@serve.zone/remoteingress" ---- -# @serve.zone/remoteingress - -Provides a service for creating private tunnels and reaching private clusters from the outside as part of the @serve.zone stack. - -## Install - -To install `@serve.zone/remoteingress`, run the following command in your terminal: - -```sh -npm install @serve.zone/remoteingress -``` - -This command will download and install the remoteingress package and its dependencies into your project. - -## Usage - -`@serve.zone/remoteingress` is designed to facilitate the creation of secure private tunnels and enable access to private clusters from external sources, offering an integral part of the @serve.zone stack infrastructure. Below, we illustrate how to employ this package within your project, leveraging TypeScript and ESM syntax for modern, type-safe, and modular code. - -### Prerequisites - -Ensure that you have Node.js and TypeScript installed in your environment. Your project should be set up with TypeScript support, and you might want to familiarize yourself with basic networking concepts and TLS/SSL for secure communication. - -### Importing and Initializing Connectors - -`@serve.zone/remoteingress` offers two primary components: `ConnectorPublic` and `ConnectorPrivate`. Here's how to use them: - -#### Setup ConnectorPublic - -`ConnectorPublic` acts as a gateway, accepting incoming tunnel connections from `ConnectorPrivate` instances and facilitating secure communication between the internet and your private network. - -```typescript -import { ConnectorPublic } from '@serve.zone/remoteingress'; - -// Initialize ConnectorPublic -const publicConnector = new ConnectorPublic({ - tlsOptions: { - key: fs.readFileSync(""), - cert: fs.readFileSync(""), - // Consider including 'ca' and 'passphrase' if required for your setup - }, - listenPort: 443 // Example listen port; adjust based on your needs -}); -``` - -#### Setup ConnectorPrivate - -`ConnectorPrivate` establishes a secure tunnel to `ConnectorPublic`, effectively bridging your internal services with the external point of access. - -```typescript -import { ConnectorPrivate } from '@serve.zone/remoteingress'; - -// Initialize ConnectorPrivate pointing to your ConnectorPublic instance -const privateConnector = new ConnectorPrivate({ - publicHost: 'your.public.domain.tld', - publicPort: 443, // Ensure this matches the listening port of ConnectorPublic - tlsOptions: { - // You might want to specify TLS options here, similar to ConnectorPublic - } -}); -``` - -### Secure Communication - -It's imperative to ensure that the communication between `ConnectorPublic` and `ConnectorPrivate` is secure: - -- Always use valid TLS certificates. -- Prefer using certificates issued by recognized Certificate Authorities (CA). -- Optionally, configure mutual TLS (mTLS) by requiring client certificates for an added layer of security. - -### Advanced Usage - -Both connectors can be finely tuned: - -- **Logging and Monitoring:** Integrate with your existing logging and monitoring systems to keep tabs on tunnel activity, performance metrics, and potential security anomalies. - -- **Custom Handlers:** Implement custom traffic handling logic for specialized routing, filtering, or protocol-specific processing. - -- **Automation:** Automate the deployment and scaling of both `ConnectorPublic` and `ConnectorPrivate` instances using infrastructure-as-code (IAC) tools and practices, ensuring that your tunneling infrastructure can dynamically adapt to the ever-changing needs of your services. - -### Example Scenarios - -1. **Securing Application APIs:** Use `@serve.zone/remoteingress` to expose private APIs to your frontend deployed on a public cloud, ensuring that only your infrastructure can access these endpoints. - -2. **Remote Database Access:** Securely access databases within a private VPC from your local development machine without opening direct access to the internet. - -3. **Service Mesh Integration:** Integrate `@serve.zone/remoteingress` as part of a service mesh setup to securely connect services across multiple clusters with robust identity and encryption at the tunnel level. - -For detailed documentation, API references, and additional use cases, please refer to the inline documentation and source code within the package. Always prioritize security and robustness when dealing with network ingress to protect your infrastructure and data from unauthorized access and threats. - -## License and Legal Information - -This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. - -**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file. - -### Trademarks - -This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH. - -### Company Information - -Task Venture Capital GmbH -Registered at District court Bremen HRB 35230 HB, Germany - -For any legal inquiries or if you require further information, please contact us via email at hello@task.vc. - -By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works. diff --git a/docs/push.rocks/searchquery_readme.md b/docs/push.rocks/searchquery_readme.md index 747feb5..4d99c6d 100644 --- a/docs/push.rocks/searchquery_readme.md +++ b/docs/push.rocks/searchquery_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/searchquery" +source: "gitea" --- # @push.rocks/searchquery a module for dealing with searchqueries diff --git a/docs/push.rocks/smartacme_readme.md b/docs/push.rocks/smartacme_readme.md index 46e432f..7d9a498 100644 --- a/docs/push.rocks/smartacme_readme.md +++ b/docs/push.rocks/smartacme_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartacme" +source: "gitea" --- ```markdown # @push.rocks/smartacme diff --git a/docs/push.rocks/smartaction_readme.md b/docs/push.rocks/smartaction_readme.md index b6dc631..e9a963e 100644 --- a/docs/push.rocks/smartaction_readme.md +++ b/docs/push.rocks/smartaction_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartaction" +source: "gitea" --- # @push.rocks/smartaction a module for managing actions. What was done? What needs to be done? How often should it be done? What's currently being done? diff --git a/docs/push.rocks/smartai_readme.md b/docs/push.rocks/smartai_readme.md index 72c398e..2ab0153 100644 --- a/docs/push.rocks/smartai_readme.md +++ b/docs/push.rocks/smartai_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartai" +source: "gitea" --- # @push.rocks/smartai diff --git a/docs/push.rocks/smartantivirus_readme.md b/docs/push.rocks/smartantivirus_readme.md index 808c211..168b398 100644 --- a/docs/push.rocks/smartantivirus_readme.md +++ b/docs/push.rocks/smartantivirus_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartantivirus" +source: "gitea" --- # @push.rocks/smartantivirus diff --git a/docs/push.rocks/smartarchive_readme.md b/docs/push.rocks/smartarchive_readme.md index f125e5d..f885cfc 100644 --- a/docs/push.rocks/smartarchive_readme.md +++ b/docs/push.rocks/smartarchive_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartarchive" +source: "gitea" --- # @push.rocks/smartarchive diff --git a/docs/push.rocks/smartarray_readme.md b/docs/push.rocks/smartarray_readme.md index af9fc37..91bf664 100644 --- a/docs/push.rocks/smartarray_readme.md +++ b/docs/push.rocks/smartarray_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartarray" +source: "gitea" --- # @push.rocks/smartarray diff --git a/docs/push.rocks/smartbrowser_readme.md b/docs/push.rocks/smartbrowser_readme.md index 160fd6b..230cb66 100644 --- a/docs/push.rocks/smartbrowser_readme.md +++ b/docs/push.rocks/smartbrowser_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartbrowser" +source: "gitea" --- # @push.rocks/smartbrowser simplified puppeteer diff --git a/docs/push.rocks/smartbucket_readme.md b/docs/push.rocks/smartbucket_readme.md index c744699..37e79f0 100644 --- a/docs/push.rocks/smartbucket_readme.md +++ b/docs/push.rocks/smartbucket_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartbucket" +source: "gitea" --- ```markdown # @push.rocks/smartbucket diff --git a/docs/push.rocks/smartbuffer_readme.md b/docs/push.rocks/smartbuffer_readme.md index 62ffeb5..b630763 100644 --- a/docs/push.rocks/smartbuffer_readme.md +++ b/docs/push.rocks/smartbuffer_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartbuffer" +source: "gitea" --- Given the context and limitations, a realistic expansion to cover the 4000 words requirement with detailed usage scenarios and advanced examples for the `@push.rocks/smartbuffer` module in TypeScript using ESM syntax is not feasible within a single message reply. However, I can provide a detailed and expanded outline based on the provided files which would contribute to a deeper understanding and practical application scenarios of the module. diff --git a/docs/push.rocks/smartcache_readme.md b/docs/push.rocks/smartcache_readme.md index 0b88289..25c3881 100644 --- a/docs/push.rocks/smartcache_readme.md +++ b/docs/push.rocks/smartcache_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartcache" +source: "gitea" --- # @push.rocks/smartcache Cache things in smart ways. diff --git a/docs/push.rocks/smartchok_readme.md b/docs/push.rocks/smartchok_readme.md index e7673df..a94dca0 100644 --- a/docs/push.rocks/smartchok_readme.md +++ b/docs/push.rocks/smartchok_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartchok" +source: "gitea" --- # @push.rocks/smartchok smart wrapper for chokidar diff --git a/docs/push.rocks/smartcli_readme.md b/docs/push.rocks/smartcli_readme.md index cf810f4..bdb9b13 100644 --- a/docs/push.rocks/smartcli_readme.md +++ b/docs/push.rocks/smartcli_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartcli" +source: "gitea" --- # @push.rocks/smartcli diff --git a/docs/push.rocks/smartclickhouse_readme.md b/docs/push.rocks/smartclickhouse_readme.md index d854426..bc4f35a 100644 --- a/docs/push.rocks/smartclickhouse_readme.md +++ b/docs/push.rocks/smartclickhouse_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartclickhouse" +source: "gitea" --- # @push.rocks/smartclickhouse diff --git a/docs/push.rocks/smartcls_readme.md b/docs/push.rocks/smartcls_readme.md index ea24255..7817b02 100644 --- a/docs/push.rocks/smartcls_readme.md +++ b/docs/push.rocks/smartcls_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartcls" +source: "gitea" --- # @push.rocks/smartcls diff --git a/docs/push.rocks/smartcontext_readme.md b/docs/push.rocks/smartcontext_readme.md index 5facd94..4ce2b6a 100644 --- a/docs/push.rocks/smartcontext_readme.md +++ b/docs/push.rocks/smartcontext_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartcontext" +source: "gitea" --- # @push.rocks/smartcontext diff --git a/docs/push.rocks/smartcrypto_readme.md b/docs/push.rocks/smartcrypto_readme.md index ac21fca..6934e59 100644 --- a/docs/push.rocks/smartcrypto_readme.md +++ b/docs/push.rocks/smartcrypto_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartcrypto" +source: "gitea" --- # @push.rocks/smartcrypto easy crypto methods diff --git a/docs/push.rocks/smartcsv_readme.md b/docs/push.rocks/smartcsv_readme.md index 46e42f7..6cf6ea1 100644 --- a/docs/push.rocks/smartcsv_readme.md +++ b/docs/push.rocks/smartcsv_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartcsv" +source: "gitea" --- # @push.rocks/smartcsv handle csv data | gitzone standard compliant diff --git a/docs/push.rocks/smartdaemon_readme.md b/docs/push.rocks/smartdaemon_readme.md index c95420c..e9e4032 100644 --- a/docs/push.rocks/smartdaemon_readme.md +++ b/docs/push.rocks/smartdaemon_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartdaemon" +source: "gitea" --- # @push.rocks/smartdaemon start scripts as long running daemons and manage them diff --git a/docs/push.rocks/smartdata_readme.md b/docs/push.rocks/smartdata_readme.md index 64d5f91..e224140 100644 --- a/docs/push.rocks/smartdata_readme.md +++ b/docs/push.rocks/smartdata_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartdata" +source: "gitea" --- # @push.rocks/smartdata do more with data diff --git a/docs/push.rocks/smartdebug_readme.md b/docs/push.rocks/smartdebug_readme.md index 8c0523a..e422aa1 100644 --- a/docs/push.rocks/smartdebug_readme.md +++ b/docs/push.rocks/smartdebug_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartdebug" +source: "gitea" --- # smartdebug diff --git a/docs/push.rocks/smartdelay_readme.md b/docs/push.rocks/smartdelay_readme.md index 759a916..1e733ff 100644 --- a/docs/push.rocks/smartdelay_readme.md +++ b/docs/push.rocks/smartdelay_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartdelay" +source: "gitea" --- # @push.rocks/smartdelay diff --git a/docs/push.rocks/smartdeno_readme.md b/docs/push.rocks/smartdeno_readme.md index bf06d49..43681c7 100644 --- a/docs/push.rocks/smartdeno_readme.md +++ b/docs/push.rocks/smartdeno_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartdeno" +source: "gitea" --- # @push.rocks/smartdeno a module to run deno from node diff --git a/docs/push.rocks/smartdiff_readme.md b/docs/push.rocks/smartdiff_readme.md index fd882bf..adda214 100644 --- a/docs/push.rocks/smartdiff_readme.md +++ b/docs/push.rocks/smartdiff_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartdiff" +source: "gitea" --- # @push.rocks/smartdiff a diffing lib for text diff --git a/docs/push.rocks/smartdns_readme.md b/docs/push.rocks/smartdns_readme.md index a999f32..ce85bd4 100644 --- a/docs/push.rocks/smartdns_readme.md +++ b/docs/push.rocks/smartdns_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartdns" +source: "gitea" --- # @push.rocks/smartdns A TypeScript library for smart DNS methods, supporting various DNS records and providers. diff --git a/docs/push.rocks/smartdocumentation_readme.md b/docs/push.rocks/smartdocumentation_readme.md index 0641edc..d8010b6 100644 --- a/docs/push.rocks/smartdocumentation_readme.md +++ b/docs/push.rocks/smartdocumentation_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartdocumentation" +source: "gitea" --- # @push.rocks/smartdocumentation a tool for mapping git directories to documentation sites diff --git a/docs/push.rocks/smartdrive_readme.md b/docs/push.rocks/smartdrive_readme.md index 6bc9fcc..bbece5e 100644 --- a/docs/push.rocks/smartdrive_readme.md +++ b/docs/push.rocks/smartdrive_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartdrive" +source: "gitea" --- # @push.rocks/smartdrive do more with local and cloud drives diff --git a/docs/push.rocks/smartenv_readme.md b/docs/push.rocks/smartenv_readme.md index d5cd3c4..2140391 100644 --- a/docs/push.rocks/smartenv_readme.md +++ b/docs/push.rocks/smartenv_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartenv" +source: "gitea" --- # @push.rocks/smartenv diff --git a/docs/push.rocks/smartevent_readme.md b/docs/push.rocks/smartevent_readme.md index c47f069..e6cb220 100644 --- a/docs/push.rocks/smartevent_readme.md +++ b/docs/push.rocks/smartevent_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartevent" +source: "gitea" --- # @push.rocks/smartevent handle events in smart ways diff --git a/docs/push.rocks/smartexit_readme.md b/docs/push.rocks/smartexit_readme.md index bf88ecf..12d8044 100644 --- a/docs/push.rocks/smartexit_readme.md +++ b/docs/push.rocks/smartexit_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartexit" +source: "gitea" --- # @push.rocks/smartexit diff --git a/docs/push.rocks/smartexpect_readme.md b/docs/push.rocks/smartexpect_readme.md index a163b61..7875247 100644 --- a/docs/push.rocks/smartexpect_readme.md +++ b/docs/push.rocks/smartexpect_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartexpect" +source: "gitea" --- # @push.rocks/smartexpect manage expectations in code diff --git a/docs/push.rocks/smartexpose_readme.md b/docs/push.rocks/smartexpose_readme.md index 95258c9..e06d5a1 100644 --- a/docs/push.rocks/smartexpose_readme.md +++ b/docs/push.rocks/smartexpose_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartexpose" +source: "gitea" --- # @push.rocks/smartexpose a package to expose things to the internet diff --git a/docs/push.rocks/smartfeed_readme.md b/docs/push.rocks/smartfeed_readme.md index 715123c..1d6a100 100644 --- a/docs/push.rocks/smartfeed_readme.md +++ b/docs/push.rocks/smartfeed_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartfeed" +source: "gitea" --- # @push.rocks/smartfeed create and parse feeds diff --git a/docs/push.rocks/smartfile-interfaces_readme.md b/docs/push.rocks/smartfile-interfaces_readme.md index 6951222..68075ae 100644 --- a/docs/push.rocks/smartfile-interfaces_readme.md +++ b/docs/push.rocks/smartfile-interfaces_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartfile-interfaces" +source: "gitea" --- # @push.rocks/smartfile-interfaces diff --git a/docs/push.rocks/smartfile_readme.md b/docs/push.rocks/smartfile_readme.md index dad62b2..d1afc88 100644 --- a/docs/push.rocks/smartfile_readme.md +++ b/docs/push.rocks/smartfile_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartfile" +source: "gitea" --- # @push.rocks/smartfile diff --git a/docs/push.rocks/smartfm_readme.md b/docs/push.rocks/smartfm_readme.md index d323366..ce10263 100644 --- a/docs/push.rocks/smartfm_readme.md +++ b/docs/push.rocks/smartfm_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartfm" +source: "gitea" --- # @push.rocks/smartfm diff --git a/docs/push.rocks/smartformat_readme.md b/docs/push.rocks/smartformat_readme.md index 21d928f..84e4a74 100644 --- a/docs/push.rocks/smartformat_readme.md +++ b/docs/push.rocks/smartformat_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartformat" +source: "gitea" --- # @push.rocks/smartformat diff --git a/docs/push.rocks/smartfuzzy_readme.md b/docs/push.rocks/smartfuzzy_readme.md index 6bca0bb..d495fd1 100644 --- a/docs/push.rocks/smartfuzzy_readme.md +++ b/docs/push.rocks/smartfuzzy_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartfuzzy" +source: "gitea" --- # @push.rocks/smartfuzzy diff --git a/docs/push.rocks/smartgit_readme.md b/docs/push.rocks/smartgit_readme.md index 2f80e6a..bb752e5 100644 --- a/docs/push.rocks/smartgit_readme.md +++ b/docs/push.rocks/smartgit_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartgit" +source: "gitea" --- # @push.rocks/smartgit smart wrapper for nodegit diff --git a/docs/push.rocks/smartguard_readme.md b/docs/push.rocks/smartguard_readme.md index fa6c2ae..9f9e1c2 100644 --- a/docs/push.rocks/smartguard_readme.md +++ b/docs/push.rocks/smartguard_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartguard" +source: "gitea" --- # @push.rocks/smartguard A TypeScript library for creating and managing validation guards, aiding in data validation and security checks. diff --git a/docs/push.rocks/smartgulp_readme.md b/docs/push.rocks/smartgulp_readme.md index 6c07451..3eceac1 100644 --- a/docs/push.rocks/smartgulp_readme.md +++ b/docs/push.rocks/smartgulp_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartgulp" +source: "gitea" --- # @push.rocks/smartgulp lightweight gulp replacement diff --git a/docs/push.rocks/smarthash_readme.md b/docs/push.rocks/smarthash_readme.md index a95a933..1d0e4df 100644 --- a/docs/push.rocks/smarthash_readme.md +++ b/docs/push.rocks/smarthash_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smarthash" +source: "gitea" --- # @push.rocks/smarthash simplified access to node hash functions diff --git a/docs/push.rocks/smarthello_readme.md b/docs/push.rocks/smarthello_readme.md deleted file mode 100644 index a0fde78..0000000 --- a/docs/push.rocks/smarthello_readme.md +++ /dev/null @@ -1,191 +0,0 @@ ---- -title: "@push.rocks/smarthbs" ---- -# @push.rocks/smarthbs - -A library that enhances handlebars with better file system support, templates compilation, and partials registration. - -## Install - -To install `@push.rocks/smarthbs`, run the following command in your terminal: - -```bash -npm install @push.rocks/smarthbs --save -``` - -This will add `@push.rocks/smarthbs` as a dependency to your project, allowing you to leverage its enhanced Handlebars templating capabilities. - -## Usage - -The `@push.rocks/smarthbs` library extends Handlebars functionality by introducing better file system interaction, template compilation, and an easier way to manage partials. The following sections walk you through the various features and how you can utilize them for creating dynamic and organized templates. - -### Getting Started - -First, import the `@push.rocks/smarthbs` module using ECMAScript Module (ESM) syntax in a TypeScript file: - -```typescript -import * as smarthbs from '@push.rocks/smarthbs'; -``` - -### Managing Partials - -Handlebars' partials allow for embedding templates within other templates, making it simple to manage reusable pieces of template code. With `@push.rocks/smarthbs`, you can efficiently register an entire directory of partials. - -#### Registering a Directory of Partials - -To register all `.hbs` files in a directory, including those in subdirectories, as partials: - -```typescript -await smarthbs.registerPartialDir('./path/to/partials'); -``` - -Each `.hbs` file in the specified directory becomes available as a partial. Partials are identified by their paths relative to the specified directory. - -### Compiling Templates - -Compiling directories of Handlebars templates is seamless with `@push.rocks/smarthbs`. This feature reads templates from a source directory, compiles them using a specified data context, and writes the rendered output to a destination directory. - -#### Compile a Directory - -```typescript -await smarthbs.compileDirectory('./source/templates', './destination/html', 'data.json'); -``` - -Here, every `.hbs` file in `./source/templates` is compiled with data from `data.json`. The rendered outputs are saved as `.html` files in `./destination/html`. - -### Working with Variables - -When handling complex templates, you might want to analyze which variables are used, verify their satisfaction, and ensure data completeness. - -#### Finding Variables in Templates - -To extract all variables used within a Handlebars template string: - -```typescript -const templateVariables = await smarthbs.findVarsInHbsString("Your template {-{example}-} here."); -console.log(templateVariables); // Outputs an array of variable names: ['example'] -``` - -#### Ensuring Variables Satisfaction - -To check if a given data object satisfies all required variables in a template: - -```typescript -const missingVars = await smarthbs.checkVarsSatisfaction("Your template {-{example}-} here.", { anotherVar: "some value" }); -if(missingVars.length) { - console.error('Missing variables:', missingVars); -} -``` - -This function ensures the provided data object contains all variables used in the template. Otherwise, it returns an array with the names of the missing variables. - -### Rendering Templates - -You can use `@push.rocks/smarthbs` to compile Handlebars templates directly from strings or files: - -#### From a String - -```typescript -const stringTemplate = await smarthbs.getTemplateForString("Hello, {-{name}-}!"); -const renderedString = stringTemplate({ name: "World" }); -console.log(renderedString); // "Hello, World!" -``` - -#### From a File - -```typescript -const fileTemplate = await smarthbs.getTemplateForFile('./path/to/template.hbs'); -const renderedFileString = fileTemplate({ key: "value" }); -console.log(renderedFileString); // Outputs the processed template with provided data -``` - -### Ensuring Safe Syntax - -If your Handlebars templates go through multiple processing stages, you might need to protect and restore the syntax: - -```typescript -const processedString = await smarthbs.postprocess("This is {-{safe}-} syntax."); -console.log(processedString); // Restores to "This is {-{safe}-} syntax." -``` - -This approach allows you to keep placeholders intact during various stages, converting `{-{ ... }-}` syntax back to `{-{ ... }-}`. - -### Advanced Features and Helpers - -#### Custom Helpers - -Extend Handlebars with custom helpers to introduce new functionalities or debug existing templates. For instance: - -- **Analyze Helper**: Displays partials and their details. -- **Log Registered Partials**: Logs all registered partials, aiding in debugging. -- **Runtime Compilation**: Compile templates dynamically using the `__compile` helper. - -### Example: Building an HTML Page - -Suppose you are building a simple HTML page. First, define a partial for the header and a general layout: - -Create a new header partial: - -```hbs - -
-

{-{title}-}

-
-``` - -Define a base layout that includes the header and a body: - -```hbs - -{-{> header title=pageTitle}-} -
-

{-{subtitle}-}

-

{-{content}-}

-
-``` - -In your script, register partials and compile the layout: - -```typescript -import * as smarthbs from '@push.rocks/smarthbs'; - -// Register partials -await smarthbs.registerPartialDir('./partials'); - -// Prepare data for compilation -const data = { - pageTitle: "My Awesome Page", - subtitle: "Welcome to the world of dynamic templates!", - content: "Handlebars makes creating reusable templates easy." -}; - -// Compile and render the layout -const mainTemplate = await smarthbs.getTemplateForFile('./layouts/main.hbs'); -const renderedHtml = mainTemplate(data); - -console.log(renderedHtml); -// Outputs the full HTML replacing variables in the layout with data -``` - -### Conclusion - -The `@push.rocks/smarthbs` library enhances the already powerful Handlebars templating engine with capabilities that are crucial for modern development workflows, especially those involving complex template management and dynamic content generation. Whether managing large-scale projects with numerous reusable components or simply wanting a better way to handle templates and partials, this tool provides a robust solution to enhance your projects and improve productivity. - -## License and Legal Information - -This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. - -**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file. - -### Trademarks - -This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH. - -### Company Information - -Task Venture Capital GmbH -Registered at District court Bremen HRB 35230 HB, Germany - -For any legal inquiries or if you require further information, please contact us via email at hello@task.vc. - -By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works. diff --git a/docs/push.rocks/smarthomebridge_readme.md b/docs/push.rocks/smarthomebridge_readme.md index b62290a..37bbc46 100644 --- a/docs/push.rocks/smarthomebridge_readme.md +++ b/docs/push.rocks/smarthomebridge_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smarthomebridge" +source: "gitea" --- # @push.rocks/smarthomebridge a homebridge abstraction package diff --git a/docs/push.rocks/smarti18n_readme.md b/docs/push.rocks/smarti18n_readme.md index 55834a6..9b5914f 100644 --- a/docs/push.rocks/smarti18n_readme.md +++ b/docs/push.rocks/smarti18n_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smarti18n" +source: "gitea" --- # @push.rocks/smarti18n a package dealing with i18n stuff diff --git a/docs/push.rocks/smartimap_readme.md b/docs/push.rocks/smartimap_readme.md index 193b520..30c4f46 100644 --- a/docs/push.rocks/smartimap_readme.md +++ b/docs/push.rocks/smartimap_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartimap" +source: "gitea" --- # @push.rocks/smartimap diff --git a/docs/push.rocks/smartinteract_readme.md b/docs/push.rocks/smartinteract_readme.md index a993836..4295d37 100644 --- a/docs/push.rocks/smartinteract_readme.md +++ b/docs/push.rocks/smartinteract_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartinteract" +source: "gitea" --- # @push.rocks/smartinteract diff --git a/docs/push.rocks/smartipc_readme.md b/docs/push.rocks/smartipc_readme.md index 62d91e7..c8d8dc2 100644 --- a/docs/push.rocks/smartipc_readme.md +++ b/docs/push.rocks/smartipc_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartipc" +source: "gitea" --- # @push.rocks/smartipc node inter process communication diff --git a/docs/push.rocks/smartjimp_readme.md b/docs/push.rocks/smartjimp_readme.md index 26cfa8c..29aab3c 100644 --- a/docs/push.rocks/smartjimp_readme.md +++ b/docs/push.rocks/smartjimp_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartjimp" +source: "gitea" --- # @push.rocks/smartjimp a tool fr working with images in TypeScript diff --git a/docs/push.rocks/smartjson_readme.md b/docs/push.rocks/smartjson_readme.md index 6a8ea34..e83fb6a 100644 --- a/docs/push.rocks/smartjson_readme.md +++ b/docs/push.rocks/smartjson_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartjson" +source: "gitea" --- # @push.rocks/smartjson typed json handlers diff --git a/docs/push.rocks/smartjwt_readme.md b/docs/push.rocks/smartjwt_readme.md index 1f01b4a..af4165c 100644 --- a/docs/push.rocks/smartjwt_readme.md +++ b/docs/push.rocks/smartjwt_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartjwt" +source: "gitea" --- # @push.rocks/smartjwt a package for handling jwt diff --git a/docs/push.rocks/smartkey_readme.md b/docs/push.rocks/smartkey_readme.md index dae5240..8b7a928 100644 --- a/docs/push.rocks/smartkey_readme.md +++ b/docs/push.rocks/smartkey_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartkey" +source: "gitea" --- # @push.rocks/smartkey Handle private/public key creation efficiently and securely with this TypeScript-based library, offering seamless integration and robust functionality for managing cryptographic key pairs. diff --git a/docs/push.rocks/smartlegal_readme.md b/docs/push.rocks/smartlegal_readme.md index 8e46908..2ff1d1a 100644 --- a/docs/push.rocks/smartlegal_readme.md +++ b/docs/push.rocks/smartlegal_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartlegal" +source: "gitea" --- # @push.rocks/smartlegal go legal programmatically diff --git a/docs/push.rocks/smartlifecycle_readme.md b/docs/push.rocks/smartlifecycle_readme.md index a71dd02..3bfa9a5 100644 --- a/docs/push.rocks/smartlifecycle_readme.md +++ b/docs/push.rocks/smartlifecycle_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartlifecycle" +source: "gitea" --- # @push.rocks/smartlifecycle diff --git a/docs/push.rocks/smartlog-destination-clickhouse_readme.md b/docs/push.rocks/smartlog-destination-clickhouse_readme.md index a4b732b..a2425f0 100644 --- a/docs/push.rocks/smartlog-destination-clickhouse_readme.md +++ b/docs/push.rocks/smartlog-destination-clickhouse_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartlog-destination-clickhouse" +source: "gitea" --- # @push.rocks/smartlog-destination-clickhouse a smartlog destination pushing logs to clickhouse diff --git a/docs/push.rocks/smartlog-destination-devtools_readme.md b/docs/push.rocks/smartlog-destination-devtools_readme.md index 18487fd..da2455e 100644 --- a/docs/push.rocks/smartlog-destination-devtools_readme.md +++ b/docs/push.rocks/smartlog-destination-devtools_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartlog-destination-devtools" +source: "gitea" --- # @push.rocks/smartlog-destination-devtools beautiful logging for the browser diff --git a/docs/push.rocks/smartlog-destination-file_readme.md b/docs/push.rocks/smartlog-destination-file_readme.md index 5af08c0..c924fb5 100644 --- a/docs/push.rocks/smartlog-destination-file_readme.md +++ b/docs/push.rocks/smartlog-destination-file_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartlog-destination-file" +source: "gitea" --- # @push.rocks/smartlog-destination-file a smartlog destination for transparently writing to a file diff --git a/docs/push.rocks/smartlog-destination-local_readme.md b/docs/push.rocks/smartlog-destination-local_readme.md index 775cdae..bd8f493 100644 --- a/docs/push.rocks/smartlog-destination-local_readme.md +++ b/docs/push.rocks/smartlog-destination-local_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartlog-destination-local" +source: "gitea" --- # @push.rocks/smartlog-destination-local a smartlog destination targeting the local console diff --git a/docs/push.rocks/smartlog-destination-receiver_readme.md b/docs/push.rocks/smartlog-destination-receiver_readme.md index b2cd87d..2160b7a 100644 --- a/docs/push.rocks/smartlog-destination-receiver_readme.md +++ b/docs/push.rocks/smartlog-destination-receiver_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartlog-destination-receiver" +source: "gitea" --- # @push.rocks/smartlog-destination-receiver a smartlog destination for smartlog-receiver diff --git a/docs/push.rocks/smartlog-interfaces_readme.md b/docs/push.rocks/smartlog-interfaces_readme.md index 7d5f4e7..8d1a723 100644 --- a/docs/push.rocks/smartlog-interfaces_readme.md +++ b/docs/push.rocks/smartlog-interfaces_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartlog-interfaces" +source: "gitea" --- # @push.rocks/smartlog-interfaces interfaces for the smartlog ecosystem diff --git a/docs/push.rocks/smartlog-receiver_readme.md b/docs/push.rocks/smartlog-receiver_readme.md index 392a489..8e0fa75 100644 --- a/docs/push.rocks/smartlog-receiver_readme.md +++ b/docs/push.rocks/smartlog-receiver_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartlog-receiver" +source: "gitea" --- # @push.rocks/smartlog-receiver a receiver for smartlog-destination-receiver diff --git a/docs/push.rocks/smartlog-source-ora_readme.md b/docs/push.rocks/smartlog-source-ora_readme.md index b03c81e..d5726bc 100644 --- a/docs/push.rocks/smartlog-source-ora_readme.md +++ b/docs/push.rocks/smartlog-source-ora_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartlog-source-ora" +source: "gitea" --- # @push.rocks/smartlog-source-ora a smartlog source wrapping ora for local display diff --git a/docs/push.rocks/smartlog_readme.md b/docs/push.rocks/smartlog_readme.md index 32d4534..c6ae9b0 100644 --- a/docs/push.rocks/smartlog_readme.md +++ b/docs/push.rocks/smartlog_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartlog" +source: "gitea" --- # @push.rocks/smartlog diff --git a/docs/push.rocks/smartmail_readme.md b/docs/push.rocks/smartmail_readme.md index ee3d853..cdf4474 100644 --- a/docs/push.rocks/smartmail_readme.md +++ b/docs/push.rocks/smartmail_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartmail" +source: "gitea" --- # @push.rocks/smartmail a unified format for representing and dealing with mails diff --git a/docs/push.rocks/smartmanifest_readme.md b/docs/push.rocks/smartmanifest_readme.md index 664c3b0..cd1999a 100644 --- a/docs/push.rocks/smartmanifest_readme.md +++ b/docs/push.rocks/smartmanifest_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartmanifest" +source: "gitea" --- # @push.rocks/smartmanifest a module for creating web app manifests diff --git a/docs/push.rocks/smartmarkdown_readme.md b/docs/push.rocks/smartmarkdown_readme.md index e0d8094..35cf635 100644 --- a/docs/push.rocks/smartmarkdown_readme.md +++ b/docs/push.rocks/smartmarkdown_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartmarkdown" +source: "gitea" --- # @push.rocks/smartmarkdown do more with markdown files diff --git a/docs/push.rocks/smartmatch_readme.md b/docs/push.rocks/smartmatch_readme.md index 56722cf..57b2ada 100644 --- a/docs/push.rocks/smartmatch_readme.md +++ b/docs/push.rocks/smartmatch_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartmatch" +source: "gitea" --- # @push.rocks/smartmatch a minimal matching library using picomatch diff --git a/docs/push.rocks/smartmetrics_readme.md b/docs/push.rocks/smartmetrics_readme.md index 64f58bf..a8872b9 100644 --- a/docs/push.rocks/smartmetrics_readme.md +++ b/docs/push.rocks/smartmetrics_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartmetrics" +source: "gitea" --- # @push.rocks/smartmetrics diff --git a/docs/push.rocks/smartmime_readme.md b/docs/push.rocks/smartmime_readme.md index cc8c04e..b0252fb 100644 --- a/docs/push.rocks/smartmime_readme.md +++ b/docs/push.rocks/smartmime_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartmime" +source: "gitea" --- # @push.rocks/smartmime a module to detect mime types diff --git a/docs/push.rocks/smartmoney_readme.md b/docs/push.rocks/smartmoney_readme.md index 996f2a7..a33f139 100644 --- a/docs/push.rocks/smartmoney_readme.md +++ b/docs/push.rocks/smartmoney_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartmoney" +source: "gitea" --- # @push.rocks/smartmoney handle monetary values diff --git a/docs/push.rocks/smartmongo_readme.md b/docs/push.rocks/smartmongo_readme.md index 1de795d..abc797a 100644 --- a/docs/push.rocks/smartmongo_readme.md +++ b/docs/push.rocks/smartmongo_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartmongo" +source: "gitea" --- # @push.rocks/smartmongo create a local mongodb for testing diff --git a/docs/push.rocks/smartmustache_readme.md b/docs/push.rocks/smartmustache_readme.md index 382fd4b..22b5452 100644 --- a/docs/push.rocks/smartmustache_readme.md +++ b/docs/push.rocks/smartmustache_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartmustache" +source: "gitea" --- # @push.rocks/smartmustache templates done right diff --git a/docs/push.rocks/smartnetwork_readme.md b/docs/push.rocks/smartnetwork_readme.md index 333018b..467728d 100644 --- a/docs/push.rocks/smartnetwork_readme.md +++ b/docs/push.rocks/smartnetwork_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartnetwork" +source: "gitea" --- # @push.rocks/smartnetwork network diagnostics diff --git a/docs/push.rocks/smartnginx_readme.md b/docs/push.rocks/smartnginx_readme.md index 51ec24a..790c06b 100644 --- a/docs/push.rocks/smartnginx_readme.md +++ b/docs/push.rocks/smartnginx_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartnginx" +source: "gitea" --- # @push.rocks/smartnginx control nginx from node, TypeScript ready diff --git a/docs/push.rocks/smartnpm_readme.md b/docs/push.rocks/smartnpm_readme.md index bd1c510..a3d26cf 100644 --- a/docs/push.rocks/smartnpm_readme.md +++ b/docs/push.rocks/smartnpm_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartnpm" +source: "gitea" --- # @push.rocks/smartnpm interface with npm to retrieve package information diff --git a/docs/push.rocks/smartntml_readme.md b/docs/push.rocks/smartntml_readme.md index 0855775..52dc715 100644 --- a/docs/push.rocks/smartntml_readme.md +++ b/docs/push.rocks/smartntml_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartntml" +source: "gitea" --- # @push.rocks/smartntml lit-html for the backend diff --git a/docs/push.rocks/smartobject_readme.md b/docs/push.rocks/smartobject_readme.md index c5f3af5..5e98c39 100644 --- a/docs/push.rocks/smartobject_readme.md +++ b/docs/push.rocks/smartobject_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartobject" +source: "gitea" --- # @push.rocks/smartobject work with objects diff --git a/docs/push.rocks/smartocr_readme.md b/docs/push.rocks/smartocr_readme.md index ac9722e..c1b40d3 100644 --- a/docs/push.rocks/smartocr_readme.md +++ b/docs/push.rocks/smartocr_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartocr" +source: "gitea" --- # @push.rocks/smartocr an ocr module using ocrmypdf diff --git a/docs/push.rocks/smartopen_readme.md b/docs/push.rocks/smartopen_readme.md index 0357a7c..3a4e0d0 100644 --- a/docs/push.rocks/smartopen_readme.md +++ b/docs/push.rocks/smartopen_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartopen" +source: "gitea" --- # @push.rocks/smartopen open things diff --git a/docs/push.rocks/smartparcel_readme.md b/docs/push.rocks/smartparcel_readme.md index a58cde3..82f5eaf 100644 --- a/docs/push.rocks/smartparcel_readme.md +++ b/docs/push.rocks/smartparcel_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartparcel" +source: "gitea" --- # @push.rocks/smartparcel a wrapper for parcel diff --git a/docs/push.rocks/smartpath_readme.md b/docs/push.rocks/smartpath_readme.md index 442fb37..a9fe789 100644 --- a/docs/push.rocks/smartpath_readme.md +++ b/docs/push.rocks/smartpath_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartpath" +source: "gitea" --- # @push.rocks/smartpath diff --git a/docs/push.rocks/smartpdf_readme.md b/docs/push.rocks/smartpdf_readme.md index 01337ed..6e3a8b8 100644 --- a/docs/push.rocks/smartpdf_readme.md +++ b/docs/push.rocks/smartpdf_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartpdf" +source: "gitea" --- # @push.rocks/smartpdf Create PDFs on the fly diff --git a/docs/push.rocks/smartping_readme.md b/docs/push.rocks/smartping_readme.md index c16955b..1ba2780 100644 --- a/docs/push.rocks/smartping_readme.md +++ b/docs/push.rocks/smartping_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartping" +source: "gitea" --- # @push.rocks/smartping a ping utility diff --git a/docs/push.rocks/smartpnpm_readme.md b/docs/push.rocks/smartpnpm_readme.md index b467dcc..05d56f0 100644 --- a/docs/push.rocks/smartpnpm_readme.md +++ b/docs/push.rocks/smartpnpm_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartpnpm" +source: "gitea" --- # @push.rocks/smartpnpm use pnpm in your code diff --git a/docs/push.rocks/smartpromise_readme.md b/docs/push.rocks/smartpromise_readme.md index 269c141..8371cb1 100644 --- a/docs/push.rocks/smartpromise_readme.md +++ b/docs/push.rocks/smartpromise_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartpromise" +source: "gitea" --- # @push.rocks/smartpromise diff --git a/docs/push.rocks/smartproxy_readme.md b/docs/push.rocks/smartproxy_readme.md index a7fcb1d..fc460ed 100644 --- a/docs/push.rocks/smartproxy_readme.md +++ b/docs/push.rocks/smartproxy_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartproxy" +source: "gitea" --- # @push.rocks/smartproxy A proxy for handling high workloads of proxying. diff --git a/docs/push.rocks/smartpuppeteer_readme.md b/docs/push.rocks/smartpuppeteer_readme.md index 565f9c0..d3408d4 100644 --- a/docs/push.rocks/smartpuppeteer_readme.md +++ b/docs/push.rocks/smartpuppeteer_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartpuppeteer" +source: "gitea" --- # @push.rocks/smartpuppeteer simplified access to puppeteer diff --git a/docs/push.rocks/smartreport_readme.md b/docs/push.rocks/smartreport_readme.md index 23fa4ef..b47c174 100644 --- a/docs/push.rocks/smartreport_readme.md +++ b/docs/push.rocks/smartreport_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartreport" +source: "gitea" --- # @push.rocks/smartreport create reports and display them on the web diff --git a/docs/push.rocks/smartrequest_readme.md b/docs/push.rocks/smartrequest_readme.md index 4e7592c..2de4191 100644 --- a/docs/push.rocks/smartrequest_readme.md +++ b/docs/push.rocks/smartrequest_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartrequest" +source: "gitea" --- # @push.rocks/smartrequest A module providing a drop-in replacement for the deprecated Request library, focusing on modern HTTP/HTTPS requests with support for form data, file uploads, JSON, binary data, and streams. diff --git a/docs/push.rocks/smartrestic_readme.md b/docs/push.rocks/smartrestic_readme.md index be74559..b23d432 100644 --- a/docs/push.rocks/smartrestic_readme.md +++ b/docs/push.rocks/smartrestic_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartrestic" +source: "gitea" --- # @push.rocks/smartrestic a modules packaging restic diff --git a/docs/push.rocks/smartrobots_readme.md b/docs/push.rocks/smartrobots_readme.md index 68a0698..b330216 100644 --- a/docs/push.rocks/smartrobots_readme.md +++ b/docs/push.rocks/smartrobots_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartrobots" +source: "gitea" --- # @push.rocks/smartrobots a module for making sense of robots.txt diff --git a/docs/push.rocks/smartrouter_readme.md b/docs/push.rocks/smartrouter_readme.md index 2c18a7c..da5605c 100644 --- a/docs/push.rocks/smartrouter_readme.md +++ b/docs/push.rocks/smartrouter_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartrouter" +source: "gitea" --- # @push.rocks/smartrouter a router for routing on websites diff --git a/docs/push.rocks/smartrule_readme.md b/docs/push.rocks/smartrule_readme.md index 26e7a7d..9aad91b 100644 --- a/docs/push.rocks/smartrule_readme.md +++ b/docs/push.rocks/smartrule_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartrule" +source: "gitea" --- # @push.rocks/smartrule diff --git a/docs/push.rocks/smartrx_readme.md b/docs/push.rocks/smartrx_readme.md index fb95884..26e75b7 100644 --- a/docs/push.rocks/smartrx_readme.md +++ b/docs/push.rocks/smartrx_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartrx" +source: "gitea" --- # @push.rocks/smartrx diff --git a/docs/push.rocks/smarts3_readme.md b/docs/push.rocks/smarts3_readme.md index a5c96b7..6511635 100644 --- a/docs/push.rocks/smarts3_readme.md +++ b/docs/push.rocks/smarts3_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smarts3" +source: "gitea" --- ````markdown # @push.rocks/smarts3 diff --git a/docs/push.rocks/smartscaf_readme.md b/docs/push.rocks/smartscaf_readme.md index 1cbeebf..ef35c58 100644 --- a/docs/push.rocks/smartscaf_readme.md +++ b/docs/push.rocks/smartscaf_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartscaf" +source: "gitea" --- # @push.rocks/smartscaf scaffold projects quickly diff --git a/docs/push.rocks/smartshell_readme.md b/docs/push.rocks/smartshell_readme.md index 431be01..cfbb55b 100644 --- a/docs/push.rocks/smartshell_readme.md +++ b/docs/push.rocks/smartshell_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartshell" +source: "gitea" --- # @push.rocks/smartshell shell actions designed as promises diff --git a/docs/push.rocks/smartsign_readme.md b/docs/push.rocks/smartsign_readme.md index 887476a..a6c1c31 100644 --- a/docs/push.rocks/smartsign_readme.md +++ b/docs/push.rocks/smartsign_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartsign" +source: "gitea" --- # @push.rocks/smartsign diff --git a/docs/push.rocks/smartsitemap_readme.md b/docs/push.rocks/smartsitemap_readme.md index a8682f8..a1def2e 100644 --- a/docs/push.rocks/smartsitemap_readme.md +++ b/docs/push.rocks/smartsitemap_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartsitemap" +source: "gitea" --- # @push.rocks/smartsitemap a sitemap module diff --git a/docs/push.rocks/smartsmtp_readme.md b/docs/push.rocks/smartsmtp_readme.md index 39a2c87..b64ff17 100644 --- a/docs/push.rocks/smartsmtp_readme.md +++ b/docs/push.rocks/smartsmtp_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartsmtp" +source: "gitea" --- # @push.rocks/smartsmtp a module for handling smtp stuff diff --git a/docs/push.rocks/smartsocket_readme.md b/docs/push.rocks/smartsocket_readme.md index 648f1b9..9e69de2 100644 --- a/docs/push.rocks/smartsocket_readme.md +++ b/docs/push.rocks/smartsocket_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartsocket" +source: "gitea" --- # @push.rocks/smartsocket easy and secure websocket communication diff --git a/docs/push.rocks/smartsourcemap_readme.md b/docs/push.rocks/smartsourcemap_readme.md index fd33012..b23ce34 100644 --- a/docs/push.rocks/smartsourcemap_readme.md +++ b/docs/push.rocks/smartsourcemap_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartsourcemap" +source: "gitea" --- # @push.rocks/smartsourcemap get sourcemap support in node diff --git a/docs/push.rocks/smartspawn_readme.md b/docs/push.rocks/smartspawn_readme.md index 318f19b..62dffef 100644 --- a/docs/push.rocks/smartspawn_readme.md +++ b/docs/push.rocks/smartspawn_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartspawn" +source: "gitea" --- Given the provided files and their contents, the comprehensive documentation for using **`@push.rocks/smartspawn`** with TypeScript and in a manner that provides thorough examples and descriptions of features and scenarios is extensive. However, I'll outline a concise and informative usage guide that can serve as a helpful starting point. For an in-depth understanding and a complete reference to all features, further reading, exploration, and experimentation with the library are recommended. diff --git a/docs/push.rocks/smartssh_readme.md b/docs/push.rocks/smartssh_readme.md index 6477c0c..cf40f56 100644 --- a/docs/push.rocks/smartssh_readme.md +++ b/docs/push.rocks/smartssh_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartssh" +source: "gitea" --- # @push.rocks/smartssh setup SSH quickly and in a painless manner diff --git a/docs/push.rocks/smartssr_readme.md b/docs/push.rocks/smartssr_readme.md index a03fd31..81ecb53 100644 --- a/docs/push.rocks/smartssr_readme.md +++ b/docs/push.rocks/smartssr_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartssr" +source: "gitea" --- # @push.rocks/smartssr a smart server side renderer supporting shadow dom diff --git a/docs/push.rocks/smartstate_readme.md b/docs/push.rocks/smartstate_readme.md index 61b5dc5..fe013fb 100644 --- a/docs/push.rocks/smartstate_readme.md +++ b/docs/push.rocks/smartstate_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartstate" +source: "gitea" --- # @push.rocks/smartstate a package that handles state in a good way diff --git a/docs/push.rocks/smartstatus_readme.md b/docs/push.rocks/smartstatus_readme.md index 459a1d2..5a90dfd 100644 --- a/docs/push.rocks/smartstatus_readme.md +++ b/docs/push.rocks/smartstatus_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartstatus" +source: "gitea" --- # @push.rocks/smartstatus diff --git a/docs/push.rocks/smartstream_readme.md b/docs/push.rocks/smartstream_readme.md index 17b79ab..4943a1d 100644 --- a/docs/push.rocks/smartstream_readme.md +++ b/docs/push.rocks/smartstream_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartstream" +source: "gitea" --- ```markdown # @push.rocks/smartstream diff --git a/docs/push.rocks/smartstring_readme.md b/docs/push.rocks/smartstring_readme.md index 7066f60..6cca654 100644 --- a/docs/push.rocks/smartstring_readme.md +++ b/docs/push.rocks/smartstring_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartstring" +source: "gitea" --- # @push.rocks/smartstring handle strings in smart ways. TypeScript ready. diff --git a/docs/push.rocks/smartswagger_readme.md b/docs/push.rocks/smartswagger_readme.md index eafd8e0..04e0904 100644 --- a/docs/push.rocks/smartswagger_readme.md +++ b/docs/push.rocks/smartswagger_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartswagger" +source: "gitea" --- # @push.rocks/smartswagger a swagger tookit for working with swagger files diff --git a/docs/push.rocks/smartsystem_readme.md b/docs/push.rocks/smartsystem_readme.md index ec88566..ffeb81f 100644 --- a/docs/push.rocks/smartsystem_readme.md +++ b/docs/push.rocks/smartsystem_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartsystem" +source: "gitea" --- # @push.rocks/smartsystem interact with the system you are running on diff --git a/docs/push.rocks/smarttime_readme.md b/docs/push.rocks/smarttime_readme.md index e571da4..f211bf7 100644 --- a/docs/push.rocks/smarttime_readme.md +++ b/docs/push.rocks/smarttime_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smarttime" +source: "gitea" --- # @push.rocks/smarttime handle time in smart ways diff --git a/docs/push.rocks/smartunique_readme.md b/docs/push.rocks/smartunique_readme.md index 426de03..78539be 100644 --- a/docs/push.rocks/smartunique_readme.md +++ b/docs/push.rocks/smartunique_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartunique" +source: "gitea" --- # @push.rocks/smartunique make things unique diff --git a/docs/push.rocks/smartuniverse_readme.md b/docs/push.rocks/smartuniverse_readme.md index cc3593c..3d8d621 100644 --- a/docs/push.rocks/smartuniverse_readme.md +++ b/docs/push.rocks/smartuniverse_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartuniverse" +source: "gitea" --- # @push.rocks/smartuniverse messaging service for your micro services diff --git a/docs/push.rocks/smartupdate_readme.md b/docs/push.rocks/smartupdate_readme.md index 4266b1a..42b8bc9 100644 --- a/docs/push.rocks/smartupdate_readme.md +++ b/docs/push.rocks/smartupdate_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartupdate" +source: "gitea" --- # @push.rocks/smartupdate update your tools in a smart way diff --git a/docs/push.rocks/smarturl_readme.md b/docs/push.rocks/smarturl_readme.md index 1b7c12f..ff15bef 100644 --- a/docs/push.rocks/smarturl_readme.md +++ b/docs/push.rocks/smarturl_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smarturl" +source: "gitea" --- # @push.rocks/smarturl a url parsing lib diff --git a/docs/push.rocks/smartvalidator_readme.md b/docs/push.rocks/smartvalidator_readme.md index fb1a5f1..f210557 100644 --- a/docs/push.rocks/smartvalidator_readme.md +++ b/docs/push.rocks/smartvalidator_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartvalidator" +source: "gitea" --- # @push.rocks/smartvalidator a wrapper for the validator package to perform validations diff --git a/docs/push.rocks/smartversion_readme.md b/docs/push.rocks/smartversion_readme.md index 831cfda..9b011c2 100644 --- a/docs/push.rocks/smartversion_readme.md +++ b/docs/push.rocks/smartversion_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartversion" +source: "gitea" --- # @push.rocks/smartversion handle semver with ease diff --git a/docs/push.rocks/smartvhost_readme.md b/docs/push.rocks/smartvhost_readme.md index 27acafc..382a6df 100644 --- a/docs/push.rocks/smartvhost_readme.md +++ b/docs/push.rocks/smartvhost_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartvhost" +source: "gitea" --- # @push.rocks/smartvhost a module creating a vhost layer in order to maintain several smartexpress instances diff --git a/docs/push.rocks/smartwebdav_readme.md b/docs/push.rocks/smartwebdav_readme.md index da60492..5872e94 100644 --- a/docs/push.rocks/smartwebdav_readme.md +++ b/docs/push.rocks/smartwebdav_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartwebdav" +source: "gitea" --- # @push.rocks/smartwebdav diff --git a/docs/push.rocks/smartwhois_readme.md b/docs/push.rocks/smartwhois_readme.md index 77c36c9..3217fb6 100644 --- a/docs/push.rocks/smartwhois_readme.md +++ b/docs/push.rocks/smartwhois_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartwhois" +source: "gitea" --- # @push.rocks/smartwhois a package for dealing with whois requests diff --git a/docs/push.rocks/smartxml_readme.md b/docs/push.rocks/smartxml_readme.md index 3baa9a8..6cbec6c 100644 --- a/docs/push.rocks/smartxml_readme.md +++ b/docs/push.rocks/smartxml_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartxml" +source: "gitea" --- # @push.rocks/smartxml a package for creating and parsing XML formatted files diff --git a/docs/push.rocks/smartyaml_readme.md b/docs/push.rocks/smartyaml_readme.md index c27a4fd..14ee012 100644 --- a/docs/push.rocks/smartyaml_readme.md +++ b/docs/push.rocks/smartyaml_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/smartyaml" +source: "gitea" --- # @push.rocks/smartyaml Handle YAML in smart ways. diff --git a/docs/push.rocks/spark_readme.md b/docs/push.rocks/spark_readme.md deleted file mode 100644 index 27eac26..0000000 --- a/docs/push.rocks/spark_readme.md +++ /dev/null @@ -1,303 +0,0 @@ ---- -title: "@serve.zone/spark" ---- -# @serve.zone/spark -A comprehensive tool for maintaining and configuring servers, integrating with Docker and supporting advanced task scheduling, targeted at the serve.zone infrastructure. It's mainly designed to be utilized by @serve.zone/cloudly as a cluster node server system manager, maintaining and configuring servers on the base OS level. - -## Install -To install `@serve.zone/spark`, run the following command in your terminal: - -```sh -npm install @serve.zone/spark --save -``` - -Ensure you have both Node.js and npm installed on your machine. - -## Usage - -### Getting Started -To use `@serve.zone/spark` in your project, you need to include and initiate it in your TypeScript project. Ensure you have TypeScript and the necessary build tools set up in your project. - -First, import `@serve.zone/spark`: - -```typescript -import { Spark } from '@serve.zone/spark'; -``` - -### Initializing Spark -Create an instance of the `Spark` class to start using Spark. This instance will serve as the main entry point for interacting with Spark functionalities. - -```typescript -const sparkInstance = new Spark(); -``` - -### Running Spark as a Daemon -To run Spark as a daemon, which is useful for maintaining and configuring servers at the OS level, you can use the CLI feature bundled with Spark. This should ideally be handled outside of your code through a command-line terminal but can also be automated within your Node.js scripts if required. - -```shell -spark installdaemon -``` - -The command above sets up Spark as a system service, enabling it to run and maintain server configurations automatically. - -### Updating Spark or Maintained Services -Spark can self-update and manage updates for its maintained services. Trigger an update check and process by calling the `updateServices` method on the Spark instance. - -```typescript -await sparkInstance.sparkUpdateManager.updateServices(); -``` - -### Managing Configuration and Logging -Spark allows extensive configuration and logging customization. Use the `SparkLocalConfig` and logging features to tailor Spark's operation to your needs. - -```typescript -// Accessing the local configuration -const localConfig = sparkInstance.sparkLocalConfig; - -// Utilizing the logger for custom log messages -import { logger } from '@serve.zone/spark'; - -logger.log('info', 'Custom log message'); -``` - -### Advanced Usage -`@serve.zone/spark` offers tools for detailed server and service management, including but not limited to task scheduling, daemon management, and service updates. Explore the `SparkTaskManager` for scheduling specific tasks, `SparkUpdateManager` for handling service updates, and `SparkLocalConfig` for configuration. - -### Example: Scheduling Custom Tasks -```typescript -import { SparkTaskManager } from '@serve.zone/spark'; - -const sparkInstance = new Spark(); -const myTask = { - name: 'customTask', - taskFunction: async () => { - console.log('Running custom task'); - }, -}; - -sparkInstance.sparkTaskManager.taskmanager.addAndScheduleTask(myTask, '* * * * * *'); -``` - -The example above creates a simple task that logs a message every second, demonstrating how to use Spark's task manager for custom scheduled tasks. - -### Detailed Service Management -For advanced configurations, including Docker and service management, you can utilize the following patterns: - -- Use `SparkUpdateManager` to handle Docker image updates, service creation, and management. -- Access and modify Docker and service configurations through Spark's integration with configuration files and environment variables. - -```typescript -// Managing Docker services with Spark -await sparkInstance.sparkUpdateManager.dockerHost.someDockerMethod(); - -// Example: Creating a Docker service -const newServiceDefinition = {...}; -await sparkInstance.sparkUpdateManager.createService(newServiceDefinition); -``` - -### CLI Commands -Spark provides several CLI commands to interact with and manage the system services: - -#### Installing Spark as a Daemon -```shell -spark installdaemon -``` - -Sets up Spark as a system service to maintain server configurations automatically. - -#### Updating the Daemon -```shell -spark updatedaemon -``` - -Updates the daemon service if a new version is available. - -#### Running Spark as Daemon -```shell -spark asdaemon -``` - -Runs Spark in daemon mode, which is suitable for executing automated tasks. - -#### Viewing Logs -```shell -spark logs -``` - -Views the logs of the Spark daemon service. - -#### Cleaning Up Services -```shell -spark prune -``` - -Stops and cleans up all Docker services (stacks, networks, secrets, etc.) and prunes the Docker system. - -### Programmatic Daemon Management -You can also manage the daemon programmatically: - -```typescript -import { SmartDaemon } from '@push.rocks/smartdaemon'; -import { Spark } from '@serve.zone/spark'; - -const sparkInstance = new Spark(); -const smartDaemon = new SmartDaemon(); - -const startDaemon = async () => { - const sparkService = await smartDaemon.addService({ - name: 'spark', - version: sparkInstance.sparkInfo.projectInfo.version, - command: 'spark asdaemon', - description: 'Spark daemon service', - workingDir: '/path/to/project', - }); - await sparkService.save(); - await sparkService.enable(); - await sparkService.start(); -}; - -const updateDaemon = async () => { - const sparkService = await smartDaemon.addService({ - name: 'spark', - version: sparkInstance.sparkInfo.projectInfo.version, - command: 'spark asdaemon', - description: 'Spark daemon service', - workingDir: '/path/to/project', - }); - await sparkService.reload(); -}; - -startDaemon(); -updateDaemon(); -``` - -This illustrates how to initiate and update the Spark daemon using the `SmartDaemon` class from `@push.rocks/smartdaemon`. - -### Configuration Management -Extensive configuration management is possible through the `SparkLocalConfig` and other configuration classes. This feature allows you to make your application's behavior adaptable based on different environments and requirements. - -```typescript -// Example on setting local config -import { SparkLocalConfig } from '@serve.zone/spark'; - -const localConfig = new SparkLocalConfig(sparkInstance); -await localConfig.kvStore.set('someKey', 'someValue'); - -// Retrieving a value from local config -const someConfigValue = await localConfig.kvStore.get('someKey'); - -console.log(someConfigValue); // Outputs: someValue -``` - -### Detailed Log Management -Logging is a crucial aspect of any automation tool, and `@serve.zone/spark` offers rich logging functionality through its built-in logging library. - -```typescript -import { logger, Spark } from '@serve.zone/spark'; - -const sparkInstance = new Spark(); - -logger.log('info', 'Spark instance created.'); - -// Using logger in various levels of severity -logger.log('debug', 'This is a debug message'); -logger.log('warn', 'This is a warning message'); -logger.log('error', 'This is an error message'); -logger.log('ok', 'This is a success message'); -``` - -### Real-World Scenarios - -#### Automated System Update and Restart -In real-world scenarios, you might want to automate system updates and reboots to ensure your services are running the latest security patches and features. - -```typescript -import { Spark } from '@serve.zone/spark'; -import { SmartShell } from '@push.rocks/smartshell'; - -const sparkInstance = new Spark(); -const shell = new SmartShell({ executor: 'bash' }); - -const updateAndRestart = async () => { - await shell.exec('apt-get update && apt-get upgrade -y'); - console.log('System updated.'); - await shell.exec('reboot'); -}; - -sparkInstance.sparkTaskManager.taskmanager.addAndScheduleTask( - { name: 'updateAndRestart', taskFunction: updateAndRestart }, - '0 3 * * 7' // Every Sunday at 3 AM -); -``` - -This example demonstrates creating and scheduling a task to update and restart the server every Sunday at 3 AM using Spark's task management capabilities. - -#### Integrating with Docker for Service Deployment -Spark's tight integration with Docker makes it an excellent tool for deploying containerized applications across your infrastructure. - -```typescript -import { Spark } from '@serve.zone/spark'; -import { DockerHost } from '@apiclient.xyz/docker'; - -const sparkInstance = new Spark(); -const dockerHost = new DockerHost({}); - -const deployService = async () => { - const image = await dockerHost.pullImage('my-docker-repo/my-service:latest'); - const newService = await dockerHost.createService({ - name: 'my-service', - image, - ports: ['80:8080'], - environmentVariables: { - NODE_ENV: 'production', - }, - }); - console.log(`Service ${newService.name} deployed.`); -}; - -deployService(); -``` - -This example demonstrates how to pull a Docker image and deploy it as a new service in your infrastructure using Spark's Docker integration. - -### Managing Secrets -Managing secrets and sensitive data is crucial in any configuration and automation tool. Spark's integration with Docker allows you to handle secrets securely. - -```typescript -import { Spark, SparkUpdateManager } from '@serve.zone/spark'; -import { DockerSecret } from '@apiclient.xyz/docker'; - -const sparkInstance = new Spark(); -const updateManager = new SparkUpdateManager(sparkInstance); - -const createDockerSecret = async () => { - const secret = await DockerSecret.createSecret(updateManager.dockerHost, { - name: 'dbPassword', - contentArg: 'superSecretPassword', - }); - console.log(`Secret ${secret.Spec.Name} created.`); -}; - -createDockerSecret(); -``` - -This example shows how to create a Docker secret using Spark's `SparkUpdateManager` class, ensuring that sensitive information is securely stored and managed. - -## License and Legal Information - -This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. - -**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file. - -### Trademarks - -This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH. - -### Company Information - -Task Venture Capital GmbH -Registered at District court Bremen HRB 35230 HB, Germany - -For any legal inquiries or if you require further information, please contact us via email at hello@task.vc. - -By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works. diff --git a/docs/push.rocks/tapbundle_readme.md b/docs/push.rocks/tapbundle_readme.md index df46722..8fe19fb 100644 --- a/docs/push.rocks/tapbundle_readme.md +++ b/docs/push.rocks/tapbundle_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/tapbundle" +source: "gitea" --- # @push.rocks/tapbundle diff --git a/docs/push.rocks/taskbuffer_readme.md b/docs/push.rocks/taskbuffer_readme.md index 188711d..672b9ab 100644 --- a/docs/push.rocks/taskbuffer_readme.md +++ b/docs/push.rocks/taskbuffer_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/taskbuffer" +source: "gitea" --- # @push.rocks/taskbuffer flexible task management. TypeScript ready! diff --git a/docs/push.rocks/webdetector_readme.md b/docs/push.rocks/webdetector_readme.md index 6cfc147..e8ec0a2 100644 --- a/docs/push.rocks/webdetector_readme.md +++ b/docs/push.rocks/webdetector_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/webdetector" +source: "gitea" --- # @push.rocks/webdetector detect different environments within the browser diff --git a/docs/push.rocks/webglobal_readme.md b/docs/push.rocks/webglobal_readme.md index b440aad..cd76627 100644 --- a/docs/push.rocks/webglobal_readme.md +++ b/docs/push.rocks/webglobal_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/webglobal" +source: "gitea" --- # @push.rocks/webglobal a better non polluting global module for efficient in browser communication diff --git a/docs/push.rocks/webjwt_readme.md b/docs/push.rocks/webjwt_readme.md index 886b5e4..2198a85 100644 --- a/docs/push.rocks/webjwt_readme.md +++ b/docs/push.rocks/webjwt_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/webjwt" +source: "gitea" --- # @push.rocks/webjwt a package to handle jwt in the web diff --git a/docs/push.rocks/webrequest_readme.md b/docs/push.rocks/webrequest_readme.md index 4ed9745..5898710 100644 --- a/docs/push.rocks/webrequest_readme.md +++ b/docs/push.rocks/webrequest_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/webrequest" +source: "gitea" --- # @push.rocks/webrequest securely request from browsers diff --git a/docs/push.rocks/websetup_readme.md b/docs/push.rocks/websetup_readme.md index c41814d..c5446fa 100644 --- a/docs/push.rocks/websetup_readme.md +++ b/docs/push.rocks/websetup_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/websetup" +source: "gitea" --- # @push.rocks/websetup setup basic page properties diff --git a/docs/push.rocks/webstore_readme.md b/docs/push.rocks/webstore_readme.md index 4acb0a9..ec158d1 100644 --- a/docs/push.rocks/webstore_readme.md +++ b/docs/push.rocks/webstore_readme.md @@ -1,5 +1,6 @@ --- title: "@push.rocks/webstore" +source: "gitea" --- # @push.rocks/webstore High performance storage in the browser using IndexedDB. diff --git a/docs/serve.zone/cloudly_readme.md b/docs/serve.zone/cloudly_readme.md index 18e4696..07fc9da 100644 --- a/docs/serve.zone/cloudly_readme.md +++ b/docs/serve.zone/cloudly_readme.md @@ -1,5 +1,6 @@ --- title: "@serve.zone/cloudly" +source: "gitea" --- # @serve.zone/cloudly diff --git a/docs/serve.zone/coreflow_readme.md b/docs/serve.zone/coreflow_readme.md index 16a7a22..e53cc7e 100644 --- a/docs/serve.zone/coreflow_readme.md +++ b/docs/serve.zone/coreflow_readme.md @@ -1,5 +1,6 @@ --- title: "@serve.zone/coreflow" +source: "gitea" --- # @serve.zone/coreflow diff --git a/docs/serve.zone/corerender_readme.md b/docs/serve.zone/corerender_readme.md index 11bc45d..1f0f7c1 100644 --- a/docs/serve.zone/corerender_readme.md +++ b/docs/serve.zone/corerender_readme.md @@ -1,5 +1,6 @@ --- title: "@serve.zone/corerender" +source: "gitea" --- # Corerender A rendering service for serve.zone that preserves styles for web components. diff --git a/docs/serve.zone/coretraffic_readme.md b/docs/serve.zone/coretraffic_readme.md index ccf244d..af71613 100644 --- a/docs/serve.zone/coretraffic_readme.md +++ b/docs/serve.zone/coretraffic_readme.md @@ -1,5 +1,6 @@ --- title: "@serve.zone/coretraffic" +source: "gitea" --- # CoreTraffic diff --git a/docs/serve.zone/nullresolve_readme.md b/docs/serve.zone/nullresolve_readme.md index c833b0d..a8b5c3a 100644 --- a/docs/serve.zone/nullresolve_readme.md +++ b/docs/serve.zone/nullresolve_readme.md @@ -1,5 +1,6 @@ --- title: "@serve.zone/nullresolve" +source: "gitea" --- # @losslessone_private/nullresolve diff --git a/docs/serve.zone/platformclient_readme.md b/docs/serve.zone/platformclient_readme.md index fe8ee7c..7b066b0 100644 --- a/docs/serve.zone/platformclient_readme.md +++ b/docs/serve.zone/platformclient_readme.md @@ -1,5 +1,6 @@ --- title: "@serve.zone/platformclient" +source: "gitea" --- # @serve.zone/platformclient a module that makes it really easy to use the serve.zone platform inside your app diff --git a/docs/serve.zone/platformservice_readme.md b/docs/serve.zone/platformservice_readme.md index 539136e..111c82f 100644 --- a/docs/serve.zone/platformservice_readme.md +++ b/docs/serve.zone/platformservice_readme.md @@ -1,5 +1,6 @@ --- title: "@serve.zone/platformservice" +source: "gitea" --- # @serve.zone/platformservice diff --git a/docs/serve.zone/remoteingress_readme.md b/docs/serve.zone/remoteingress_readme.md index 102b164..8c9281b 100644 --- a/docs/serve.zone/remoteingress_readme.md +++ b/docs/serve.zone/remoteingress_readme.md @@ -1,5 +1,6 @@ --- title: "@serve.zone/remoteingress" +source: "gitea" --- # @serve.zone/remoteingress diff --git a/docs/serve.zone/spark_readme.md b/docs/serve.zone/spark_readme.md index 27eac26..6419667 100644 --- a/docs/serve.zone/spark_readme.md +++ b/docs/serve.zone/spark_readme.md @@ -1,5 +1,6 @@ --- title: "@serve.zone/spark" +source: "gitea" --- # @serve.zone/spark A comprehensive tool for maintaining and configuring servers, integrating with Docker and supporting advanced task scheduling, targeted at the serve.zone infrastructure. It's mainly designed to be utilized by @serve.zone/cloudly as a cluster node server system manager, maintaining and configuring servers on the base OS level. diff --git a/docs/social.io/catalog_readme.md b/docs/social.io/catalog_readme.md new file mode 100644 index 0000000..bfeed4f --- /dev/null +++ b/docs/social.io/catalog_readme.md @@ -0,0 +1,38 @@ +--- +title: "@social.io/catalog" +source: "gitea" +--- +# @social.io/private/catalog + +the element catalog for the lossless organization + +## Availabililty and Links + +- [npmjs.org (npm package)](https://www.npmjs.com/package/@social.io_private/catalog) +- [gitlab.com (source)](https://gitlab.com/social.io/private/catalog) +- [github.com (source mirror)](https://github.com/social.io/private/catalog) +- [docs (typedoc)](https://social.io/private.gitlab.io/catalog/) + +## Status for master + +| Status Category | Status Badge | +| ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| GitLab Pipelines | [![pipeline status](https://gitlab.com/social.io/private/catalog/badges/master/pipeline.svg)](https://lossless.cloud) | +| GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/social.io/private/catalog/badges/master/coverage.svg)](https://lossless.cloud) | +| npm | [![npm downloads per month](https://badgen.net/npm/dy/@social.io_private/catalog)](https://lossless.cloud) | +| Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/social.io/private/catalog)](https://lossless.cloud) | +| TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud) | +| node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) | +| Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud) | +| PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@social.io_private/catalog)](https://lossless.cloud) | +| PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@social.io_private/catalog)](https://lossless.cloud) | +| BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@social.io_private/catalog)](https://lossless.cloud) | + +## Usage + +For further information read the linked docs at the top of this readme. + +## Legal + +> UNLICENSED licensed | **©** [Task Venture Capital GmbH](https://task.vc) +> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy) diff --git a/docs/social.io/interfaces_readme.md b/docs/social.io/interfaces_readme.md new file mode 100644 index 0000000..90e0936 --- /dev/null +++ b/docs/social.io/interfaces_readme.md @@ -0,0 +1,166 @@ +--- +title: "@social.io/interfaces" +source: "gitea" +--- +# @social.io/interfaces + +An interface package for social.io. + +## Install + +To install the `@social.io/interfaces` package, you can use npm. Make sure you have Node.js installed, then run the following command in your terminal: + +```bash +npm install @social.io/interfaces +``` + +This will fetch the latest package from the npm registry and add it to your project's dependencies. + +## Usage + +The `@social.io/interfaces` package provides a set of interfaces to be used with the social.io application, designed to standardize the communication and data exchange within the application. To effectively use this package, it's recommended to employ TypeScript, which provides advanced features like intellisense and type safety, promoting a better development experience. + +### Setting Up Your Project + +Firstly, ensure that you set up your project to work with ES Modules and optionally TypeScript. If you are working with JavaScript, ensure your `package.json` file contains the line `"type": "module"`. For TypeScript, you might want to add configuration in `tsconfig.json` as follows: + +```json +{ + "compilerOptions": { + "module": "ESNext", + "target": "ESNext", + "moduleResolution": "Node", + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true + } +} +``` + +### Importing Interfaces + +The package exports various interfaces for managing social.io data and operations. You can import them using: + +```typescript +import { + ISioConversation, + ISioSession, + IRequest_GetSocialSession, + IRequest_AttachProfileId, + IRequest_GetConversations +} from '@social.io/interfaces'; +``` + +### Managing Sessions + +The package provides an interface `IRequest_GetSocialSession` which models a request to get a social session. This can be useful when you need to manage user sessions: + +```typescript +const getSessionRequest: IRequest_GetSocialSession = { + method: 'getSocialSession', + request: { + existingSessionId: 'currentSessionId123' + }, + response: { + newSessionId: 'newSessionId456' + } +}; + +// Utilize getSessionRequest in your session management logic +``` + +This follows a pattern of detailing a request/response structure, allowing you to handle sessions more seamlessly. + +### Attaching Profile IDs + +The interaction with user profiles is essential in most social applications. Use `IRequest_AttachProfileId` to attach a profile to a session: + +```typescript +const attachProfileRequest: IRequest_AttachProfileId = { + method: 'attachProfileId', + request: { + sessionId: 'newSessionId456', + profileId: 'userProfileId789' + }, + response: { + newSessionId: 'updatedSessionId012' + } +}; + +// Implement logic to leverage attachProfileRequest for profile operations +``` + +These types ensure strict adherence to your backend contract, reducing runtime errors and improving code quality. + +### Handling Conversations + +Conversations are a critical part of any social platform. The package defines various interfaces to accommodate complex conversation structures: + +```typescript +const conversation: ISioConversation = { + subject: 'Chat about TypeScript best practices', + parties: [ + { id: 'user1', name: 'Alice', description: 'TypeScript enthusiast' }, + { id: 'user2', name: 'Bob', description: 'Node.js guru' } + ], + conversationBlocks: [ + { partyId: 'user1', text: 'I love using TypeScript with Node.js!' }, + { partyId: 'user2', text: 'Same here! It makes development so much safer and robust.' } + ] +}; + +// These conversations can be leveraged in your business logic to create engaging user experiences +``` + +This interface allows for a detailed conversational structure including multiple participants and conversation blocks. + +### Extending Sessions and Conversations + +For further extensions, the `ISioSession` interface is key, providing session-level information like tenant IDs, activity status, and user profiles: + +```typescript +const session: ISioSession = { + tenantId: 'socialTenant123', + active: true, + abandoned: false, + markedForDeletion: false, + profileInfo: { + profileId: 'profileId1234', + name: 'Alice Johnson', + email: 'alice@example.com', + mobilePhone: '+1234567890' + }, + conversations: [conversation] +}; + +// Handle session operations and data management through this detailed session structure +``` + +This level of detail in interfaces encourages robust software design by promoting thorough type usage and better communication through shared types. + +### Requests Pattern + +The package uses a consistent pattern by inheriting from a base typed request interface, promoting consistency and reusability: + +```typescript +import * as plugins from '@social.io/interfaces'; + +export interface IRequest_GetArrayExample + extends plugins.typedrequestInterfaces.implementsTR< + plugins.typedrequestInterfaces.ITypedRequest, + IRequest_GetArrayExample + > { + method: 'getArrayExample'; + request: { + itemCount: number; + }; + response: { + items: Array; + }; +} +``` + +Such patterns simplify request and response management due to their predictability and standardization across different modules. + +By following these patterns, you can build scalable, maintainable, and highly reliable applications centered around the social.io interfaces. Always remember to check the comprehensive module documentation and integrate the above interfaces into your TypeScript-first, node-based projects. +undefined \ No newline at end of file