![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@constructor-io/constructorio-connect-cli
Advanced tools
CLI tool to enable users to interface with the Constructor Connect Ecosystem
Constructor.io is an e-commerce first product discovery service that optimizes results using artificial intelligence (including natural language processing, re-ranking to optimize for business metrics, and end user personalization).
This package is a CLI tool that helps you build, test and deploy your connector templates. By using templates, you can customize your catalog integration to shape your data the way you want it.
If you're looking for a package to consume our API, please use @constructor-io/constructorio-node instead. Alternatively, if you want a JavaScript client for client side (i.e. front end) integrations please use @constructor-io/constructorio-client-javascript.
Before you begin, note that this package is intended for use with partner connections. If you don't have a connector running yet, please take a look at our documentation to see how you can get started.
Finally, make sure you have your connect auth token available. If you don't have this yet, please get in touch with our team and we'll set this up.
You can initialize a new working repo with the following command:
npx @constructor-io/constructorio-connect-cli init my-repo
Where my-repo
is the name of the folder and repository you want to create.
With the new repository initialized, you can start developing your catalog integration. Please refer to our documentation for more information on how to build your templates.
constructorio-connect-cli deploy ENV
constructorio-connect-cli execute
constructorio-connect-cli generate-fixture
constructorio-connect-cli help [COMMAND]
constructorio-connect-cli init NAME
constructorio-connect-cli trigger-catalog-sync
constructorio-connect-cli deploy ENV
Deploys all templates defined on the connectrc.js
file to the specified environment.
USAGE
$ constructorio-connect-cli deploy ENV
ARGUMENTS
ENV (development|qa|production|demo) The target Constructor environment to deploy to.
DESCRIPTION
Deploys all templates defined on the `connectrc.js` file to the specified environment.
The script will use the `CONNECT_AUTH_TOKEN` environment variable to authenticate with Constructor.
EXAMPLES
$ constructorio-connect-cli deploy development
$ constructorio-connect-cli deploy qa
$ constructorio-connect-cli deploy production
constructorio-connect-cli execute
Execute a template against a connection and fixture to see the resulting transformed data. Each value not provided as a flag will be prompted for when the command is executed.
USAGE
$ constructorio-connect-cli execute [--template-path <value>] [--fixture-path <value>]
[--external-data-path <value>] [--connection-id <value>]
FLAGS
--connection-id=<value> The ID of the connection to execute the template against.
--external-data-path=<value> The path to the external data to execute the template against. Must be in the
'src/fixtures/external_data' directory.
--fixture-path=<value> The path to the fixture to execute the template against. Must be in the 'src/fixtures'
directory.
--template-path=<value> The path to the template to execute. Must be in the 'src/templates' directory.
DESCRIPTION
Execute a template against a connection and fixture to see the resulting transformed data. Each value not provided as
a flag will be prompted for when the command is executed.
EXAMPLES
$ constructorio-connect-cli execute
$ constructorio-connect-cli execute --template-path=item/item.jsonata
$ constructorio-connect-cli execute --template-path=variation/variation.jsonata
$ constructorio-connect-cli execute --template-path=item_group/item_group.jsonata --fixture-path=item_group.json
$ constructorio-connect-cli execute --template-path=grouping/grouping.jsonata --connection-id=example-connection-id
$ constructorio-connect-cli execute --template-path=mapping/mapping.jsonata
constructorio-connect-cli generate-fixture
This command will fetch one fixture from the server and save it into a specified file. This fixture file will be an example of how the data would be passed to the connector when executing the templates.
USAGE
$ constructorio-connect-cli generate-fixture
DESCRIPTION
This command will fetch one fixture from the server and save it into a specified file. This fixture file will be an
example of how the data would be passed to the connector when executing the templates.
You are expected to customize this file to match the data you expect to cover in a template execution (e.g. an item
with stock, a variation with missing data), etc. Note that you can have multiple fixtures of the same type to cover
different scenarios.
Finally, if the file already exists you'll be prompted to overwrite it.
EXAMPLES
$ constructorio-connect-cli generate-fixture
constructorio-connect-cli help [COMMAND]
Display help for constructorio-connect-cli.
USAGE
$ constructorio-connect-cli help [COMMAND...] [-n]
ARGUMENTS
COMMAND... Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for constructorio-connect-cli.
constructorio-connect-cli init NAME
Bootstrap a new Constructor.io Connect CLI repository.
USAGE
$ constructorio-connect-cli init NAME
ARGUMENTS
NAME name of the new folder
DESCRIPTION
Bootstrap a new Constructor.io Connect CLI repository.
EXAMPLES
$ constructorio-connect-cli init
$ constructorio-connect-cli init new-repo-name
constructorio-connect-cli trigger-catalog-sync
Triggers a catalog sync for selected connection.
USAGE
$ constructorio-connect-cli trigger-catalog-sync
DESCRIPTION
Triggers a catalog sync for selected connection.
The script will use the `CONNECT_AUTH_TOKEN` environment variable to authenticate with Constructor.
EXAMPLES
$ constructorio-connect-cli
Here's some useful npm scripts:
npm run lint # run lint on source code and tests
npm run test # run tests
npm run test:cov # run tests with coverage report
FAQs
CLI tool to enable users to interface with the Constructor Connect Ecosystem
The npm package @constructor-io/constructorio-connect-cli receives a total of 50 weekly downloads. As such, @constructor-io/constructorio-connect-cli popularity was classified as not popular.
We found that @constructor-io/constructorio-connect-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.