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

@tinymce/moxiedoc

Package Overview
Dependencies
Maintainers
2
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinymce/moxiedoc - npm Package Compare versions

Comparing version 0.3.0-rc.20220823044223419.sha945a016 to 0.3.0-rc.20220825083447694.sha7ee05ea

2

dist/templates/antora/antora.converter.d.ts

@@ -1,2 +0,2 @@

import { ExportStructure } from 'src/lib/exporter';
import { ExportStructure } from '../../lib/exporter';
import { PageOutput } from './util';

@@ -3,0 +3,0 @@ declare const convert: (pages: PageOutput[][], structure: ExportStructure) => PageOutput[][];

@@ -1,3 +0,3 @@

import { ExportStructure } from 'src/lib/exporter';
import { Api } from '../../lib/api';
import { ExportStructure } from '../../lib/exporter';
/**

@@ -4,0 +4,0 @@ * [function description]

@@ -5,2 +5,3 @@ "use strict";

const moxie_zip_1 = require("moxie-zip");
const Reporter = require("../../lib/reporter");
const AntoraTemplate = require("./antora.converter");

@@ -109,2 +110,3 @@ const Util = require("./util");

const addPageToArchive = function (page) {
Reporter.info('Adding file to zip:', page.filename);
this.addData(page.filename, page.content);

@@ -111,0 +113,0 @@ };

@@ -30,4 +30,4 @@ "use strict";

const getTitleFromFullName = (fullName) => fullName.split('.').slice(-1).join('');
const navLine = (name, level) => '*'.repeat(level) + ' ' + name + '\n';
const generateNavXref = (basePath, filename, title) => 'xref:' + basePath + '/' + filename + '[' + title + ']';
const navLine = (name, level) => '*'.repeat(level) + ` ${name}\n`;
const generateNavXref = (basePath, filename, title) => `xref:${basePath}/${filename}[${title}]`;
const generateXref = (name, structure) => {

@@ -38,5 +38,5 @@ const title = getTitleFromFullName(name);

case 'legacy':
return generateNavXref('api/' + getNamespaceFromFullName(name.toLowerCase()), fileName + '.adoc', title);
return generateNavXref(`api/${getNamespaceFromFullName(name.toLowerCase())}`, `${fileName}.adoc`, title);
case 'default':
return generateNavXref('apis', fileName + '.adoc', title);
return generateNavXref('apis', `${fileName}.adoc`, title);
}

@@ -49,3 +49,3 @@ };

exports.generateTypeXref = generateTypeXref;
const getJsonFilePath = (type, fullName) => ('_data/api/json/' + type + '_' + fullName.replace(/\./g, '_') + '.json').toLowerCase();
const getJsonFilePath = (type, fullName) => (`_data/api/json/${type}_${fullName.replace(/\./g, '_')}.json`).toLowerCase();
exports.getJsonFilePath = getJsonFilePath;

@@ -56,6 +56,6 @@ const getFilePath = (name, structure) => {

case 'legacy':
const folder = getNamespaceFromFullName(name) + '/';
return BASE_PATH + '/api/' + folder + '/' + fileName + '.adoc';
const folder = getNamespaceFromFullName(name);
return `${BASE_PATH}/api/${folder}/${fileName}.adoc`;
case 'default':
return BASE_PATH + '/' + fileName + '.adoc';
return `${BASE_PATH}/${fileName}.adoc`;
}

@@ -67,3 +67,3 @@ };

case 'legacy':
return generateNavXref('api/' + namespace.path, 'index.adoc', namespace.title);
return generateNavXref(`api/${namespace.path}`, 'index.adoc', namespace.title);
case 'default':

@@ -78,3 +78,3 @@ return namespace.title;

const folder = getNamespaceFromFullName(pageFile.path);
return generateNavXref('api/' + folder, fileName, pageFile.title);
return generateNavXref(`api/${folder}`, fileName, pageFile.title);
case 'default':

@@ -87,3 +87,3 @@ return generateNavXref('apis', fileName, pageFile.title);

const folder = getNamespaceFromFullName(pageFile.path);
return generateNavXref('api/' + folder, fileName, getNameFromFullName(pageFile.title));
return generateNavXref(`api/${folder}`, fileName, getNameFromFullName(pageFile.title));
};

@@ -203,3 +203,3 @@ const getRootPath = (structure) => {

type: 'adoc',
filename: BASE_PATH + '/api/' + namespace.path + '/index.adoc',
filename: `${BASE_PATH}/api/${namespace.path}/index.adoc`,
content: legacyIndexToAdoc(namespace, memberTemplate, descriptions, structure)

@@ -206,0 +206,0 @@ }));

{
"name": "@tinymce/moxiedoc",
"version": "0.3.0-rc.20220823044223419.sha945a016",
"version": "0.3.0-rc.20220825083447694.sha7ee05ea",
"description": "A tool for generating API documentation",

@@ -5,0 +5,0 @@ "author": "Tiny Technologies, Inc",

import { ExportStructure } from 'src/lib/exporter';
import { ExportStructure } from '../../lib/exporter';
import { Return } from '../../lib/member';

@@ -5,0 +4,0 @@ import { Param } from '../../lib/param';

import { ZipWriter } from 'moxie-zip';
import { ExportStructure } from 'src/lib/exporter';
import { Api } from '../../lib/api';
import { ExportStructure } from '../../lib/exporter';
import * as Reporter from '../../lib/reporter';
import { Type } from '../../lib/type';

@@ -123,2 +124,3 @@ import * as AntoraTemplate from './antora.converter';

const addPageToArchive = function (this: ZipWriter, page: PageOutput) {
Reporter.info('Adding file to zip:', page.filename);
this.addData(page.filename, page.content);

@@ -125,0 +127,0 @@ };

@@ -54,6 +54,6 @@ import * as fs from 'fs';

const navLine = (name: string, level: number): string =>
'*'.repeat(level) + ' ' + name + '\n';
'*'.repeat(level) + ` ${name}\n`;
const generateNavXref = (basePath: string, filename: string, title: string): string =>
'xref:' + basePath + '/' + filename + '[' + title + ']';
`xref:${basePath}/${filename}[${title}]`;

@@ -65,6 +65,6 @@ const generateXref = (name: string, structure: ExportStructure): string => {

case 'legacy':
return generateNavXref('api/' + getNamespaceFromFullName(name.toLowerCase()), fileName + '.adoc', title);
return generateNavXref(`api/${getNamespaceFromFullName(name.toLowerCase())}`, `${fileName}.adoc`, title);
case 'default':
return generateNavXref('apis', fileName + '.adoc', title);
return generateNavXref('apis', `${fileName}.adoc`, title);
}

@@ -78,3 +78,3 @@ };

const getJsonFilePath = (type: string, fullName: string): string =>
('_data/api/json/' + type + '_' + fullName.replace(/\./g, '_') + '.json').toLowerCase();
(`_data/api/json/${type}_${fullName.replace(/\./g, '_')}.json`).toLowerCase();

@@ -85,7 +85,7 @@ const getFilePath = (name: string, structure: ExportStructure): string => {

case 'legacy':
const folder = getNamespaceFromFullName(name) + '/';
return BASE_PATH + '/api/' + folder + '/' + fileName + '.adoc';
const folder = getNamespaceFromFullName(name);
return `${BASE_PATH}/api/${folder}/${fileName}.adoc`;
case 'default':
return BASE_PATH + '/' + fileName + '.adoc';
return `${BASE_PATH}/${fileName}.adoc`;
}

@@ -97,3 +97,3 @@ };

case 'legacy':
return generateNavXref('api/' + namespace.path, 'index.adoc', namespace.title);
return generateNavXref(`api/${namespace.path}`, 'index.adoc', namespace.title);

@@ -110,3 +110,3 @@ case 'default':

const folder = getNamespaceFromFullName(pageFile.path);
return generateNavXref('api/' + folder, fileName, pageFile.title);
return generateNavXref(`api/${folder}`, fileName, pageFile.title);

@@ -121,3 +121,3 @@ case 'default':

const folder = getNamespaceFromFullName(pageFile.path);
return generateNavXref('api/' + folder, fileName, getNameFromFullName(pageFile.title));
return generateNavXref(`api/${folder}`, fileName, getNameFromFullName(pageFile.title));
};

@@ -256,3 +256,3 @@

): PageOutput[] => {
const newNavPages = [] as PageOutput[];
const newNavPages: PageOutput[] = [];
const descriptions = getDescriptionsFromTypes(sortedTypes);

@@ -262,3 +262,3 @@ indexPage.pages.forEach((namespace) =>

type: 'adoc',
filename: BASE_PATH + '/api/' + namespace.path + '/index.adoc',
filename: `${BASE_PATH}/api/${namespace.path}/index.adoc`,
content: legacyIndexToAdoc(namespace, memberTemplate, descriptions, structure)

@@ -265,0 +265,0 @@ })

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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