1.1.0 • Published 4 years ago

@quantilope/dynamoose-models v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

dynamoose-models

Example

Summary

To understand how to use these models, refer to the dynamoose docs.

import {
    createDeployedInfrastructureModel
} from '@quantilope/dynamoose-models';

// The function returns a Dynamoose model, so check out the dynamoose docs on
// how to use it.
const DeployedInfrastructure = createDeployedInfrastructureModel();

Create a new entry

const newInfrastructureEntry = new DeployedInfrastructure({
    id: process.env.INFRASTRUCTURE_ID,
    sshdHost,
    gottyHost
});

await newInfrastructureEntry.save();

Find an entry

// You get the object containing the document directly
const existingInfrastructure = await DeployedInfrastructure
    .queryOne('id').eq('myInfraId')
    .exec();

Find many entries

// You get an array of documents
const deployedInfrastructures = await DeployedInfrastructure
    .scan()
    .exec();

Publishing

We are using @pika/pack, so to build and release new version of this package:

# pack build
$ npm run build

# pack publish
$ npm run release
1.1.0

4 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

0.0.1

5 years ago