@knpkv/confluence-to-markdown 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -0
- package/README.md +58 -14
- package/dist/AdfPlaceholders.d.ts +42 -0
- package/dist/AdfPlaceholders.d.ts.map +1 -0
- package/dist/AdfPlaceholders.js +547 -0
- package/dist/AdfPlaceholders.js.map +1 -0
- package/dist/AdfSchemaValidator.d.ts +37 -0
- package/dist/AdfSchemaValidator.d.ts.map +1 -0
- package/dist/AdfSchemaValidator.js +37 -0
- package/dist/AdfSchemaValidator.js.map +1 -0
- package/dist/AdfWalker.d.ts +39 -0
- package/dist/AdfWalker.d.ts.map +1 -0
- package/dist/AdfWalker.js +527 -0
- package/dist/AdfWalker.js.map +1 -0
- package/dist/AtlaskitTransformers.d.ts +35 -0
- package/dist/AtlaskitTransformers.d.ts.map +1 -0
- package/dist/AtlaskitTransformers.js +48 -0
- package/dist/AtlaskitTransformers.js.map +1 -0
- package/dist/Brand.d.ts +6 -6
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +8 -6
- package/dist/Brand.js.map +1 -1
- package/dist/ConfluenceAuth.d.ts +4 -4
- package/dist/ConfluenceAuth.d.ts.map +1 -1
- package/dist/ConfluenceAuth.js +15 -27
- package/dist/ConfluenceAuth.js.map +1 -1
- package/dist/ConfluenceClient.d.ts +4 -4
- package/dist/ConfluenceClient.d.ts.map +1 -1
- package/dist/ConfluenceClient.js +21 -14
- package/dist/ConfluenceClient.js.map +1 -1
- package/dist/ConfluenceConfig.d.ts +3 -3
- package/dist/ConfluenceConfig.d.ts.map +1 -1
- package/dist/ConfluenceConfig.js +13 -11
- package/dist/ConfluenceConfig.js.map +1 -1
- package/dist/ConfluenceError.d.ts +56 -4
- package/dist/ConfluenceError.d.ts.map +1 -1
- package/dist/ConfluenceError.js +30 -1
- package/dist/ConfluenceError.js.map +1 -1
- package/dist/GitService.d.ts +11 -3
- package/dist/GitService.d.ts.map +1 -1
- package/dist/GitService.js +19 -27
- package/dist/GitService.js.map +1 -1
- package/dist/LocalFileSystem.d.ts +3 -3
- package/dist/LocalFileSystem.d.ts.map +1 -1
- package/dist/LocalFileSystem.js +6 -6
- package/dist/LocalFileSystem.js.map +1 -1
- package/dist/MarkdownConverter.d.ts +16 -65
- package/dist/MarkdownConverter.d.ts.map +1 -1
- package/dist/MarkdownConverter.js +64 -85
- package/dist/MarkdownConverter.js.map +1 -1
- package/dist/Schemas.d.ts +128 -141
- package/dist/Schemas.d.ts.map +1 -1
- package/dist/Schemas.js +21 -23
- package/dist/Schemas.js.map +1 -1
- package/dist/SyncEngine.d.ts +8 -5
- package/dist/SyncEngine.d.ts.map +1 -1
- package/dist/SyncEngine.js +189 -113
- package/dist/SyncEngine.js.map +1 -1
- package/dist/bin.js +23 -35
- package/dist/bin.js.map +1 -1
- package/dist/commands/auth.d.ts +2 -14
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +11 -16
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/clone.d.ts +4 -6
- package/dist/commands/clone.d.ts.map +1 -1
- package/dist/commands/clone.js +34 -32
- package/dist/commands/clone.js.map +1 -1
- package/dist/commands/delete.d.ts +2 -10
- package/dist/commands/delete.d.ts.map +1 -1
- package/dist/commands/delete.js +5 -4
- package/dist/commands/delete.js.map +1 -1
- package/dist/commands/errorHandler.d.ts +2 -1
- package/dist/commands/errorHandler.d.ts.map +1 -1
- package/dist/commands/errorHandler.js +22 -15
- package/dist/commands/errorHandler.js.map +1 -1
- package/dist/commands/fetch.d.ts +27 -0
- package/dist/commands/fetch.d.ts.map +1 -0
- package/dist/commands/fetch.js +48 -0
- package/dist/commands/fetch.js.map +1 -0
- package/dist/commands/git.d.ts +7 -10
- package/dist/commands/git.d.ts.map +1 -1
- package/dist/commands/git.js +6 -6
- package/dist/commands/git.js.map +1 -1
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +1 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/layers.d.ts +10 -9
- package/dist/commands/layers.d.ts.map +1 -1
- package/dist/commands/layers.js +41 -30
- package/dist/commands/layers.js.map +1 -1
- package/dist/commands/new.d.ts +2 -6
- package/dist/commands/new.d.ts.map +1 -1
- package/dist/commands/new.js +5 -4
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/pageInput.d.ts +19 -0
- package/dist/commands/pageInput.d.ts.map +1 -0
- package/dist/commands/pageInput.js +68 -0
- package/dist/commands/pageInput.js.map +1 -0
- package/dist/commands/root.d.ts +8 -0
- package/dist/commands/root.d.ts.map +1 -0
- package/dist/commands/root.js +29 -0
- package/dist/commands/root.js.map +1 -0
- package/dist/commands/sync.d.ts +6 -9
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +5 -6
- package/dist/commands/sync.js.map +1 -1
- package/dist/index.d.ts +3 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -13
- package/dist/index.js.map +1 -1
- package/dist/internal/NodeLayers.d.ts.map +1 -1
- package/dist/internal/NodeLayers.js +1 -2
- package/dist/internal/NodeLayers.js.map +1 -1
- package/dist/internal/adfMetadata.d.ts +30 -0
- package/dist/internal/adfMetadata.d.ts.map +1 -0
- package/dist/internal/adfMetadata.js +126 -0
- package/dist/internal/adfMetadata.js.map +1 -0
- package/dist/internal/cleanMarkdown.d.ts +5 -0
- package/dist/internal/cleanMarkdown.d.ts.map +1 -0
- package/dist/internal/cleanMarkdown.js +13 -0
- package/dist/internal/cleanMarkdown.js.map +1 -0
- package/dist/internal/frontmatter.d.ts.map +1 -1
- package/dist/internal/frontmatter.js +41 -8
- package/dist/internal/frontmatter.js.map +1 -1
- package/dist/internal/gitCommands.d.ts +9 -3
- package/dist/internal/gitCommands.d.ts.map +1 -1
- package/dist/internal/gitCommands.js +18 -9
- package/dist/internal/gitCommands.js.map +1 -1
- package/dist/internal/hashUtils.d.ts +1 -1
- package/dist/internal/hashUtils.d.ts.map +1 -1
- package/dist/internal/hashUtils.js +1 -1
- package/dist/internal/hashUtils.js.map +1 -1
- package/dist/internal/oauthServer.d.ts +10 -5
- package/dist/internal/oauthServer.d.ts.map +1 -1
- package/dist/internal/oauthServer.js +19 -40
- package/dist/internal/oauthServer.js.map +1 -1
- package/dist/internal/pathUtils.d.ts +1 -1
- package/dist/internal/pathUtils.d.ts.map +1 -1
- package/dist/internal/pathUtils.js +1 -1
- package/dist/internal/pathUtils.js.map +1 -1
- package/dist/internal/process.d.ts +15 -0
- package/dist/internal/process.d.ts.map +1 -0
- package/dist/internal/process.js +10 -0
- package/dist/internal/process.js.map +1 -0
- package/dist/internal/stdio.d.ts +6 -0
- package/dist/internal/stdio.d.ts.map +1 -0
- package/dist/internal/stdio.js +15 -0
- package/dist/internal/stdio.js.map +1 -0
- package/dist/internal/tokenStorage.d.ts +3 -13
- package/dist/internal/tokenStorage.d.ts.map +1 -1
- package/dist/internal/tokenStorage.js +26 -24
- package/dist/internal/tokenStorage.js.map +1 -1
- package/dist/internal/userCache.d.ts +1 -1
- package/dist/internal/userCache.d.ts.map +1 -1
- package/dist/internal/userCache.js +1 -1
- package/dist/internal/userCache.js.map +1 -1
- package/package.json +29 -20
- package/skills/confluence/SKILL.md +143 -0
- package/skills/confluence/agents/openai.yaml +4 -0
- package/src/AdfPlaceholders.ts +563 -0
- package/src/AdfSchemaValidator.ts +65 -0
- package/src/AdfWalker.ts +591 -0
- package/src/AtlaskitTransformers.ts +70 -0
- package/src/Brand.ts +11 -16
- package/src/ConfluenceAuth.ts +22 -30
- package/src/ConfluenceClient.ts +28 -24
- package/src/ConfluenceConfig.ts +14 -14
- package/src/ConfluenceError.ts +65 -3
- package/src/GitService.ts +39 -49
- package/src/LocalFileSystem.ts +7 -9
- package/src/MarkdownConverter.ts +108 -143
- package/src/Schemas.ts +17 -16
- package/src/SyncEngine.ts +272 -127
- package/src/atlaskit-adf-schema.d.ts +3 -0
- package/src/bin.ts +30 -56
- package/src/commands/auth.ts +21 -18
- package/src/commands/clone.ts +46 -38
- package/src/commands/delete.ts +5 -4
- package/src/commands/errorHandler.ts +25 -18
- package/src/commands/fetch.ts +90 -0
- package/src/commands/git.ts +6 -6
- package/src/commands/index.ts +1 -0
- package/src/commands/layers.ts +64 -37
- package/src/commands/new.ts +5 -4
- package/src/commands/pageInput.ts +103 -0
- package/src/commands/root.ts +59 -0
- package/src/commands/sync.ts +7 -6
- package/src/index.ts +3 -18
- package/src/internal/NodeLayers.ts +1 -2
- package/src/internal/adfMetadata.ts +145 -0
- package/src/internal/cleanMarkdown.ts +15 -0
- package/src/internal/frontmatter.ts +45 -8
- package/src/internal/gitCommands.ts +23 -17
- package/src/internal/hashUtils.ts +2 -2
- package/src/internal/oauthServer.ts +84 -105
- package/src/internal/pathUtils.ts +1 -1
- package/src/internal/process.ts +15 -0
- package/src/internal/stdio.ts +22 -0
- package/src/internal/tokenStorage.ts +39 -29
- package/src/internal/userCache.ts +2 -2
- package/test/AdfPlaceholders.test.ts +508 -0
- package/test/AdfSchemaValidator.test.ts +34 -0
- package/test/AdfWalker.test.ts +676 -0
- package/test/AtlaskitTransformers.test.ts +25 -0
- package/test/Brand.test.ts +11 -11
- package/test/GitService.test.ts +6 -2
- package/test/MarkdownConverter.test.ts +121 -105
- package/test/RoundTrip.test.ts +521 -0
- package/test/Schemas.test.ts +40 -40
- package/test/adfMetadata.test.ts +110 -0
- package/test/cleanMarkdown.test.ts +36 -0
- package/test/commandHarness.test.ts +79 -0
- package/test/commandHarness.ts +147 -0
- package/test/fetch.test.ts +61 -0
- package/test/frontmatter.test.ts +41 -0
- package/test/integration.test.ts +569 -156
- package/test/layers.test.ts +12 -0
- package/test/oauthServer.test.ts +4 -5
- package/test/pageInput.test.ts +83 -0
- package/test/tokenStorage.test.ts +17 -17
- package/dist/SchemaConverterError.d.ts +0 -108
- package/dist/SchemaConverterError.d.ts.map +0 -1
- package/dist/SchemaConverterError.js +0 -84
- package/dist/SchemaConverterError.js.map +0 -1
- package/dist/ast/BlockNode.d.ts +0 -453
- package/dist/ast/BlockNode.d.ts.map +0 -1
- package/dist/ast/BlockNode.js +0 -310
- package/dist/ast/BlockNode.js.map +0 -1
- package/dist/ast/Document.d.ts +0 -216
- package/dist/ast/Document.d.ts.map +0 -1
- package/dist/ast/Document.js +0 -69
- package/dist/ast/Document.js.map +0 -1
- package/dist/ast/InlineNode.d.ts +0 -477
- package/dist/ast/InlineNode.d.ts.map +0 -1
- package/dist/ast/InlineNode.js +0 -263
- package/dist/ast/InlineNode.js.map +0 -1
- package/dist/ast/MacroNode.d.ts +0 -267
- package/dist/ast/MacroNode.d.ts.map +0 -1
- package/dist/ast/MacroNode.js +0 -164
- package/dist/ast/MacroNode.js.map +0 -1
- package/dist/ast/index.d.ts +0 -10
- package/dist/ast/index.d.ts.map +0 -1
- package/dist/ast/index.js +0 -14
- package/dist/ast/index.js.map +0 -1
- package/dist/parsers/ConfluenceParser.d.ts +0 -26
- package/dist/parsers/ConfluenceParser.d.ts.map +0 -1
- package/dist/parsers/ConfluenceParser.js +0 -797
- package/dist/parsers/ConfluenceParser.js.map +0 -1
- package/dist/parsers/MarkdownParser.d.ts +0 -26
- package/dist/parsers/MarkdownParser.d.ts.map +0 -1
- package/dist/parsers/MarkdownParser.js +0 -982
- package/dist/parsers/MarkdownParser.js.map +0 -1
- package/dist/parsers/index.d.ts +0 -8
- package/dist/parsers/index.d.ts.map +0 -1
- package/dist/parsers/index.js +0 -8
- package/dist/parsers/index.js.map +0 -1
- package/dist/schemas/ConfluenceSchema.d.ts +0 -21
- package/dist/schemas/ConfluenceSchema.d.ts.map +0 -1
- package/dist/schemas/ConfluenceSchema.js +0 -38
- package/dist/schemas/ConfluenceSchema.js.map +0 -1
- package/dist/schemas/ConversionSchema.d.ts +0 -35
- package/dist/schemas/ConversionSchema.d.ts.map +0 -1
- package/dist/schemas/ConversionSchema.js +0 -208
- package/dist/schemas/ConversionSchema.js.map +0 -1
- package/dist/schemas/MarkdownSchema.d.ts +0 -21
- package/dist/schemas/MarkdownSchema.d.ts.map +0 -1
- package/dist/schemas/MarkdownSchema.js +0 -38
- package/dist/schemas/MarkdownSchema.js.map +0 -1
- package/dist/schemas/hast/HastFromHtml.d.ts +0 -27
- package/dist/schemas/hast/HastFromHtml.d.ts.map +0 -1
- package/dist/schemas/hast/HastFromHtml.js +0 -107
- package/dist/schemas/hast/HastFromHtml.js.map +0 -1
- package/dist/schemas/hast/HastSchema.d.ts +0 -195
- package/dist/schemas/hast/HastSchema.d.ts.map +0 -1
- package/dist/schemas/hast/HastSchema.js +0 -183
- package/dist/schemas/hast/HastSchema.js.map +0 -1
- package/dist/schemas/hast/index.d.ts +0 -9
- package/dist/schemas/hast/index.d.ts.map +0 -1
- package/dist/schemas/hast/index.js +0 -3
- package/dist/schemas/hast/index.js.map +0 -1
- package/dist/schemas/index.d.ts +0 -14
- package/dist/schemas/index.d.ts.map +0 -1
- package/dist/schemas/index.js +0 -16
- package/dist/schemas/index.js.map +0 -1
- package/dist/schemas/mdast/MdastFromMarkdown.d.ts +0 -30
- package/dist/schemas/mdast/MdastFromMarkdown.d.ts.map +0 -1
- package/dist/schemas/mdast/MdastFromMarkdown.js +0 -79
- package/dist/schemas/mdast/MdastFromMarkdown.js.map +0 -1
- package/dist/schemas/mdast/MdastSchema.d.ts +0 -385
- package/dist/schemas/mdast/MdastSchema.d.ts.map +0 -1
- package/dist/schemas/mdast/MdastSchema.js +0 -266
- package/dist/schemas/mdast/MdastSchema.js.map +0 -1
- package/dist/schemas/mdast/index.d.ts +0 -10
- package/dist/schemas/mdast/index.d.ts.map +0 -1
- package/dist/schemas/mdast/index.js +0 -4
- package/dist/schemas/mdast/index.js.map +0 -1
- package/dist/schemas/mdast/mdastToString.d.ts +0 -13
- package/dist/schemas/mdast/mdastToString.d.ts.map +0 -1
- package/dist/schemas/mdast/mdastToString.js +0 -85
- package/dist/schemas/mdast/mdastToString.js.map +0 -1
- package/dist/schemas/nodes/block/BlockSchema.d.ts +0 -43
- package/dist/schemas/nodes/block/BlockSchema.d.ts.map +0 -1
- package/dist/schemas/nodes/block/BlockSchema.js +0 -634
- package/dist/schemas/nodes/block/BlockSchema.js.map +0 -1
- package/dist/schemas/nodes/block/index.d.ts +0 -7
- package/dist/schemas/nodes/block/index.d.ts.map +0 -1
- package/dist/schemas/nodes/block/index.js +0 -7
- package/dist/schemas/nodes/block/index.js.map +0 -1
- package/dist/schemas/nodes/index.d.ts +0 -9
- package/dist/schemas/nodes/index.d.ts.map +0 -1
- package/dist/schemas/nodes/index.js +0 -12
- package/dist/schemas/nodes/index.js.map +0 -1
- package/dist/schemas/nodes/inline/InlineSchema.d.ts +0 -48
- package/dist/schemas/nodes/inline/InlineSchema.d.ts.map +0 -1
- package/dist/schemas/nodes/inline/InlineSchema.js +0 -436
- package/dist/schemas/nodes/inline/InlineSchema.js.map +0 -1
- package/dist/schemas/nodes/inline/index.d.ts +0 -7
- package/dist/schemas/nodes/inline/index.d.ts.map +0 -1
- package/dist/schemas/nodes/inline/index.js +0 -7
- package/dist/schemas/nodes/inline/index.js.map +0 -1
- package/dist/schemas/nodes/macro/MacroSchema.d.ts +0 -27
- package/dist/schemas/nodes/macro/MacroSchema.d.ts.map +0 -1
- package/dist/schemas/nodes/macro/MacroSchema.js +0 -162
- package/dist/schemas/nodes/macro/MacroSchema.js.map +0 -1
- package/dist/schemas/nodes/macro/index.d.ts +0 -7
- package/dist/schemas/nodes/macro/index.d.ts.map +0 -1
- package/dist/schemas/nodes/macro/index.js +0 -7
- package/dist/schemas/nodes/macro/index.js.map +0 -1
- package/dist/schemas/preprocessing/ConfluencePreprocessor.d.ts +0 -24
- package/dist/schemas/preprocessing/ConfluencePreprocessor.d.ts.map +0 -1
- package/dist/schemas/preprocessing/ConfluencePreprocessor.js +0 -359
- package/dist/schemas/preprocessing/ConfluencePreprocessor.js.map +0 -1
- package/dist/schemas/preprocessing/index.d.ts +0 -8
- package/dist/schemas/preprocessing/index.d.ts.map +0 -1
- package/dist/schemas/preprocessing/index.js +0 -2
- package/dist/schemas/preprocessing/index.js.map +0 -1
- package/dist/serializers/ConfluenceSerializer.d.ts +0 -30
- package/dist/serializers/ConfluenceSerializer.d.ts.map +0 -1
- package/dist/serializers/ConfluenceSerializer.js +0 -560
- package/dist/serializers/ConfluenceSerializer.js.map +0 -1
- package/dist/serializers/MarkdownSerializer.d.ts +0 -34
- package/dist/serializers/MarkdownSerializer.d.ts.map +0 -1
- package/dist/serializers/MarkdownSerializer.js +0 -395
- package/dist/serializers/MarkdownSerializer.js.map +0 -1
- package/dist/serializers/index.d.ts +0 -8
- package/dist/serializers/index.d.ts.map +0 -1
- package/dist/serializers/index.js +0 -8
- package/dist/serializers/index.js.map +0 -1
- package/src/SchemaConverterError.ts +0 -108
- package/src/ast/BlockNode.ts +0 -469
- package/src/ast/Document.ts +0 -90
- package/src/ast/InlineNode.ts +0 -323
- package/src/ast/MacroNode.ts +0 -245
- package/src/ast/index.ts +0 -83
- package/src/parsers/ConfluenceParser.ts +0 -956
- package/src/parsers/MarkdownParser.ts +0 -1338
- package/src/parsers/index.ts +0 -8
- package/src/schemas/ConfluenceSchema.ts +0 -56
- package/src/schemas/ConversionSchema.ts +0 -318
- package/src/schemas/MarkdownSchema.ts +0 -56
- package/src/schemas/hast/HastFromHtml.ts +0 -153
- package/src/schemas/hast/HastSchema.ts +0 -274
- package/src/schemas/hast/index.ts +0 -35
- package/src/schemas/index.ts +0 -20
- package/src/schemas/mdast/MdastFromMarkdown.ts +0 -118
- package/src/schemas/mdast/MdastSchema.ts +0 -566
- package/src/schemas/mdast/index.ts +0 -59
- package/src/schemas/mdast/mdastToString.ts +0 -102
- package/src/schemas/nodes/block/BlockSchema.ts +0 -773
- package/src/schemas/nodes/block/index.ts +0 -13
- package/src/schemas/nodes/index.ts +0 -20
- package/src/schemas/nodes/inline/InlineSchema.ts +0 -523
- package/src/schemas/nodes/inline/index.ts +0 -14
- package/src/schemas/nodes/macro/MacroSchema.ts +0 -226
- package/src/schemas/nodes/macro/index.ts +0 -6
- package/src/schemas/preprocessing/ConfluencePreprocessor.ts +0 -455
- package/src/schemas/preprocessing/index.ts +0 -8
- package/src/serializers/ConfluenceSerializer.ts +0 -737
- package/src/serializers/MarkdownSerializer.ts +0 -543
- package/src/serializers/index.ts +0 -8
- package/test/ast/BlockNode.test.ts +0 -265
- package/test/ast/Document.test.ts +0 -126
- package/test/ast/InlineNode.test.ts +0 -161
- package/test/fixtures/integration-test.html.fixture +0 -103
- package/test/fixtures/integration-test.md.expected +0 -257
- package/test/parsers/ConfluenceParser.test.ts +0 -452
- package/test/schemas/ConfluencePreprocessor.test.ts +0 -180
- package/test/schemas/ConversionSchema.test.ts +0 -159
- package/test/schemas/HastSchema.test.ts +0 -138
- package/test/schemas/MdastSchema.test.ts +0 -145
- package/test/schemas/nodes/block/BlockSchema.test.ts +0 -173
- package/test/schemas/nodes/inline/InlineSchema.test.ts +0 -198
- package/test/schemas/nodes/macro/MacroSchema.test.ts +0 -142
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
# @knpkv/confluence-to-markdown
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#81](https://github.com/knpkv/npm/pull/81) [`19c1538`](https://github.com/knpkv/npm/commit/19c153835bc198b9e407a013c16775c3fb7eb357) Thanks [@konopkov](https://github.com/konopkov)! - Ship agent skills alongside each CLI package and add an installer package plus per-CLI `skills install` commands for Codex and Claude.
|
|
8
|
+
|
|
9
|
+
- [#85](https://github.com/knpkv/npm/pull/85) [`f01d83a`](https://github.com/knpkv/npm/commit/f01d83a091a13808b36aadfd45989240da537e8f) Thanks [@konopkov](https://github.com/konopkov)! - Add `confluence fetch` for printing the latest page markdown without creating a git workspace, support `--url` page parsing for `fetch` and `clone`, and add opt-in `--clean-markdown` output that strips Confluence round-trip metadata comments.
|
|
10
|
+
|
|
11
|
+
- [#71](https://github.com/knpkv/npm/pull/71) [`e3c3805`](https://github.com/knpkv/npm/commit/e3c3805ee527a6edb69ed91977c95c586b563ff9) Thanks [@konopkov](https://github.com/konopkov)! - Migrate the package workspace to Effect v4 beta.
|
|
12
|
+
|
|
13
|
+
This updates runtime and peer dependencies to the Effect v4 beta module layout,
|
|
14
|
+
adopts Effect platform/runtime services for Node process, HTTP, filesystem, and
|
|
15
|
+
clock access, and refreshes package export metadata to point published type
|
|
16
|
+
entries at emitted `dist/*.d.ts` declarations.
|
|
17
|
+
|
|
18
|
+
CodeCommit packages now use Effect v4-compatible AWS and cache layers, including
|
|
19
|
+
typed `distilled-aws` context services, shared cached-comment decoding, and
|
|
20
|
+
schema-derived config defaults. Jira and Confluence OAuth callback servers bind
|
|
21
|
+
the expected local callback port range again under the Effect v4 Node HTTP
|
|
22
|
+
server layer.
|
|
23
|
+
|
|
24
|
+
The retired Claude AI packages have been removed from the workspace.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- [#72](https://github.com/knpkv/npm/pull/72) [`0e1c5ea`](https://github.com/knpkv/npm/commit/0e1c5eaf6d48c43e6591b6b6260dbfbf6bfb810b) Thanks [@konopkov](https://github.com/konopkov)! - Preserve Confluence-native ADF elements through markdown sync by storing decoded
|
|
29
|
+
placeholder metadata in per-page `.adf.json` sidecars and hydrating those refs
|
|
30
|
+
before push.
|
|
31
|
+
|
|
32
|
+
The integration test now requires API auth for raw ADF verification, asserts the
|
|
33
|
+
sidecar file contract, and checks native node and mark metadata across the
|
|
34
|
+
create/update/reclone cycle.
|
|
35
|
+
|
|
36
|
+
- [#78](https://github.com/knpkv/npm/pull/78) [`b833841`](https://github.com/knpkv/npm/commit/b8338412b2352188a8505e4ee46ccd3f86a6b58f) Thanks [@konopkov](https://github.com/konopkov)! - Externalize base64-encoded ADF placeholder metadata into `.adf.json` sidecars
|
|
37
|
+
when pulling Confluence macros and native nodes.
|
|
38
|
+
- Updated dependencies [[`c697d3c`](https://github.com/knpkv/npm/commit/c697d3c4ab779f14f017d3ec8fc8d1bffa1493b5), [`19c1538`](https://github.com/knpkv/npm/commit/19c153835bc198b9e407a013c16775c3fb7eb357), [`e3c3805`](https://github.com/knpkv/npm/commit/e3c3805ee527a6edb69ed91977c95c586b563ff9)]:
|
|
39
|
+
- @knpkv/agent-skills@0.2.0
|
|
40
|
+
- @knpkv/confluence-api-client@0.3.0
|
|
41
|
+
|
|
42
|
+
## 0.6.0
|
|
43
|
+
|
|
44
|
+
### Minor Changes
|
|
45
|
+
|
|
46
|
+
- [#67](https://github.com/knpkv/npm/pull/67) [`10a1cc0`](https://github.com/knpkv/npm/commit/10a1cc068e907b4d2fb7e176cc834a0c8cddef3b) Thanks @konopkov! - Switch wire format from Confluence storage format to Atlassian Document
|
|
47
|
+
Format (ADF). Push (markdown → ADF) is now handled by the official
|
|
48
|
+
`@atlaskit/editor-markdown-transformer` + `@atlaskit/editor-json-transformer`;
|
|
49
|
+
pull (ADF → markdown) by an in-package tree walker typed against
|
|
50
|
+
`@atlaskit/adf-schema`. The bespoke storage-format parsers and serializers
|
|
51
|
+
(~140 KB) are removed. CLI behavior is unchanged. When `saveSource` is
|
|
52
|
+
enabled, the `.source` companion file is now `<page>.source.json` instead of
|
|
53
|
+
`<page>.html`; existing companion `.html` files are harmless and can be
|
|
54
|
+
deleted.
|
|
55
|
+
|
|
56
|
+
Confluence macros now survive a pull → edit → push round-trip: extension
|
|
57
|
+
placeholders carry the macro's full attrs (parameters, layout, localId) as a
|
|
58
|
+
base64 blob, and a bodied macro's body is re-attached from the blocks between
|
|
59
|
+
its `<!-- adf:bodiedExtension … -->` / `<!-- adf:/bodiedExtension -->`
|
|
60
|
+
markers. Constructs that still degrade on push (panels, task lists, dates,
|
|
61
|
+
emojis, expand sections, inline cards, media captions) are documented under
|
|
62
|
+
"Known fidelity limitations" in the README.
|
|
63
|
+
|
|
3
64
|
## 0.5.0
|
|
4
65
|
|
|
5
66
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -18,6 +18,12 @@ npm install @knpkv/confluence-to-markdown effect
|
|
|
18
18
|
```bash
|
|
19
19
|
# Clone pages with full version history
|
|
20
20
|
confluence clone --root-page-id <ID> --base-url <URL>
|
|
21
|
+
confluence clone --url <PAGE_URL>
|
|
22
|
+
|
|
23
|
+
# Fetch one latest page to stdout without creating a git workspace
|
|
24
|
+
confluence fetch --page-id <ID> --base-url <URL>
|
|
25
|
+
confluence fetch --url <PAGE_URL>
|
|
26
|
+
confluence fetch --url <PAGE_URL> --clean-markdown
|
|
21
27
|
|
|
22
28
|
# Pull pages from Confluence
|
|
23
29
|
confluence pull
|
|
@@ -102,10 +108,48 @@ confluence diff --commit HEAD~1 # compare with commit
|
|
|
102
108
|
## How It Works
|
|
103
109
|
|
|
104
110
|
1. `confluence clone` creates `.confluence/` directory, initializes git, and pulls pages with full version history
|
|
105
|
-
2. `confluence
|
|
106
|
-
3. `confluence pull
|
|
107
|
-
4.
|
|
108
|
-
5.
|
|
111
|
+
2. `confluence fetch` prints the latest markdown for one page without creating `.confluence/` or git commits
|
|
112
|
+
3. `confluence pull` downloads pages and auto-commits changes
|
|
113
|
+
4. `confluence pull --replay-history` replays each Confluence version as a separate git commit with original author/date
|
|
114
|
+
5. Version messages from Confluence are preserved in markdown front-matter
|
|
115
|
+
6. Use standard git commands in `.confluence/` for advanced operations
|
|
116
|
+
|
|
117
|
+
`clone` and `fetch` accept full page URLs via `--url`, including Confluence paths such as
|
|
118
|
+
`https://yoursite.atlassian.net/wiki/spaces/DEV/pages/123456/Page+Title` and shorthand numeric paths such as
|
|
119
|
+
`https://yoursite.atlassian.com/123456`.
|
|
120
|
+
|
|
121
|
+
`confluence fetch --clean-markdown` removes Confluence round-trip metadata comments such as `<!-- adf:... -->`
|
|
122
|
+
from the printed output. This is intended for readable exports and is not suitable for editing and pushing back to
|
|
123
|
+
Confluence.
|
|
124
|
+
|
|
125
|
+
### Conversion pipeline
|
|
126
|
+
|
|
127
|
+
This package talks to Confluence Cloud in **Atlassian Document Format (ADF)**:
|
|
128
|
+
|
|
129
|
+
- **Push (markdown → ADF)** delegates to the official `@atlaskit/editor-markdown-transformer` and `@atlaskit/editor-json-transformer`. Atlassian's own libraries author the JSON we send back to Confluence.
|
|
130
|
+
- **Pull (ADF → markdown)** uses an in-package tree walker (`AdfWalker`). The walker covers paragraphs, headings, lists, code blocks, tables, panels, task and decision lists, mentions, emojis, status, dates, expand sections, inline cards, and native Table of Contents macro syntax. Lossy marks (`underline`, `textColor`, `backgroundColor`, `subsup`) fall back to inline HTML; unknown nodes degrade to a placeholder comment plus a logged warning.
|
|
131
|
+
- Both directions validate against the canonical `@atlaskit/adf-schema` JSON Schema, so library bugs and remote drift surface as structured errors instead of silent corruption.
|
|
132
|
+
|
|
133
|
+
When `saveSource` is enabled, the raw ADF JSON is persisted as `<page>.source.json` (pretty-printed) alongside the markdown.
|
|
134
|
+
|
|
135
|
+
#### Known fidelity limitations
|
|
136
|
+
|
|
137
|
+
Nodes that survive a pull → edit → push round-trip structurally intact: status (unless its text contains `<`), mentions (with an accountId), native Table of Contents syntax (`[[toc]]`, `[[toc:min=2,max=4]]`), and macros (`extension` / `bodiedExtension` / `inlineExtension` — the placeholder comment carries the full macro attrs, including `parameters`, as a base64 blob, and a bodied macro's body is re-attached from the blocks between its `<!-- adf:bodiedExtension … -->` / `<!-- adf:/bodiedExtension -->` markers; a bodied macro inside a table cell keeps only the marker, its body is dropped). TOC macros with unrepresentable attrs such as `localId` or `layout` keep using the exact placeholder form instead of readable syntax. Everything below does **not** fully survive:
|
|
138
|
+
|
|
139
|
+
- **Attachment media.** Pages with images or other attachments use ADF `mediaSingle` / `mediaInline` nodes that reference attachments by `id` + `collection`. Resolving these to download URLs requires a separate Confluence API call per attachment, which this package does not yet make. Such nodes are currently emitted as `<!-- adf:media id=… -->` placeholders plus a logged `MediaWithoutUrl` warning. A media-resolver hook is on the roadmap.
|
|
140
|
+
- **Media captions.** A `mediaSingle` caption is rendered as an italic line under the media on pull, but pushes back as plain italic text — the structured `caption` node is lost.
|
|
141
|
+
- **Link titles.** The official `@atlaskit/editor-markdown-transformer` does not retain link titles when parsing markdown, so `[text](url "title")` round-trips back as `[text](url)`.
|
|
142
|
+
- **Table cell merges.** `colspan`/`rowspan` are flattened — GFM tables have no merged cells.
|
|
143
|
+
|
|
144
|
+
The pull side logs warnings for unknown node types, lossy marks, macro placeholders, and unresolvable media or inline cards.
|
|
145
|
+
|
|
146
|
+
#### Migrating from earlier versions
|
|
147
|
+
|
|
148
|
+
Prior versions of this package wrote a `<page>.html` companion file when `saveSource` was enabled; the current version writes `<page>.source.json` instead. Existing `.html` files are harmless and can be removed manually:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
find .confluence/docs -name "*.html" -delete
|
|
152
|
+
```
|
|
109
153
|
|
|
110
154
|
## Git Implementation
|
|
111
155
|
|
|
@@ -144,7 +188,7 @@ Note: Front-matter (`contentHash`, `version`) is **not** updated at commit time.
|
|
|
144
188
|
When you push:
|
|
145
189
|
|
|
146
190
|
1. **Detect changes**: Compares content hash vs stored `contentHash` in front-matter
|
|
147
|
-
2. **Push to Confluence**:
|
|
191
|
+
2. **Push to Confluence**: Converts markdown to Atlassian Document Format (ADF) via the official `@atlaskit/editor-markdown-transformer` + `@atlaskit/editor-json-transformer`, validated against `@atlaskit/adf-schema`
|
|
148
192
|
3. **Fetch canonical content**: Downloads what Confluence actually stored (may differ slightly)
|
|
149
193
|
4. **Amend commit**: Updates local file with canonical content so future clones match exactly
|
|
150
194
|
5. **Update tracking branch**: Moves `origin/confluence` to HEAD
|
|
@@ -250,15 +294,15 @@ This creates `.confluence/config.json` in your project root:
|
|
|
250
294
|
|
|
251
295
|
### Configuration Options
|
|
252
296
|
|
|
253
|
-
| Option | Description
|
|
254
|
-
| ----------------- |
|
|
255
|
-
| `rootPageId` | Confluence page ID to sync from
|
|
256
|
-
| `baseUrl` | Confluence Cloud URL
|
|
257
|
-
| `spaceKey` | Optional space key
|
|
258
|
-
| `docsPath` | Local path for markdown files
|
|
259
|
-
| `excludePatterns` | Glob patterns to exclude
|
|
260
|
-
| `saveSource` | Save
|
|
261
|
-
| `trackedPaths` | Glob patterns for git tracking
|
|
297
|
+
| Option | Description | Default |
|
|
298
|
+
| ----------------- | ----------------------------------------------------------- | ------------------ |
|
|
299
|
+
| `rootPageId` | Confluence page ID to sync from | Required |
|
|
300
|
+
| `baseUrl` | Confluence Cloud URL | Required |
|
|
301
|
+
| `spaceKey` | Optional space key | - |
|
|
302
|
+
| `docsPath` | Local path for markdown files | `.confluence/docs` |
|
|
303
|
+
| `excludePatterns` | Glob patterns to exclude | `[]` |
|
|
304
|
+
| `saveSource` | Save raw ADF JSON alongside markdown (`<page>.source.json`) | `false` |
|
|
305
|
+
| `trackedPaths` | Glob patterns for git tracking | `["**/*.md"]` |
|
|
262
306
|
|
|
263
307
|
## Directory Structure
|
|
264
308
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reverse the AdfWalker's placeholder syntax back into proper ADF nodes
|
|
3
|
+
* after the @atlaskit markdown transformer has run.
|
|
4
|
+
*
|
|
5
|
+
* The walker emits Confluence-only nodes (status, extension, inlineExtension)
|
|
6
|
+
* as HTML/comment placeholders so they survive a pull. The markdown transformer
|
|
7
|
+
* has no concept of these nodes, so on push it parses the placeholders as
|
|
8
|
+
* plain text — Confluence then renders the literal HTML/comment. This module
|
|
9
|
+
* walks the produced ADF and rewrites those text patterns into the structured
|
|
10
|
+
* nodes the editor expects.
|
|
11
|
+
*
|
|
12
|
+
* Patterns recognized (must match the AdfWalker emission exactly):
|
|
13
|
+
* - `<span class="adf-status" data-color="COLOR">TEXT</span>`
|
|
14
|
+
* - `<!-- adf:extension key=KEY type=TYPE attrs=BASE64 -->` (block, when
|
|
15
|
+
* the whole paragraph is just this comment; `attrs` is base64 JSON of
|
|
16
|
+
* the node's full attrs — parameters, localId, layout — and wins over
|
|
17
|
+
* the readable key/type parts; key/type-only is the legacy form)
|
|
18
|
+
* - `<!-- adf:paragraph marks=BASE64 --> BODY <!-- adf:/paragraph -->`
|
|
19
|
+
* (the body paragraph regains its paragraph-level marks)
|
|
20
|
+
* - `<!-- adf:bodiedExtension … --> BODY <!-- adf:/bodiedExtension -->`
|
|
21
|
+
* (the sibling blocks between the markers become the extension's body)
|
|
22
|
+
* - `<!-- adf:inlineCard attrs=BASE64 -->` (inline)
|
|
23
|
+
* - `<!-- adf:inlineExtension key=KEY type=TYPE attrs=BASE64 -->` (inline)
|
|
24
|
+
* - `<!-- adf:date node=BASE64 -->` and `<!-- adf:emoji node=BASE64 -->`
|
|
25
|
+
* (inline)
|
|
26
|
+
* - `<!-- adf:panel type=TYPE attrs=BASE64 --> BODY <!-- adf:/panel -->`
|
|
27
|
+
* (the sibling blocks between the markers become the panel's body)
|
|
28
|
+
* - `<!-- adf:TYPE node=BASE64 --> BODY <!-- adf:/TYPE -->` for selected
|
|
29
|
+
* native block nodes such as task/decision lists, expands, layouts,
|
|
30
|
+
* cards, and tables
|
|
31
|
+
* - `<u>TEXT</u>`, `<sub>TEXT</sub>`, `<sup>TEXT</sup>`, and exact styled
|
|
32
|
+
* spans emitted for Confluence-only inline marks
|
|
33
|
+
* - `[@Name](confluence-mention://ACCOUNT_ID)` (link mark with a
|
|
34
|
+
* custom scheme — the only way to round-trip mention accountIds)
|
|
35
|
+
* - `[[toc]]`, `[[toc:min=1,max=3]]` (block-level native syntax for the
|
|
36
|
+
* Confluence Table of Contents macro)
|
|
37
|
+
*
|
|
38
|
+
* @module
|
|
39
|
+
*/
|
|
40
|
+
/** Walk the document tree and rewrite placeholder text into proper ADF nodes. */
|
|
41
|
+
export declare const revertPlaceholders: (doc: unknown) => unknown;
|
|
42
|
+
//# sourceMappingURL=AdfPlaceholders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdfPlaceholders.d.ts","sourceRoot":"","sources":["../src/AdfPlaceholders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AA2gBH,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,GAAI,KAAK,OAAO,KAAG,OAAoC,CAAA"}
|