@graphcms/migration
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -34,4 +34,4 @@ "use strict"; | ||
{ | ||
viewer { | ||
projects { | ||
_viewer { | ||
project { | ||
id | ||
@@ -53,12 +53,10 @@ environments { | ||
const res = await client.request(query, variables); | ||
const projects = (_a = res === null || res === void 0 ? void 0 : res.viewer) === null || _a === void 0 ? void 0 : _a.projects; | ||
if (!projects) { | ||
const project = (_a = res === null || res === void 0 ? void 0 : res._viewer) === null || _a === void 0 ? void 0 : _a.project; | ||
if (!project) { | ||
return Promise.reject(notFound); | ||
} | ||
for (const project of projects) { | ||
for (const environment of project.environments) { | ||
if (environment.endpoint === endpoint) { | ||
environment.projectId = project.id; | ||
return environment; | ||
} | ||
for (const environment of project.environments) { | ||
if (environment.endpoint === endpoint) { | ||
environment.projectId = project.id; | ||
return environment; | ||
} | ||
@@ -167,2 +165,2 @@ } | ||
exports.fetchMigration = fetchMigration; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy91dGlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BOztHQUVHO0FBQ0gsSUFBSyxZQUlKO0FBSkQsV0FBSyxZQUFZO0lBQ2YsbURBQVUsQ0FBQTtJQUNWLG1EQUFNLENBQUE7SUFDTixtREFBTSxDQUFBO0FBQ1IsQ0FBQyxFQUpJLFlBQVksS0FBWixZQUFZLFFBSWhCO0FBK0tDLG9DQUFZO0FBN0tkOztHQUVHO0FBQ0gsSUFBSyxZQUtKO0FBTEQsV0FBSyxZQUFZO0lBQ2YsdURBQVksQ0FBQTtJQUNaLHlEQUFTLENBQUE7SUFDVCx5REFBUyxDQUFBO0lBQ1QsMkRBQVUsQ0FBQTtBQUNaLENBQUMsRUFMSSxZQUFZLEtBQVosWUFBWSxRQUtoQjtBQXNLQyxvQ0FBWTtBQXBLZ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nZVtdXG4pIHtcbiAgY29uc3QgcXVlcnkgPSBgXG4gICAgICAgIG11dGF0aW9uICgkZW52aXJvbm1lbnRJZDogSUQhLCAkY2hhbmdlczogW0JhdGNoTWlncmF0aW9uQ2hhbmdlSW5wdXQhXSEpIHtcbiAgICAgICAgICBzdWJtaXRCYXRjaENoYW5nZXMoZGF0YToge1xuICAgICAgICAgICAgZW52aXJvbm1lbnRJZDogJGVudmlyb25tZW50SWQsXG4gICAgICAgICAgICBjaGFuZ2VzOiAkY2hhbmdlcyxcbiAgICAgICAgICB9KSB7XG4gICAgICAgICAgICBtaWdyYXRpb24ge1xuICAgICAgICAgICAgICBpZCxcbiAgICAgICAgICAgICAgc3RhdHVzLFxuICAgICAgICAgICAgICBlcnJvcnMsXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgYDtcbiAgdHJ5IHtcbiAgICBjb25zdCB2YXJpYWJsZXMgPSB7XG4gICAgICBjaGFuZ2VzLFxuICAgICAgZW52aXJvbm1lbnRJZCxcbiAgICB9O1xuXG4gICAgY29uc3QgcmVzID0gYXdhaXQgY2xpZW50LnJlcXVlc3QocXVlcnksIHZhcmlhYmxlcyk7XG4gICAgY29uc3QgbWlncmF0aW9uID0gcmVzPy5zdWJtaXRCYXRjaENoYW5nZXM/Lm1pZ3JhdGlvbjtcblxuICAgIGlmICghbWlncmF0aW9uKSB7XG4gICAgICByZXR1cm4gUHJvbWlzZS5yZWplY3Qoe1xuICAgICAgICAvLyBUT0RPOiBoYXZlIGEgZGVjZW50IGVycm9yIGNvZGUuXG4gICAgICAgIGVycm9yczogXCJ1bmV4cGVjdGVkIHJlc3BvbnNlIHJlY2VpdmVkXCIsXG4gICAgICB9KTtcbiAgICB9XG5cbiAgICBpZiAobWlncmF0aW9uLmVycm9ycykge1xuICAgICAgcmV0dXJuIFByb21pc2UucmVqZWN0KHtcbiAgICAgICAgaWQ6IG1pZ3JhdGlvbi5pZCxcbiAgICAgICAgZXJyb3J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BmaW5pc2hlZEF0XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICAgYDtcblxuICBjb25zdCB2YXJpYWJsZXMgPSB7XG4gICAgcHJvamVjdElkOiBhcmdzLnByb2plY3RJZCxcbiAgICBtaWdyYXRpb25JZDogYXJncy5taWdyYXRpb25JZCxcbiAgICBlbnZpcm9ubWVudE5hbWU6IGFyZ3MuZW52aXJvbm1lbnROYW1lLFxuICB9O1xuXG4gIHRyeSB7XG4gICAgY29uc3Qgbm90Rm91bmQgPSBgbWlncmF0aW9uIHdpdGggaWQgJyR7YXJncy5taWdyYXRpb25JZH0nIG5vdCBmb3VuZGA7XG4gICAgY29uc3QgcmVzID0gYXdhaXQgY2xpZW50LnJlcXVlc3QocXVlcnksIHZhcmlhYmxlcyk7XG4gICAgY29uc3QgbWlncmF0aW9uID0gcmVzPy52aWV3ZXI/LnByb2plY3Q/LmVudmlyb25tZW50Py5taWdyYXRpb247XG4gICAgaWYgKCFtaWdyYXRpb24pIHtcbiAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChub3RGb3VuZCk7XG4gICAgfVxuICAgIHJldHVybiBtaWdyYXRpb247XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICByZXR1cm4gUHJvbWlzZS5yZWplY3QoZSk7XG4gIH1cbn1cblxuZXhwb3J0IHtcbiAgUGFydGlhbEJ5LFxuICBNdXRhdGlvbk1vZGUsXG4gIFJlbGF0aW9uVHlwZSxcbiAgZmV0Y2hFbnZpcm9ubWVudCxcbiAgZmV0Y2hNaWdyYXRpb24sXG4gIEZldGNoTWlncmF0aW9uQXJncyxcbiAgc3VibWl0TWlncmF0aW9uLFxufTtcbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy91dGlsLnRzIl0sIm5hbWVzI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bik6IFByb21pc2U8RW52aXJvbm1lbnRJbmZvPiB7XG4gIGNvbnN0IHF1ZXJ5ID0gYFxuICAgICAgICB7XG4gICAgICAgICAgX3ZpZXdlciB7XG4gICAgICAgICAgICBwcm9qZWN0IHtcbiAgICAgICAgICAgICAgaWRcbiAgICAgICAgICAgICAgZW52aXJvbm1lbnRzIHtcbiAgICAgICAgICAgICAgICBpZFxuICAgICAgICAgICAgICAgIG5hbWVcbiAgICAgICAgICAgICAgICBlbmRwb2ludFxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgYDtcblxuICBjb25zdCB2YXJpYWJsZXMgPSB7XG4gICAgZW5kcG9pbnQsXG4gIH07XG5cbiAgdHJ5IHtcbiAgICBjb25zdCBub3RGb3VuZCA9IGBlbnZpcm9ubWVudCB3aXRoIGVuZHBvaW50ICcke2VuZHBvaW50fScgbm90IGZvdW5kYDtcbiAgICBjb25zdCByZXMgPSBhd2FpdCBjbGllbnQucmVxdWVzdChxdWVyeSwgdmFyaWFibGVzKTtcbiAgICBjb25zdCBwcm9qZWN0ID0gcmVzPy5fdmlld2VyPy5wcm9qZWN0O1xuICAgIGlmICghcHJvamVjdCkge1xuICAgICAgcmV0dXJuIFByb21pc2UucmVqZWN0KG5vdEZvdW5kKTtcbiAgICB9XG4gICAgZm9yIChjb25zdCBlbnZpcm9ubWVudCBvZiBwcm9qZWN0LmVudmlyb25tZW50cykge1xuICAgICAgaWYgKGVudmlyb25tZW50LmVuZHBvaW50ID09PSBlbmRwb2ludCkge1xuICAgICAgICBlbnZpcm9ubWVudC5wcm9qZWN0SWQgPSBwcm9qZWN0LmlkO1xuICAgICAgICByZXR1cm4gZW52aXJvbm1lbnQ7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBQcm9taXNlLnJlamVjdChub3RGb3VuZCk7XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoZSk7XG4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11dGF0aW9uTW9kZSxcbiAgUmVsYXRpb25UeXBlLFxuICBmZXRjaEVudmlyb25tZW50LFxuICBmZXRjaE1pZ3JhdGlvbixcbiAgRmV0Y2hNaWdyYXRpb25BcmdzLFxuICBzdWJtaXRNaWdyYXRpb24sXG59O1xuIl19 |
{ | ||
"name": "@graphcms/migration", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "SDK for GraphCMS migrations", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
356473
4142
1