diff --git a/.husky/pre-commit b/.husky/pre-commit index abd080c..b1ebfa4 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,3 +2,4 @@ . "$(dirname -- "$0")/_/husky.sh" yarn servable:document +yarn servable:readme diff --git a/README.md b/README.md index d722de3..15e74a0 100644 --- a/README.md +++ b/README.md @@ -1,113 +1,64 @@ -# Publishable Protocol +# Publishable protocol + + +@publishable, #1.0.0 + + +> [!WARNING] + +> Servable is still experimental and its api may change in the future. + + + +![icon](/static/img/polar-bear-4.png "icon") + + -![logo](/static/img/polar-bear-4.png) [![npm Package](https://img.shields.io/npm/v/@servable-community/publishable.svg?style=flat-square)](https://www.npmjs.org/package/@servable-community/publishable) + [![NPM Downloads](https://img.shields.io/npm/dm/@servable-community/publishable.svg)](https://npmjs.org/package/@servable-community/publishable) + [![Build Status](https://github.com/servable-community/publishable/actions/workflows/release.yml/badge.svg)](https://github.com/servable-community/publishable/actions/tests.yml) + [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) + [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) -The publishable protocol handles the complete publication state of an object. - -## Install -```bash -yarn add @servable-community/publishable -``` - -## Auxiliary packages - -### Shared library -[@servable-community/publishable-shared](https://github.com/servable-community/publishable-shared) -```bash -yarn add @servable-community/publishable-shared -``` - -### React library -[@servable-community/publishable-react](https://github.com/servable-community/publishable-react) -```bash -yarn add @servable-community/publishable-react -``` - -## Protocol -### Configuration -#### Payload sample -```json - { - "id": "publishable", - "name": "publishable", - "slug": "ps", - "module": { - "@servable-community/publishable": "*" - }, - "version": "*", - "params": { - "liveClasses": ["publishable"], - "schema": { - "restrictSecurity": true - } - } -} -``` -#### Reference - - -### Capacities -#### Schema -**Classes** -TODO - -**Class level permissions** -TODO - -**Indexes** -```json -{ - "_publishableStatus": { - "publishableStatus": 1 - } -} -``` - -**Fields** -```json -{ - "publishableStatus": { - "type": "String" - } -} -``` - -#### Protocol class -TODO -#### Classes -TODO -#### Triggers -TODO -#### Before init -TODO -#### After init -TODO -#### Seed -TODO -#### Config -TODO -#### Functions -TODO -#### Jobs -TODO -#### Live classes -TODO - -### Security -TODO - -### Performance -TODO - -## Servable Documentation -You can find here the complete [servable documentation](https://documentation.servable.app/) with guides and api reference. - -## License - -MIT © [servable-community](https://github.com/servable-community) + + + +Generated documentation below + + +## A complete lifecycle management for publication + + + +Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. + + + + + +## Seed + +## Protocol class + +## Before init + +## After init + +## Config + +## Functions + +## Live Classes + +## Schema + +## System + +## Lib + +## Triggers diff --git a/README_.md b/README_.md new file mode 100644 index 0000000..d722de3 --- /dev/null +++ b/README_.md @@ -0,0 +1,113 @@ +# Publishable Protocol + +![logo](/static/img/polar-bear-4.png) + +[![npm Package](https://img.shields.io/npm/v/@servable-community/publishable.svg?style=flat-square)](https://www.npmjs.org/package/@servable-community/publishable) +[![NPM Downloads](https://img.shields.io/npm/dm/@servable-community/publishable.svg)](https://npmjs.org/package/@servable-community/publishable) +[![Build Status](https://github.com/servable-community/publishable/actions/workflows/release.yml/badge.svg)](https://github.com/servable-community/publishable/actions/tests.yml) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) + +The publishable protocol handles the complete publication state of an object. + +## Install +```bash +yarn add @servable-community/publishable +``` + +## Auxiliary packages + +### Shared library +[@servable-community/publishable-shared](https://github.com/servable-community/publishable-shared) +```bash +yarn add @servable-community/publishable-shared +``` + +### React library +[@servable-community/publishable-react](https://github.com/servable-community/publishable-react) +```bash +yarn add @servable-community/publishable-react +``` + +## Protocol +### Configuration +#### Payload sample +```json + { + "id": "publishable", + "name": "publishable", + "slug": "ps", + "module": { + "@servable-community/publishable": "*" + }, + "version": "*", + "params": { + "liveClasses": ["publishable"], + "schema": { + "restrictSecurity": true + } + } +} +``` +#### Reference + + +### Capacities +#### Schema +**Classes** +TODO + +**Class level permissions** +TODO + +**Indexes** +```json +{ + "_publishableStatus": { + "publishableStatus": 1 + } +} +``` + +**Fields** +```json +{ + "publishableStatus": { + "type": "String" + } +} +``` + +#### Protocol class +TODO +#### Classes +TODO +#### Triggers +TODO +#### Before init +TODO +#### After init +TODO +#### Seed +TODO +#### Config +TODO +#### Functions +TODO +#### Jobs +TODO +#### Live classes +TODO + +### Security +TODO + +### Performance +TODO + +## Servable Documentation +You can find here the complete [servable documentation](https://documentation.servable.app/) with guides and api reference. + +## License + +MIT © [servable-community](https://github.com/servable-community) diff --git a/package.json b/package.json index 672245f..9d4dc0c 100644 --- a/package.json +++ b/package.json @@ -38,9 +38,8 @@ "test:unit": "yarn node --require=dotenv/config --experimental-vm-modules --experimental-specifier-resolution=node $(yarn bin jest) --config ./jest.config.json", "test:watch": "react-scripts test --env=jsdom", "servable:document": "node -e 'import(\"../../../core/manifest/src/index.js\").then(m => m.documentProtocol({path: (process.cwd() + \"/src\"), write: true}))'", - "servable:readme": "node -e 'import(\"../../../core/manifest/src/index.js\").then(m => m.generateGithubReadme({path: (process.cwd() + \"/src\"), write: true}))'", - "servable:document_": "node -e 'import(\"./node_modules/servable-manifest/src/index.js\").then(m => m.documentProtocol({path: (process.cwd() + \"/src\"), write: true}))'", - "prepare": "husky install" + "servable:readme": "node -e 'import(\"./node_modules/servable-manifest/src/index.js\").then(m => m.generateGithubReadme({path: (process.cwd() + \"/src\"), write: true, targetPath: (process.cwd() + \"/README.md\" )}))'", + "servable:document_": "node -e 'import(\"./node_modules/servable-manifest/src/index.js\").then(m => m.documentProtocol({path: (process.cwd() + \"/src\"), write: true}))'" }, "repository": { "type": "git", @@ -96,7 +95,7 @@ "npm-run-all": "^4.1.5", "prettier": "^2.0.4", "semantic-release": "^22.0.5", - "servable-manifest": "^1.9.0", + "servable-manifest": "^1.11.0", "size-limit": "^4.10.2" } } \ No newline at end of file diff --git a/src/documentation/generated/afterInit.md b/src/documentation/generated/afterInit.md new file mode 100644 index 0000000..019f842 --- /dev/null +++ b/src/documentation/generated/afterInit.md @@ -0,0 +1 @@ +# After init diff --git a/src/documentation/generated/beforeInit.md b/src/documentation/generated/beforeInit.md new file mode 100644 index 0000000..17d6a68 --- /dev/null +++ b/src/documentation/generated/beforeInit.md @@ -0,0 +1 @@ +# Before init diff --git a/src/documentation/generated/class.md b/src/documentation/generated/class.md new file mode 100644 index 0000000..192558c --- /dev/null +++ b/src/documentation/generated/class.md @@ -0,0 +1 @@ +# Protocol class diff --git a/src/documentation/generated/config.md b/src/documentation/generated/config.md new file mode 100644 index 0000000..46ac1e6 --- /dev/null +++ b/src/documentation/generated/config.md @@ -0,0 +1 @@ +# Config diff --git a/src/documentation/generated/functions.md b/src/documentation/generated/functions.md new file mode 100644 index 0000000..0c5faf5 --- /dev/null +++ b/src/documentation/generated/functions.md @@ -0,0 +1 @@ +# Functions diff --git a/src/documentation/generated/index.md b/src/documentation/generated/index.md new file mode 100644 index 0000000..b97c210 --- /dev/null +++ b/src/documentation/generated/index.md @@ -0,0 +1,24 @@ + + + +## Seed + +## Protocol class + +## Before init + +## After init + +## Config + +## Functions + +## Live Classes + +## Schema + +## System + +## Lib + +## Triggers diff --git a/src/documentation/generated/lib.md b/src/documentation/generated/lib.md new file mode 100644 index 0000000..e61353e --- /dev/null +++ b/src/documentation/generated/lib.md @@ -0,0 +1 @@ +# Lib diff --git a/src/documentation/generated/liveClasses.md b/src/documentation/generated/liveClasses.md new file mode 100644 index 0000000..379554f --- /dev/null +++ b/src/documentation/generated/liveClasses.md @@ -0,0 +1 @@ +# Live Classes diff --git a/src/documentation/generated/schema.md b/src/documentation/generated/schema.md new file mode 100644 index 0000000..07d8c08 --- /dev/null +++ b/src/documentation/generated/schema.md @@ -0,0 +1 @@ +# Schema diff --git a/src/documentation/generated/seed.md b/src/documentation/generated/seed.md new file mode 100644 index 0000000..09a308e --- /dev/null +++ b/src/documentation/generated/seed.md @@ -0,0 +1 @@ +# Seed diff --git a/src/documentation/generated/system.md b/src/documentation/generated/system.md new file mode 100644 index 0000000..35d37ed --- /dev/null +++ b/src/documentation/generated/system.md @@ -0,0 +1 @@ +# System diff --git a/src/documentation/generated/triggers.md b/src/documentation/generated/triggers.md new file mode 100644 index 0000000..e773cf1 --- /dev/null +++ b/src/documentation/generated/triggers.md @@ -0,0 +1 @@ +# Triggers diff --git a/src/index.json b/src/index.json new file mode 100644 index 0000000..d71a301 --- /dev/null +++ b/src/index.json @@ -0,0 +1,46 @@ +{ + "type": "protocol", + "mode": "original", + "version": "1.0.0", + "id": "publishable", + "name": "Publishable", + "description": "The publishable protocol handles the complete publication state of an object.", + "homepage": "", + "icon": "", + "categories": "", + "author": { + "name": "", + "email": "", + "url": "", + "github": "" + }, + "keywords": [], + "license": "Apache 2.0", + "forks": {}, + "packages": [ + { + "id": "publishable", + "description": "", + "type": "main", + "components": [ + "server" + ], + "url": "", + "dependencies": {}, + "forks": {}, + "usage": { + "howto": "", + "template": { + "id": "publishable", + "name": "Publishable", + "slug": "", + "params": {} + }, + "parameters": [] + }, + "engines": { + "servable-engine": "latest" + } + } + ] +} \ No newline at end of file diff --git a/src/index.md b/src/index.md new file mode 100644 index 0000000..bc8b9eb --- /dev/null +++ b/src/index.md @@ -0,0 +1,4 @@ +## A complete lifecycle management for publication + +Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. + diff --git a/yarn.lock b/yarn.lock index 65c3343..46c52a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -284,21 +284,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/runtime-corejs3@7.17.8": - version "7.17.8" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.17.8.tgz#d7dd49fb812f29c61c59126da3792d8740d4e284" - integrity sha512-ZbYSUvoSF6dXZmMl/CYTMOvzIFnbGfv4W3SEHYgMvNsFTeLaF2gkGAF4K2ddmtSK4Emej+0aYcnSC6N5dPCXUQ== - dependencies: - core-js-pure "^3.20.2" - regenerator-runtime "^0.13.4" - -"@babel/runtime@7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.0.tgz#6d77142a19cb6088f0af662af1ada37a604d34ae" - integrity sha512-YMQvx/6nKEaucl0MY56mwIG483xk8SDNdlUwb2Ts6FUpr7fm85DxEmsY18LXBNhcTz6tO6JwZV8w1W06v8UKeg== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/template@^7.22.15", "@babel/template@^7.22.5", "@babel/template@^7.3.3": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" @@ -2963,11 +2948,6 @@ copy-descriptor@^0.1.0: resolved "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz" integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw== -core-js-pure@^3.20.2: - version "3.34.0" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.34.0.tgz#981e462500708664c91b827a75b011f04a8134a0" - integrity sha512-pmhivkYXkymswFfbXsANmBAewXx86UBfmagP+w0wkK06kLsLlTK5oQmsURPivzMkIBQiYq2cjamcZExIwlFQIg== - core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" @@ -3074,11 +3054,6 @@ crypto-browserify@^3.11.0: randombytes "^2.0.0" randomfill "^1.0.3" -crypto-js@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf" - integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw== - crypto-random-string@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz" @@ -4934,13 +4909,6 @@ icss-utils@^5.0.0, icss-utils@^5.1.0: resolved "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== -idb-keyval@6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/idb-keyval/-/idb-keyval-6.0.3.tgz#e47246a15e55d0fff9fa204fd9ca06f90ff30c52" - integrity sha512-yh8V7CnE6EQMu9YDwQXhRxwZh4nv+8xm/HV4ZqK4IiYFJBWYGjJuykADJbSP+F/GDXUBwCSSNn/14IpGL81TuA== - dependencies: - safari-14-idb-fix "^3.0.0" - ieee754@^1.1.13, ieee754@^1.1.4, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" @@ -7755,21 +7723,6 @@ parse-passwd@^1.0.0: resolved "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz" integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== -parse@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/parse/-/parse-3.5.1.tgz#16c1d5ff9d541a500000b2ac1a71e73ab8fba4c0" - integrity sha512-uxkLVNfbqgZ/pStg/jIQGh09tOUkPZorzDIqz9vSFjZ3iIZzgvNk6VBbjXjcMWsR8LyFPOR1ROR6/y9Dedn3/w== - dependencies: - "@babel/runtime" "7.18.0" - "@babel/runtime-corejs3" "7.17.8" - idb-keyval "6.0.3" - react-native-crypto-js "1.0.0" - uuid "3.4.0" - ws "8.6.0" - xmlhttprequest "1.8.0" - optionalDependencies: - crypto-js "4.1.1" - pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz" @@ -8402,11 +8355,6 @@ react-is@^18.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -react-native-crypto-js@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/react-native-crypto-js/-/react-native-crypto-js-1.0.0.tgz#e677e022e147f41b35614416c92d655f87e2450a" - integrity sha512-FNbLuG/HAdapQoybeZSoes1PWdOj0w242gb+e1R0hicf3Gyj/Mf8M9NaED2AnXVOX01b2FXomwUiw1xP1K+8sA== - read-cmd-shim@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz" @@ -8568,11 +8516,6 @@ reflect.getprototypeof@^1.0.4: globalthis "^1.0.3" which-builtin-type "^1.1.3" -regenerator-runtime@^0.13.4: - version "0.13.11" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" - integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== - regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz" @@ -8786,11 +8729,6 @@ rxjs@^7.5.5: dependencies: tslib "^2.1.0" -safari-14-idb-fix@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/safari-14-idb-fix/-/safari-14-idb-fix-3.0.0.tgz#450fc049b996ec7f3fd9ca2f89d32e0761583440" - integrity sha512-eBNFLob4PMq8JA1dGyFn6G97q3/WzNtFK4RnzT1fnLq+9RyrGknzYiM/9B12MnKAxuj1IXr7UKYtTNtjyKMBog== - safe-array-concat@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" @@ -8939,10 +8877,10 @@ serialize-javascript@^4.0.0: dependencies: randombytes "^2.1.0" -servable-manifest@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/servable-manifest/-/servable-manifest-1.9.0.tgz#031554c966fafba4da4dcbca921791348b1c6c96" - integrity sha512-IkKvBDSPYojZQSbr0dqe2Vq98cnaBb1ucFI6hixcmEgWGSiQVSRPyDbUxScoJ4/PciO5Ba3+EtSAp7gti3LQ7w== +servable-manifest@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/servable-manifest/-/servable-manifest-1.11.0.tgz#26bfd024397520f287dd9f9f8635ccad027f65f3" + integrity sha512-lEglFxVBWXzXjbNw1CioNEDStXJiFLlDij63pW21IdWkNQmgayAFgvVzSobh3A/R9Xhs2bXRmFJU8jE0qUEPcw== dependencies: bluebird "^3.7.2" fs-extra "^11.2.0" @@ -8950,7 +8888,6 @@ servable-manifest@^1.9.0: inspirational-quotes "^2.0.1" json2md "^2.0.0" mime "^4.0.0" - parse "^3.5.1" parse-comments "^1.0.0" path-sanitizer "^2.0.0" semver "^7.5.4" @@ -10201,11 +10138,6 @@ util@^0.11.0: dependencies: inherits "2.0.3" -uuid@3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz" @@ -10493,21 +10425,11 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" -ws@8.6.0: - version "8.6.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.6.0.tgz#e5e9f1d9e7ff88083d0c0dd8281ea662a42c9c23" - integrity sha512-AzmM3aH3gk0aX7/rZLYvjdvZooofDu3fFOzGqcSnQ1tOcTWwhM/o+q++E8mAyVVIyUdajrkzWUGftaVSDLn1bw== - ws@^7.3.1: version "7.5.9" resolved "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== -xmlhttprequest@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" - integrity sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA== - xtend@^4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz"