Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@jupiterone/integration-sdk-dev-tools
Advanced tools
A collection of developer tools that will assist with building integrations.
This package contains some common dependencies and configuration files used in JupiterOne integrations.
This module is opinionated and bundles in the following dependencies:
typescript
prettier
jest
eslint
husky
lint-staged
For convenience, this package also comes bundled with the
@jupiterone/integration-sdk-cli
module.
npm install -D @jupiterone/integration-sdk-dev-tools
# or
yarn add -D @jupiterone/integration-sdk-dev-tools
Create prettier.config.js
at root of your project that contains:
module.exports = require('@jupiterone/integration-sdk-dev-tools/config/prettier');
Create lint-staged.config.js
at root of your project that contains:
module.exports = require('@jupiterone/integration-sdk-dev-tools/config/lint-staged');
Create husky.config.js
at root of your project that contains:
module.exports = require('@jupiterone/integration-sdk-dev-tools/config/husky');
Create jest.config.js
at root of your project that contains:
module.exports = require('@jupiterone/integration-sdk-dev-tools/config/jest');
Create tsconfig.json
at root of your project that contains:
{
"extends": "./node_modules/@jupiterone/integration-sdk-dev-tools/config/typescript",
"compilerOptions": {
"outDir": "dist"
},
"exclude": ["dist"]
}
Create a .eslintrc
at the root of your project that contains:
{
"root": true,
"extends": [
"./node_modules/@jupiterone/integration-sdk-dev-tools/config/eslint.json"
]
}
[8.4.0] - 2022-02-16
Added .toMatchStepMetadata
jest matcher. This matcher complements the
executeStepWithDependencies
utility. Usage:
const stepResult = await executeStepWithDependencies({
stepId: Steps.FETCH_USERS.id,
invocationConfig,
instanceConfig,
});
expect(stepResult).toMatchStepMetadata({
stepId: Steps.FETCH_USERS.id,
invocationConfig,
});
Updated jest matchers in the following way:
_type
argument to .toMatchGraphObjectSchema
matcher_type
and _class
arguments to
.toMatchDirectRelationshipSchema
matcherThis enables developers to simply pass the StepEntityMetadata
and
StepRelationshipMetadata
interfaces to these matchers. Usage:
expect(collectedEntities).toMatchGraphObjectSchema(Entities.USER);
expect(collectedRelationships).toMatchDirectRelationshipSchema(
Relationships.ACCOUNT_HAS_USER,
);
Added optional schema
property to StepGraphObjectMetadata
. This allows
developers to provide the property schema to expect on entities,
relationships, and mapped relationships. This serves two uses:
j1-integration document
command could automatically produce consumer
documentation about the properties that an entity / relationship is
expected to haveAdded executeStepWithDependencies
utility to
@jupiterone/integration-sdk-testing
package. This allows developers to test
specific integration steps in isolation, while assuring that all of its
dependencies have indeed executed. Usage:
const { collectedEntities, collectedRelationships, collectedData } =
await executeStepWithDependencies({
stepId: Steps.FETCH_USERS.id,
invocationConfig,
instanceConfig,
});
expect(collectedEntities.length).toBeGreaterThan(0);
expect(collectedEnities).toMatchGraphObjectSchema({
_class: Entities.USER._class,
schema: Entities.USER.schema,
});
// ... additional expectations
Added MockJobState.collectedData
to capture data that has been collected in
the job state. Usage:
const jobState = createMockJobState({
setData: { existingKey: 'existing-value' },
});
await executeStepThatAddsAccountEntity();
expect(jobState.collectedData).toEqual({
ACCOUNT_ENTITY: {
_type: 'account',
_class: 'Account',
_key: 'account1',
},
});
expect(jobState.collectedData.existingKey).toBeUndefined();
FAQs
A collection of developer tools that will assist with building integrations.
The npm package @jupiterone/integration-sdk-dev-tools receives a total of 9,492 weekly downloads. As such, @jupiterone/integration-sdk-dev-tools popularity was classified as popular.
We found that @jupiterone/integration-sdk-dev-tools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
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.