{"id":43628,"library":"ploc","title":"PLOC","description":"A simple PL/SQL code-to-document converter that extracts specially formatted PL/SQL comments and generates Markdown documentation files. Current stable version is 0.9.1, released on npm and written in JavaScript. It is a lightweight tool (around 120 lines of code) that supports packages, functions, procedures, types, and triggers. Key differentiators: focuses solely on PL/SQL-to-Markdown conversion with minimal configuration, supports table of contents generation, and integrates with file watchers for automated documentation updates. Compared to PLDoc or other PL/SQL doc generators, PLOC is deliberately minimal and requires explicit comment markers (`/** ... **/`) for documentation extraction.","status":"active","version":"0.9.1","language":"javascript","source_language":"en","source_url":"https://github.com/ogobrecht/ploc","tags":["javascript","PL/SQL","Doc","Generator","Converter","Markdown"],"install":[{"cmd":"npm install ploc","lang":"bash","label":"npm"},{"cmd":"yarn add ploc","lang":"bash","label":"yarn"},{"cmd":"pnpm add ploc","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package is ESM-only. Named export 'ploc' is a function that converts a PL/SQL source string to Markdown.","wrong":"const ploc = require('ploc')","symbol":"ploc","correct":"import { ploc } from 'ploc'"},{"note":"Default import also works and exports the same function as named.","wrong":"import { default as ploc } from 'ploc'","symbol":"ploc (default import)","correct":"import ploc from 'ploc'"},{"note":"Type import for TypeScript users (shipped with types).","symbol":"PlocOptions","correct":"import type { PlocOptions } from 'ploc'"}],"quickstart":{"code":"import { ploc } from 'ploc';\n\nconst plsqlSource = `\nCREATE OR REPLACE PACKAGE demo AUTHID current_user IS\n/**\nMy Package\n==========\n\nThis is a demo package.\n**/\nFUNCTION hello RETURN VARCHAR2;\n/** Returns a greeting. **/\nEND demo;\n`;\n\nconst md = ploc(plsqlSource, { toc: true });\nconsole.log(md);","lang":"typescript","description":"Converts a PL/SQL source string containing specially commented items into Markdown documentation."},"warnings":[{"fix":"Ensure all documentation comments use the /** ... **/ syntax instead of /* ... */.","message":"Only comments starting with /** and ending with **/ (double asterisks) are recognized. Regular /* ... */ comments are ignored.","severity":"gotcha","affected_versions":">=0.9.1"},{"fix":"Set the `toc` option to `true` or adjust the `tocMinItems` threshold.","message":"Table of contents (TOC) is only generated when the number of documented items exceeds a configurable threshold (default 3).","severity":"gotcha","affected_versions":">=0.9.1"},{"fix":"Use ESM import syntax: `import { ploc } from 'ploc'`.","message":"CommonJS require() is not supported. The package is ESM-only.","severity":"deprecated","affected_versions":">=0.9.0"}],"env_vars":null,"search_vec":"'0.9.1':25 '120':39 'around':38 'autom':72 'code':6,42 'code-to-docu':5 'comment':15,90 'compar':75 'configur':60 'content':64 'convers':57 'convert':9,99 'current':21 'deliber':85 'differenti':52 'doc':81,97 'document':8,19,73,93 'explicit':89 'extract':11,94 'file':20,69 'focus':53 'format':13 'function':46 'generat':17,65,82,98 'integr':67 'javascript':32,95 'key':51 'lightweight':36 'line':40 'markdown':18,100 'marker':91 'minim':59,86 'npm':28 'packag':45 'pl/sql':4,14,80,96 'pl/sql-to-markdown':56 'pldoc':77 'ploc':1,83 'procedur':47 'releas':26 'requir':88 'simpl':3 'sole':54 'special':12 'stabl':22 'support':44,61 'tabl':62 'tool':37 'trigger':50 'type':48 'updat':74 'version':23 'watcher':70 'written':30","created_at":"2026-06-05T17:00:42.988985+00:00","updated_at":"2026-06-05T17:00:42.988985+00:00","problems":[{"fix":"Add \"type\": \"module\" to your package.json or rename the file to .mjs.","cause":"The file is not treated as an ES module (needs \"type\": \"module\" in package.json or .mjs extension).","error":"SyntaxError: Cannot use import statement outside a module"},{"fix":"Use either `import ploc from 'ploc'` or `import { ploc } from 'ploc'`.","cause":"Importing incorrectly: using default import when the package exports named export only (or vice versa).","error":"TypeError: ploc is not a function"},{"fix":"Ensure every /** comment is terminated with **/ (double asterisk slash, not just */).","cause":"A documentation comment (/** ... **/) is not properly closed with **/.","error":"Error: Missing closing **/ for comment starting at line X"},{"fix":"Verify that your PL/SQL code includes at least one supported object with a documentation comment immediately after the signature.","cause":"Source does not contain any recognized PL/SQL objects (PACKAGE, FUNCTION, PROCEDURE, TYPE, TRIGGER) with a following /** comment.","error":"Warning: No PL/SQL items found in source."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/ogobrecht/ploc#readme","github":"https://github.com/ogobrecht/ploc","docs":null,"changelog":null,"pypi":null,"npm":"ploc","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}