New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@adobe/aio-cli-plugin-aep

Package Overview
Dependencies
Maintainers
60
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adobe/aio-cli-plugin-aep

A plugin for CRUD operations on aep resources

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
60
Weekly downloads
 
Created
Source

aio-cli-plugin-aep

A plugin for CRUD operations on aep resources

Follow the steps below to start using this plugin.

1. Set up necessary dependencies for npm to work

  1. Install brew: $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

  2. Install npm: $ brew install npm

  3. Install yarn: $ npm install --global yarn

  4. Upgrade yarn: $ npm upgrade --global yarn

2. Set up necessary adobe I/O dependencies

  1. Install aio-cli core libraries$ npm install -g @adobe/aio-cli

  2. Install aep aio plugin$ npm install -g @adobe/aio-cli-plugin-aep

  3. Link aep with aio $ aio plugins:install @adobe/aio-cli-plugin-aep

  4. When you run $ aio -h now you should be able to see aep in the list of available plugins

3. Set up adobe I/O (PROD/STG/INT) integration

For PROD

  1. Go to https://console.adobe.io/integrations and create a production integration for test

  2. Follow the instructions on https://www.adobe.io/apis/experienceplatform/home/tutorials/alltutorials.html#!api-specification/markdown/narrative/tutorials/authenticate_to_acp_tutorial/authenticate_to_acp_tutorial.md

    to get the necessary I/O config credentials

  3. Create a config.json file with the following content


{
  "client_id": "your_client_id",
  "client_secret": "your_client_secret",
  "jwt_payload": { 
    "exp": your_expiration_time_value,
    "iss": "your_org@AdobeOrg",
    "sub": "your_tech_id@techacct.adobe.com",
    "https://ims-na1.adobelogin.com/s/ent_dataservices_sdk": true,
    "aud": "https://ims-na1.adobelogin.com/c/${your_client_id}"
  },
  "token_exchange_url": "https://ims-na1.adobelogin.com/ims/exchange/jwt/"
}

  1. Run the following commands now (no particular order)

  2. $ aio config:set jwt-auth ${path_to_the_above_config.json} --file --json

  3. $ aio config:set jwt-auth.jwt_private_key ${path_to_the_private_key_file_used_in_integration}

  4. $ aio config:set x-sandbox-id ${your_sanbox_id}

  5. $ aio config:set x-sandbox-name ${your_sanbox_name}

  6. $ aio config:set env prod

Additionally set the 'access_token' value in config with the following command. Think of it as the same parameter we pass in the 'Authorization' header on postman/Curl. You can get the access_token value from STG/INT Adobe I/O portal https://console-stage.adobe.io/. Please follow the instructions as suggested in this article, to get the access_token https://www.adobe.io/apis/experienceplatform/home/tutorials/alltutorials.html#!api-specification/markdown/narrative/tutorials/authenticate_to_acp_tutorial/authenticate_to_acp_tutorial.md#generate-access-token

$ aio config:set jwt-auth.access_token ${your_access_token_generated_through_adobeI/O_integration}

For STG/INT (This sample is for INT)

  1. Go to https://console-stage.adobe.io/integrations and create a production integration for test

  2. Follow the instructions on https://www.adobe.io/apis/experienceplatform/home/tutorials/alltutorials.html#!api-specification/markdown/narrative/tutorials/authenticate_to_acp_tutorial/authenticate_to_acp_tutorial.md

    to get the necessary I/O config credentials

  3. Create a config.json file with the following content


{
  "client_id": "your_client_id",
  "client_secret": "your_client_secret",
  "jwt_payload": { 
    "exp": your_expiration_time_value,
    "iss": "your_org@AdobeOrg",
    "sub": "your_tech_id@techacct.adobe.com",
    "https://ims-na1-stg1.adobelogin.com/s/ent_dataservices_sdk": true,
    "aud": "https://ims-na1-stg1.adobelogin.com/c/${your_client_id}"
  },
  "token_exchange_url": "https://ims-na1-stg1.adobelogin.com/ims/exchange/jwt/"
}

  1. Run the following commands now (no particular order)

  2. $ aio config:set jwt-auth ${path_to_the_above_config.json} --file --json

  3. $ aio config:set jwt-auth.jwt_private_key ${path_to_the_private_key_file_used_in_integration}

  4. $ aio config:set x-sandbox-id ${your_sanbox_id}

  5. $ aio config:set x-sandbox-name ${your_sanbox_name}

  6. $ aio config:set env int

4. Finally run this simple command to list datasets in your org to make sure the configuration is all correct

$ aio aep:ds:list

Output would look something like...

{
 'abc': {
 	tags: {
 		targetDataSetId: ['abc'],
 		'aep/siphon/partitions': [],
 		'adobe/pqs/table': ['abc'],
 		sandboxId: ['abc'],
 		mappingId: ['abc'],
 		acp_validationContext: ['enabled']
 	},
 	imsOrg: 'abc@AdobeOrg',
 	name: 'Mapping DataSet_abc',
 	namespace: 'ACP',
 	state: 'DRAFT',
 	lastBatchId: 'abc',
 	lastBatchStatus: 'success',
 	version: '1.0.3',
 	created: 1573866068596,
 	updated: 1573866132606,
 	createdClient: 'acp_foundation_connectors',
 	createdUser: 'abc@AdobeID',
 	updatedUser: 'acp_foundation_dataTracker@AdobeID',
 	lastSuccessfulBatch: 'abc',
 	viewId: 'abc',
 	aspect: 'production',
 	status: 'enabled',
 	fileDescription: {
 		persisted: false
 	},
 	files: '@/dataSets/abc/views/abc/files',
 	schemaMetadata: {
 		primaryKey: [],
 		delta: [],
 		dule: [],
 		gdpr: []
 	},
 	schemaRef: {
 		id: 'https://ns.adobe.com/acponboarding/schemas/abc',
 		contentType: 'application/vnd.adobe.xed-full+json;version=1'
 	},
 	streamingIngestionEnabled: 'false'
 },

...

5. (Developers) To run unit tests from the root folder of the project run the commands in following order

$ npm install

$ jest

$ jest --coverage (to see coverage report)

Keywords

FAQs

Package last updated on 07 Apr 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc