Documentation
Primary version
Primary version
  • Cubbles documentation
  • First steps
    • Generate a project
    • Create a webpackage
    • Create an elementary component
    • Create a compound component
      • Compound slot initialization
  • Runtime extension - RTE
    • User guide
      • RTE Integration
      • The Cubbles TAG API
        • The Cubbles Dependency API
      • The Cubbles Javascript API
        • Interacting with Cubbles from the outside
        • Adding dynamic connections
        • Interacting with Elementary Cubbles from the inside
      • The RTE Processing
        • RTE initialization and rendering timeline
      • The Cubbles IFrame API
        • The Cubbles IFrame Resizer API
      • The Cubbles mutation based start event API
      • FAQs
        • How to manually resolve dependency conflicts?
        • How to create a component instance dynamically?
        • How to render HTML Markup coming from input slot?
        • How to replace a dependency when declaring a component instance?
        • How to synchronize multiple dataflows between component instances?
        • How to handle the copyValue flag for non serializable instances?
    • Contributor guide
      • CIF processing
  • Developing with the vanilla boilerplate
    • Creating a new project
    • Developing elementaries using the vanilla boilerplate
    • Developing compounds using the vanilla boilerplate
    • Using the vanilla boilerplate scripts
  • Coder devtools - CDT
    • User guide
      • Create Cubbles artifacts
      • Upload a Webpackage
      • Generate a README file
      • Rename an artifact
      • Configure network proxy
      • Validate the manifest.webpackage file
      • Change active webpackage
      • Bulk upload of webpackages
      • Release a webpackage
      • Update the RTE version of a webpackage
      • Prepare a webpackage to be released
      • Update webpackage to the next development version
      • Generate a test environment for a component
      • Testing Cubbles components
      • Validate sources
      • Create a demo webpackage
    • Contributor guide
      • Checklist for releasing a new webpackage.modelVersion
  • Terms and concepts
    • Webpackage
    • Artifacts
    • User roles
    • Base
Powered by GitBook
On this page
  • Basics
  • Upload Configuration
  • Initial setup
  • Ignore files from upload (.cubblesignore)
  • Required Permissions
  • Perform an Upload
  1. Coder devtools - CDT
  2. User guide

Upload a Webpackage

PreviousCreate Cubbles artifactsNextGenerate a README file

Last updated 6 years ago

Basics

As a coder, you can develop and test your webpackage(s) locally using the (Coder DevTools). If you want to provide it for a larger audience, you should upload it. That is, to transfer all files of a webpackage folder into a selected store of a instance.

Upload Configuration

Details for the upload of a webpackage are set using the uploadConfigs Object in the .webpackage file within the root folder of each webpackage.

Initial setup

Initially, the .webpackage file doesn't contain any configuration. Just run +webpackage-upload the grunt task:

grunt +webpackage-upload

Now you see the .webpackage file containing an "uploadConfigs" object with 2 example configurations. Just rename/adapt them to your needs. You can define as many configurations as you like. The configuration object has the following properties:

  1. url [mandatory, string/url]: This is the url of the Cubbles Base where the webpackage will be uploaded to.

  2. proxy [optional, string/url]: If your connection to the Cubbles Base is routed over a proxy server, use this attribute to provide the proxy url.

  3. dryRun [optional, boolean]: This option allows you to run the task, without actually uploading anything. It's perfect to check your store permissions or your .cubblesignore configuration.

  4. debug [optional, boolean]: Set the debug option to "true" to print more details.

After running the +webpackage-upload again, you will be able to select one of the defined configurations as follows:

grunt +webpackage-upload
Currently mapped Webpackage: currency-viewer (@see ..\webpackages\.workspace)

Running "+webpackage-upload" task
> Reading available configs from '..\webpackages\currency-viewer\.webpackage'
? Please type the index of your choice to SELECT A CONFIG or to CANCEL the upload:
  1) dryRun: {"url":"https://cubbles.world/sandbox", "proxy":"", "dryRun":true}
  2) release: {"url":"https://cubbles.world/sandbox", "proxy":""}
  3) CANCEL
  Answer: 1

Ignore files from upload (.cubblesignore)

Required Permissions

Uploading a webpackage into a server-side store requires your account to have appropriate permissions.

You can easily check your current permissions for 1..n stores via curl:

curl -s -X POST -H "Content-type: application/json" https://cubbles.world/_api/authenticate -d '{"user":"{username}","password":"{password}","stores":["sandbox","shared"]}'
{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjoiMyIsImdyb3VwcyI6WyJiZGUtdGVzdC5kZXZlbG9wZXJzIiwiY29yZS5kZXZlbG9wZXJzIiwiaW5jb3dpYS5kZXZlbG9wZXJzIiwib2Rpbi5kZXZlbG9wZXJzIiwicGNwLXNhbmRib3guZGV2ZWxvcGVycyIsInNhbmRib3guZGV2ZWxvcGVycyJdLCJwZXJtaXNzaW9ucyI6eyJzYW5kYm94Ijp7InVwbG9hZCI6dHJ1ZX19LCJpYXQiOjE0ODgxNzk2NDYsImV4cCI6MTQ4ODE4MzI0Nn0.hg1a7CvY02h3JBF8f8ZL9_mS_J3w-o6eo83nXvHHR1M"}

Perform an Upload

To perform an upload, you should:

  1. run the grunt task +webpackage-upload

  2. choose the configuration to be used

  3. provide provide your credentials

grunt +webpackage-upload
Currently mapped Webpackage: currency-viewer (@see ..\webpackages\.workspace)

Running "+webpackage-upload" task
> Reading available configs from '..\webpackages\currency-viewer\.webpackage'
? Please type the index of your choice to SELECT A CONFIG or to CANCEL the upload: 1
Starting upload ...
? username: ega
? password: *************
>> Success:
>> {
>>   "ok": true,
>>   "id": "my-first-webpackage@0.1.0-SNAPSHOT",
>>   "baseContext": {
>>     "uploadInfos": {
>>       "target": "cubbles.world/sandbox",
>>       "date": "2018-09-05T19:52:24.077Z",
>>       "user": "8",
>>       "client": "cubx-webpackage-uploader-3.3.5"
>>     }
>>   }
>> }

Done, without errors.

Some real examples of that file are available at and

The .cubblesignore file allows you to prevent individually defined files and folders from upload. Internally we use the - so just read the for supported patterns.

The response contains an access token. Just use to decode it and look at the permissions property to see for which of the passed stores you have rights for, as presented below:

Then your webpackage is released and all components are ready to be used. Use the artifact search of the store you uploaded into to see each artifact of your webpackage listed. Gor instance, the url for the "sandbox" store is: . Cubbles stores looks as presented below:

com.incowia.lib.chart-library
cubx-maps
glob package
glob-primer
JWT
https://cubbles.world/sandbox/cubx.core.artifactsearch@1.6.1/artifactsearch/index.html
CDT
Cubbles Base
.webpackage config file location
JWT decoding app
Cubbles stores UI