Socket
Socket
Sign inDemoInstall

@forestryio/gql

Package Overview
Dependencies
378
Maintainers
15
Versions
52
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.4 to 0.1.5

dist/chunk.JTK2UODS.js

70

dist/index.js

@@ -10,3 +10,3 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var _chunkO4ZDDZHGjs = require('./chunk.O4ZDDZHG.js');
var _chunkJTK2UODSjs = require('./chunk.JTK2UODS.js');

@@ -80,5 +80,5 @@ // src/datasources/github-manager.ts

const templates = await this.readDir(fullPath, this.dirLoader);
return await _chunkO4ZDDZHGjs.sequential.call(void 0, templates, async (templateSlug) => await this.getTemplate(templateSlug.replace(".yml", "")));
return await _chunkJTK2UODSjs.sequential.call(void 0, templates, async (templateSlug) => await this.getTemplate(templateSlug.replace(".yml", "")));
};
this.getTemplates = async (templateSlugs) => await _chunkO4ZDDZHGjs.sequential.call(void 0, templateSlugs, async (templateSlug) => await this.getTemplate(templateSlug));
this.getTemplates = async (templateSlugs) => await _chunkJTK2UODSjs.sequential.call(void 0, templateSlugs, async (templateSlug) => await this.getTemplate(templateSlug));
this.getSettingsData = async () => {

@@ -102,3 +102,3 @@ const {data} = await this.readFile(_path2.default.join(this.rootPath, tinaPath, "settings.yml"), this.loader);

const sections = data.sections.filter((section2) => section2.type === "directory").map((section2) => {
return _chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, section2), {
return _chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, section2), {
slug: section2.name

@@ -116,3 +116,3 @@ });

const sections = data.sections.filter((section2) => section2.type === "directory").map((section2) => {
return _chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, section2), {
return _chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, section2), {
slug: section2.name

@@ -132,3 +132,3 @@ });

const sections = data.sections.filter((section) => section.type === "directory").map((section) => {
return _chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, section), {
return _chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, section), {
slug: section.name

@@ -143,13 +143,13 @@ });

const sections = data.sections.map((section2) => {
return _chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, section2), {
return _chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, section2), {
slug: section2.name
});
});
const templates = section ? (_a = sections.filter(_chunkO4ZDDZHGjs.byTypeWorks.call(void 0, "directory")).find((templateSection) => {
const templates = section ? (_a = sections.filter(_chunkJTK2UODSjs.byTypeWorks.call(void 0, "directory")).find((templateSection) => {
return templateSection.slug === section;
})) == null ? void 0 : _a.templates : _lodash2.default.flatten(sections.filter(_chunkO4ZDDZHGjs.byTypeWorks.call(void 0, "directory")).map(({templates: templates2}) => templates2));
})) == null ? void 0 : _a.templates : _lodash2.default.flatten(sections.filter(_chunkJTK2UODSjs.byTypeWorks.call(void 0, "directory")).map(({templates: templates2}) => templates2));
if (!templates) {
throw new Error(`No templates found for section`);
}
return await _chunkO4ZDDZHGjs.sequential.call(void 0, templates, async (templateBasename) => {
return await _chunkJTK2UODSjs.sequential.call(void 0, templates, async (templateBasename) => {
return await this.getTemplate(templateBasename.replace(".yml", ""));

@@ -179,3 +179,3 @@ });

const templates = await this.readDir(fullPath, this.dirLoader);
const template = (await _chunkO4ZDDZHGjs.sequential.call(void 0, templates, async (template2) => {
const template = (await _chunkJTK2UODSjs.sequential.call(void 0, templates, async (template2) => {
var _a;

@@ -204,3 +204,3 @@ const data = await this.getTemplate(template2.replace(".yml", ""));

const {data} = await this.readFile(_path2.default.join(fullPath, template), this.loader);
return namespaceFields(_chunkO4ZDDZHGjs.__assign.call(void 0, {name: slug}, data));
return namespaceFields(_chunkJTK2UODSjs.__assign.call(void 0, {name: slug}, data));
};

@@ -229,3 +229,3 @@ this.getTemplateWithoutName = async (slug, options = {namespace: true}) => {

const path2 = _path2.default.join(sectionData.path, relativePath);
const updatedTemplateData = _chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, templateData), {
const updatedTemplateData = _chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, templateData), {
pages: [...templateData.pages ? templateData.pages : [], path2]

@@ -266,3 +266,3 @@ });

});
const {_body} = params, data = _chunkO4ZDDZHGjs.__rest.call(void 0, params, ["_body"]);
const {_body} = params, data = _chunkJTK2UODSjs.__rest.call(void 0, params, ["_body"]);
const string = _graymatter2.default.stringify(`

@@ -291,3 +291,3 @@ ${_body || ""}`, data);

results[path2] = await getAndSetFromCache(repoConfig, path2, () => {
return appOctoKit.repos.getContent(_chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, repoConfig), {
return appOctoKit.repos.getContent(_chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, repoConfig), {
path: path2

@@ -309,3 +309,3 @@ })).then((response) => {

results[path2] = await getAndSetFromCache(repoConfig, path2, () => {
return appOctoKit.repos.getContent(_chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, repoConfig), {
return appOctoKit.repos.getContent(_chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, repoConfig), {
path: path2

@@ -332,3 +332,3 @@ })).then((dirContents) => {

try {
const fileContent = await this.appOctoKit.repos.getContent(_chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, this.repoConfig), {
const fileContent = await this.appOctoKit.repos.getContent(_chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, this.repoConfig), {
path: path2

@@ -340,3 +340,3 @@ }));

}
const response = await this.appOctoKit.repos.createOrUpdateFileContents(_chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, this.repoConfig), {
const response = await this.appOctoKit.repos.createOrUpdateFileContents(_chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, this.repoConfig), {
path: path2,

@@ -353,3 +353,3 @@ message: "Update from GraphQL client",

async internalReadDir(path2) {
const dirContents = await this.appOctoKit.repos.getContent(_chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, this.repoConfig), {
const dirContents = await this.appOctoKit.repos.getContent(_chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, this.repoConfig), {
path: path2

@@ -374,8 +374,8 @@ }));

const namespaceFields = (template) => {
return _chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, template), {
return _chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, template), {
fields: template.fields.map((f) => {
if (isWithFields(f)) {
return _chunkO4ZDDZHGjs.__assign.call(void 0, {}, namespaceSubFields(f, template.name));
return _chunkJTK2UODSjs.__assign.call(void 0, {}, namespaceSubFields(f, template.name));
} else {
return _chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, f), {
return _chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, f), {
__namespace: `${template.name}`

@@ -388,10 +388,10 @@ });

const namespaceSubFields = (template, parentNamespace) => {
return _chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, template), {
return _chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, template), {
fields: template.fields.map((f) => {
if (isWithFields(f)) {
return _chunkO4ZDDZHGjs.__assign.call(void 0, _chunkO4ZDDZHGjs.__assign.call(void 0, {}, namespaceSubFields(f, template.name)), {
return _chunkJTK2UODSjs.__assign.call(void 0, _chunkJTK2UODSjs.__assign.call(void 0, {}, namespaceSubFields(f, template.name)), {
__namespace: `${parentNamespace}_${template.name}`
});
} else {
return _chunkO4ZDDZHGjs.__assign.call(void 0, {}, f);
return _chunkJTK2UODSjs.__assign.call(void 0, {}, f);
}

@@ -410,7 +410,7 @@ }),

}) => {
const datasource = new (0, _chunkO4ZDDZHGjs.FileSystemManager)(projectRoot);
const cache3 = _chunkO4ZDDZHGjs.cacheInit.call(void 0, datasource);
const datasource = new (0, _chunkJTK2UODSjs.FileSystemManager)(projectRoot);
const cache3 = _chunkJTK2UODSjs.cacheInit.call(void 0, datasource);
try {
const {schema, sectionMap} = await _chunkO4ZDDZHGjs.schemaBuilder.call(void 0, {cache: cache3});
const result = await _chunkO4ZDDZHGjs.graphqlInit.call(void 0, {
const {schema, sectionMap} = await _chunkJTK2UODSjs.schemaBuilder.call(void 0, {cache: cache3});
const result = await _chunkJTK2UODSjs.graphqlInit.call(void 0, {
schema: _graphql.buildASTSchema.call(void 0, schema),

@@ -429,5 +429,5 @@ source: query,

const buildSchema = async (projectRoot) => {
const datasource = new (0, _chunkO4ZDDZHGjs.FileSystemManager)(projectRoot);
const cache3 = _chunkO4ZDDZHGjs.cacheInit.call(void 0, datasource);
const {schema} = await _chunkO4ZDDZHGjs.schemaBuilder.call(void 0, {cache: cache3});
const datasource = new (0, _chunkJTK2UODSjs.FileSystemManager)(projectRoot);
const cache3 = _chunkJTK2UODSjs.cacheInit.call(void 0, datasource);
const {schema} = await _chunkJTK2UODSjs.schemaBuilder.call(void 0, {cache: cache3});
return _graphql.buildASTSchema.call(void 0, schema);

@@ -451,5 +451,5 @@ };

});
const cache3 = _chunkO4ZDDZHGjs.cacheInit.call(void 0, datasource);
const {schema, sectionMap} = await _chunkO4ZDDZHGjs.schemaBuilder.call(void 0, {cache: cache3});
const result = await _chunkO4ZDDZHGjs.graphqlInit.call(void 0, {
const cache3 = _chunkJTK2UODSjs.cacheInit.call(void 0, datasource);
const {schema, sectionMap} = await _chunkJTK2UODSjs.schemaBuilder.call(void 0, {cache: cache3});
const result = await _chunkJTK2UODSjs.graphqlInit.call(void 0, {
schema: _graphql.buildASTSchema.call(void 0, schema),

@@ -456,0 +456,0 @@ source: query,

@@ -6,3 +6,3 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var _chunkO4ZDDZHGjs = require('./chunk.O4ZDDZHG.js');
var _chunkJTK2UODSjs = require('./chunk.JTK2UODS.js');

@@ -44,7 +44,7 @@ // src/server.ts

let projectRoot = root ? root : _path2.default.join(fixturePath2, req.path);
const datasource = new (0, _chunkO4ZDDZHGjs.FileSystemManager)(projectRoot);
const cache2 = _chunkO4ZDDZHGjs.cacheInit.call(void 0, datasource);
const {schema, sectionMap} = await _chunkO4ZDDZHGjs.schemaBuilder.call(void 0, {cache: cache2});
const datasource = new (0, _chunkJTK2UODSjs.FileSystemManager)(projectRoot);
const cache2 = _chunkJTK2UODSjs.cacheInit.call(void 0, datasource);
const {schema, sectionMap} = await _chunkJTK2UODSjs.schemaBuilder.call(void 0, {cache: cache2});
await _fs2.default.writeFileSync(_path2.default.join(projectRoot, "ast-schema.graphql"), _graphql.print.call(void 0, schema));
const result = await _chunkO4ZDDZHGjs.graphqlInit.call(void 0, {
const result = await _chunkJTK2UODSjs.graphqlInit.call(void 0, {
schema: _graphql.buildASTSchema.call(void 0, schema),

@@ -51,0 +51,0 @@ source: query,

{
"name": "@forestryio/gql",
"version": "0.1.4",
"version": "0.1.5",
"main": "dist/index.js",

@@ -19,3 +19,3 @@ "typings": "dist/index.d.ts",

"dependencies": {
"@forestryio/graphql-helpers": "0.0.20",
"@forestryio/graphql-helpers": "0.0.21",
"@octokit/auth-app": "^2.6.0",

@@ -27,2 +27,3 @@ "@octokit/graphql": "^4.5.6",

"dataloader": "^2.0.0",
"date-fns": "^2.21.1",
"express": "^4.17.1",

@@ -29,0 +30,0 @@ "fast-glob": "^3.2.5",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc