Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphcms/migration

Package Overview
Dependencies
Maintainers
5
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphcms/migration - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

5

lib/migration.d.ts

@@ -20,2 +20,6 @@ import { Model } from "./model";

authToken: string;
/**
* Name for the migration. This must be unique to this migration.
*/
name?: string;
}

@@ -36,2 +40,3 @@ interface MigrationChange {

id: string;
name?: string;
status?: string;

@@ -38,0 +43,0 @@ errors?: string;

23

lib/migration.js

@@ -101,6 +101,23 @@ "use strict";

const changes = this.generateChanges();
const resp = await util_1.submitMigration(this.client, this.environment.id, changes);
const resp = await util_1.submitMigration(this.client, {
environmentId: this.environment.id,
name: this.config.name,
changes,
});
this.migrated = true;
if (foreground) {
return this.waitForMigration(resp.id);
try {
const migration = await this.waitForMigration(resp.id);
if (migration.errors) {
return migration;
}
// only include name for successful migrations.
return {
name: resp.name,
...migration,
};
}
catch (e) {
return Promise.reject(e);
}
}

@@ -148,2 +165,2 @@ return resp;

exports.newMigration = newMigration;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlncmF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL21pZ3JhdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxxREFBZ0Q7QUFDaEQsbUNBQTRDO0FBQzVDLGlDQUtnQjtBQVdoQiwrQ0FJdUI7QUFDdkIsbUNBQTRDO0FBQzVDLHFDQUErQztBQUUvQzs7R0FFRztBQUNILE1BQU0sUUFBUSxHQUNaLE9BQU8sQ0FBQyxHQUFHLENBQUMseUJBQXlCO0lBQ3JDLDhDQUE4QyxDQUFDO0FBK0pqRDs7R0FFRztBQUNILE1BQU0sY0FBYztJQU9sQixZQUFZLE1BQ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m8sXG4gIG5ld01pZ3JhdGlvbixcbiAgTWlncmF0aW9uSW5mbyxcbiAgTWlncmF0aW9uQ2hhbmdlLFxuICBNaWdyYXRpb25Db25maWcsXG4gIENoYW5nZUxpc3RlbmVyLFxuICBDaGFuZ2VJdGVtLFxufTtcbiJdfQ==

@@ -33,5 +33,10 @@ import { GraphQLClient } from "graphql-request/dist";

*/
declare function submitMigration(client: GraphQLClient, environmentId: string, changes: MigrationChange[]): Promise<{
declare function submitMigration(client: GraphQLClient, body: {
environmentId: string;
name?: string;
changes: MigrationChange[];
}): Promise<{
id: any;
status: any;
name: string;
}>;

@@ -38,0 +43,0 @@ /**

51

lib/util.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.submitMigration = exports.fetchMigration = exports.fetchEnvironment = exports.RelationType = exports.MutationMode = void 0;
const uuid_1 = require("uuid");
/**

@@ -77,9 +78,18 @@ * @ignore

*/
async function submitMigration(client, environmentId, changes) {
async function submitMigration(client, body) {
var _a;
const mutationArgs = [
"$environmentId: ID!",
"$changes: [BatchMigrationChangeInput!]!",
"$name: String!",
];
const bodyArgs = [
"environmentId: $environmentId",
"changes: $changes",
"name: $name",
];
const query = `
mutation ($environmentId: ID!, $changes: [BatchMigrationChangeInput!]!) {
mutation (${mutationArgs.join(", ")}) {
submitBatchChanges(data: {
environmentId: $environmentId,
changes: $changes,
${bodyArgs.join(", ")}
}) {

@@ -96,4 +106,5 @@ migration {

const variables = {
changes,
environmentId,
changes: body.changes,
environmentId: body.environmentId,
name: body.name || uuid_1.v4(),
};

@@ -117,2 +128,3 @@ const res = await client.request(query, variables);

status: migration.status,
name: variables.name,
};

@@ -134,16 +146,17 @@ }

query fetchMigration($environmentName: String!, $migrationId: ID!){
_viewer {
... on TokenViewer {
project {
environment(name: $environmentName) {
migration(id: $migrationId) {
id
status
errors
createdAt
finishedAt
}
}
_viewer {
... on TokenViewer {
project {
environment(name: $environmentName) {
migration(id: $migrationId) {
id
status
errors
createdAt
finishedAt
}
}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SA9IGBcbiAgICBxdWVyeSBmZXRjaE1pZ3JhdGlvbigkZW52aXJvbm1lbnROYW1lOiBTdHJpbmchLCAkbWlncmF0aW9uSWQ6IElEISl7XG4gICAgICAgIF92aWV3ZXIge1xuICAgICAgICAgIC4uLiBvbiBUb2tlblZpZXdlciB7XG4gICAgICAgICAgICBwcm9qZWN0IHtcbiAgICAgICAgICAgICAgICBlbnZpcm9ubWVudChuYW1lOiAkZW52aXJvbm1lbnROYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIG1pZ3JhdGlvbihpZDogJG1pZ3JhdGlvbklkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzXG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvcnNcbiAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZWRBdFxuICAgICAgICAgICAgICAgICAgICAgICAgZmluaXNoZWRBdFxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgYDtcblxuICBjb25zdCB2YXJpYWJsZXMgPSB7XG4gICAgbWlncmF0aW9uSWQ6IGFyZ3MubWlncmF0aW9uSWQsXG4gICAgZW52aXJvbm1lbnROYW1lOiBhcmdzLmVudmlyb25tZW50TmFtZSxcbiAgfTtcblxuICB0cnkge1xuICAgIGNvbnN0IG5vdEZvdW5kID0gYG1pZ3JhdGlvbiB3aXRoIGlkICcke2FyZ3MubWlncmF0aW9uSWR9JyBub3QgZm91bmRgO1xuICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNsaWVudC5yZXF1ZXN0KHF1ZXJ5LCB2YXJpYWJsZXMpO1xuICAgIGNvbnN0IG1pZ3JhdGlvbiA9IHJlcz8uX3ZpZXdlcj8ucHJvamVjdD8uZW52aXJvbm1lbnQ/Lm1pZ3JhdGlvbjtcbiAgICBpZiAoIW1pZ3JhdGlvbikge1xuICA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5hc3luYyBmdW5jdGlvbiBzdWJtaXRNaWdyYXRpb24oXG4gIGNsaWVudDogR3JhcGhRTENsaWVudCxcbiAgYm9keToge1xuICAgIGVudmlyb25tZW50SWQ6IHN0cmluZztcbiAgICBuYW1lPzogc3RyaW5nO1xuICAgIGNoYW5nZXM6IE1pZ3JhdGlvbkNoYW5nZVtdO1xuICB9XG4pIHtcbiAgY29uc3QgbXV0YXRpb25BcmdzID0gW1xuICAgIFwiJGVudmlyb25tZW50SWQ6IElEIVwiLFxuICAgIFwiJGNoYW5nZXM6IFtCYXRjaE1pZ3JhdGlvbkNoYW5nZUlucHV0IV0hXCIsXG4gICAgXCIkbmFtZTogU3RyaW5nIVwiLFxuICBdO1xuICBjb25zdCBib2R5QXJncyA9IFtcbiAgICBcImVudmlyb25tZW50SWQ6ICRlbnZpcm9ubWVudElkXCIsXG4gICAgXCJjaGFuZ2VzOiAkY2hhbmdlc1wiLFxuICAgIFwibmFtZTogJG5hbWVcIixcbiAgXTtcblxuICBjb25zdCBxdWVyeSA9IGBcbiAgICAgICAgbXV0YXRpb24gKCR7bXV0YXRpb25BcmdzLmpvaW4oXCIsIFwiKX0pIHtcbiAgICAgICAgICBzdWJtaXRCYXRjaENoYW5nZXMoZGF0YToge1xuICAgICAgICAgICAgJHtib2R5QXJncy5qb2luKFwiLCBcIil9XG4gICAgICAgICAgfSkge1xuICAgICAgICAgICAgbWlncmF0aW9uIHtcbiAgICAgICAgICAgICAgaWQsXG4gICAgICAgICAgICAgIHN0YXR1cyxcbiAgICAgICAgICAgICAgZXJyb3JzLFxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIGA7XG4gIHRyeSB7XG4gICAgY29uc3QgdmFyaWFibGVzID0ge1xuICAgICAgY2hhbmdlczogYm9keS5jaGFuZ2VzLFxuICAgICAgZW52aXJvbm1lbnRJZDogYm9keS5lbnZpcm9ubWVudElkLFxuICAgICAgbmFtZTogYm9keS5uYW1lIHx8IHV1aWQ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aWVudCxcbiAgYXJnczogRmV0Y2hNaWdyYXRpb25BcmdzXG4pOiBQcm9taXNlPE1pZ3JhdGlvbkluZm8+IHtcbiAgY29uc3QgcXVlcnkgPSBgXG4gICAgcXVlcnkgZmV0Y2hNaWdyYXRpb24oJGVudmlyb25tZW50TmFtZTogU3RyaW5nISwgJG1pZ3JhdGlvbklkOiBJRCEpe1xuICAgICAgX3ZpZXdlciB7XG4gICAgICAgIC4uLiBvbiBUb2tlblZpZXdlciB7XG4gICAgICAgICAgcHJvamVjdCB7XG4gICAgICAgICAgICBlbnZpcm9ubWVudChuYW1lOiAkZW52aXJvbm1lbnROYW1lKSB7XG4gICAgICAgICAgICAgIG1pZ3JhdGlvbihpZDogJG1pZ3JhdGlvbklkKSB7XG4gICAgICAgICAgICAgICAgaWRcbiAgICAgICAgICAgICAgICBzdGF0dXNcbiAgICAgICAgICAgICAgICBlcnJvcnNcbiAgICAgICAgICAgICAgICBjcmVhdGVkQXRcbiAgICAgICAgICAgICAgICBmaW5pc2hlZEF0XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gICBgO1xuXG4gIGNvbnN0IHZhcmlhYmxlcyA9IHtcbiAgICBtaWdyYXRpb25JZDogYXJncy5taWdyYXRpb25JZCxcbiAgICBlbnZpcm9ubWVudE5hbWU6IGFyZ3MuZW52aXJvbm1lbnROYW1lLFxuICB9O1xuXG4gIHRyeSB7XG4gICAgY29uc3Qgbm90Rm91bmQgPSBgbWlncmF0aW9uIHdpdGggaWQgJyR7YXJncy5taWdyYXRpb25JZH0nIG5vdCBmb3VuZGA7XG4gICAgY29uc3QgcmVzID0gYXdhaXQgY2xpZW50LnJlcXVlc3QocXVlcnksIHZhcmlhYmxlcyk7XG4gICAgY29uc3QgbWlncmF0aW9uID0gcmVzPy5fdmlld2VyPy5wcm9qZWN0Py5lbnZpcm9ubWVudD8ubWlncmF0aW9uO1xuICAgIGlmICghbWlncmF0aW9uKSB7XG4gICAgICByZXR1cm4gUHJvbWlzZS5yZWplY3Qobm90Rm91bmQpO1xuICAgIH1cbiAgICByZXR1cm4gbWlncmF0aW9uO1xuICB9IGNhdGNoIChlKSB7XG4gICAgcmV0dXJuIFByb21pc2UucmVqZWN0KGUpO1xuICB9XG59XG5cbmV4cG9ydCB7XG4gIFBhcnRpYWxCeSxcbiAgTXV0YXRpb25Nb2RlLFxuICBSZWxhdGlvblR5cGUsXG4gIGZldGNoRW52aXJvbm1lbnQsXG4gIGZldGNoTWlncmF0aW9uLFxuICBGZXRjaE1pZ3JhdGlvbkFyZ3MsXG4gIHN1Ym1pdE1pZ3JhdGlvbixcbn07XG4iXX0=
{
"name": "@graphcms/migration",
"version": "0.0.9",
"version": "0.0.10",
"description": "SDK for GraphCMS migrations",

@@ -22,6 +22,8 @@ "main": "lib/index.js",

"dependencies": {
"@types/node": "^14.0.27",
"graphql-request": "2.1.0-next.1"
"graphql-request": "2.1.0-next.1",
"uuid": "^8.3.0"
},
"devDependencies": {
"@types/node": "^14.0.27",
"@types/uuid": "^8.3.0",
"dotenv": "^8.2.0",

@@ -28,0 +30,0 @@ "jest": "^26.3.0",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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