polen 0.10.0 → 0.11.0-next.2
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/build/api/api.d.ts +1 -0
- package/build/api/api.d.ts.map +1 -1
- package/build/api/api.js +1 -0
- package/build/api/api.js.map +1 -1
- package/build/api/config/configurator.d.ts +20 -22
- package/build/api/config/configurator.d.ts.map +1 -1
- package/build/api/config/configurator.js +27 -9
- package/build/api/config/configurator.js.map +1 -1
- package/build/api/config/merge.d.ts.map +1 -1
- package/build/api/config/merge.js +0 -11
- package/build/api/config/merge.js.map +1 -1
- package/build/api/content/metadata.d.ts +8 -2
- package/build/api/content/metadata.d.ts.map +1 -1
- package/build/api/content/metadata.js +1 -1
- package/build/api/content/metadata.js.map +1 -1
- package/build/api/schema/data-sources/memory/memory.d.ts +2 -2
- package/build/api/schema/data-sources/memory/memory.d.ts.map +1 -1
- package/build/api/schema/data-sources/memory/memory.js +1 -3
- package/build/api/schema/data-sources/memory/memory.js.map +1 -1
- package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.d.ts +7 -3
- package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.d.ts.map +1 -1
- package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.js +15 -11
- package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.js.map +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.d.ts +16 -7
- package/build/api/schema/data-sources/schema-directory/schema-directory.d.ts.map +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.js +26 -7
- package/build/api/schema/data-sources/schema-directory/schema-directory.js.map +1 -1
- package/build/api/schema/data-sources/schema-file/schema-file.d.ts +7 -2
- package/build/api/schema/data-sources/schema-file/schema-file.d.ts.map +1 -1
- package/build/api/schema/data-sources/schema-file/schema-file.js +13 -5
- package/build/api/schema/data-sources/schema-file/schema-file.js.map +1 -1
- package/build/api/schema/metadata.d.ts +16 -0
- package/build/api/schema/metadata.d.ts.map +1 -0
- package/build/api/schema/metadata.js +19 -0
- package/build/api/schema/metadata.js.map +1 -0
- package/build/api/schema/read.d.ts +3 -3
- package/build/api/schema/read.d.ts.map +1 -1
- package/build/api/schema/read.js.map +1 -1
- package/build/api/schema/schema.d.ts +33 -2
- package/build/api/schema/schema.d.ts.map +1 -1
- package/build/api/schema/schema.js +42 -0
- package/build/api/schema/schema.js.map +1 -1
- package/build/api/schema-source/index.d.ts +2 -0
- package/build/api/schema-source/index.d.ts.map +1 -0
- package/build/api/schema-source/index.js +2 -0
- package/build/api/schema-source/index.js.map +1 -0
- package/build/api/schema-source/schema-source.d.ts +33 -0
- package/build/api/schema-source/schema-source.d.ts.map +1 -0
- package/build/api/schema-source/schema-source.js +137 -0
- package/build/api/schema-source/schema-source.js.map +1 -0
- package/build/api/static/manifest.d.ts +1 -2
- package/build/api/static/manifest.d.ts.map +1 -1
- package/build/api/static/manifest.js +1 -1
- package/build/api/static/manifest.js.map +1 -1
- package/build/api/vite/plugins/core.d.ts +1 -0
- package/build/api/vite/plugins/core.d.ts.map +1 -1
- package/build/api/vite/plugins/core.js +21 -18
- package/build/api/vite/plugins/core.js.map +1 -1
- package/build/api/vite/plugins/main.d.ts.map +1 -1
- package/build/api/vite/plugins/main.js +1 -8
- package/build/api/vite/plugins/main.js.map +1 -1
- package/build/api/vite/plugins/schema-assets.d.ts +22 -0
- package/build/api/vite/plugins/schema-assets.d.ts.map +1 -0
- package/build/api/vite/plugins/schema-assets.js +269 -0
- package/build/api/vite/plugins/schema-assets.js.map +1 -0
- package/build/api/vite/plugins/serve.d.ts.map +1 -1
- package/build/api/vite/plugins/serve.js +11 -0
- package/build/api/vite/plugins/serve.js.map +1 -1
- package/build/lib/graphql-change/change-groups.d.ts +2 -0
- package/build/lib/graphql-change/change-groups.d.ts.map +1 -1
- package/build/lib/graphql-change/change-groups.js +54 -0
- package/build/lib/graphql-change/change-groups.js.map +1 -1
- package/build/lib/kit-temp.d.ts +9 -0
- package/build/lib/kit-temp.d.ts.map +1 -1
- package/build/lib/kit-temp.js +12 -0
- package/build/lib/kit-temp.js.map +1 -1
- package/build/lib/path-map/path-map.d.ts.map +1 -1
- package/build/lib/path-map/path-map.js +3 -1
- package/build/lib/path-map/path-map.js.map +1 -1
- package/build/project-data.d.ts +3 -11
- package/build/project-data.d.ts.map +1 -1
- package/build/template/components/Changelog.d.ts +3 -3
- package/build/template/components/Changelog.d.ts.map +1 -1
- package/build/template/components/Changelog.js +8 -84
- package/build/template/components/Changelog.js.map +1 -1
- package/build/template/components/CodeBlock.d.ts +2 -0
- package/build/template/components/CodeBlock.d.ts.map +1 -1
- package/build/template/components/CodeBlock.js +1 -4
- package/build/template/components/CodeBlock.js.map +1 -1
- package/build/template/components/ComponentDispatch.d.ts +34 -0
- package/build/template/components/ComponentDispatch.d.ts.map +1 -0
- package/build/template/components/ComponentDispatch.js +33 -0
- package/build/template/components/ComponentDispatch.js.map +1 -0
- package/build/template/components/ReferenceLink.d.ts +19 -0
- package/build/template/components/ReferenceLink.d.ts.map +1 -0
- package/build/template/components/ReferenceLink.js +19 -0
- package/build/template/components/ReferenceLink.js.map +1 -0
- package/build/template/components/TypeAnnotation.d.ts.map +1 -1
- package/build/template/components/TypeAnnotation.js +3 -3
- package/build/template/components/TypeAnnotation.js.map +1 -1
- package/build/template/components/TypeFieldsLinkList.d.ts.map +1 -1
- package/build/template/components/TypeFieldsLinkList.js +4 -4
- package/build/template/components/TypeFieldsLinkList.js.map +1 -1
- package/build/template/components/TypeIndex.js +2 -2
- package/build/template/components/TypeIndex.js.map +1 -1
- package/build/template/components/VersionSelector.d.ts +7 -0
- package/build/template/components/VersionSelector.d.ts.map +1 -0
- package/build/template/components/VersionSelector.js +30 -0
- package/build/template/components/VersionSelector.js.map +1 -0
- package/build/template/components/graphql/type-link.d.ts.map +1 -1
- package/build/template/components/graphql/type-link.js +2 -2
- package/build/template/components/graphql/type-link.js.map +1 -1
- package/build/template/hooks/useVersionPath.d.ts +6 -0
- package/build/template/hooks/useVersionPath.d.ts.map +1 -0
- package/build/template/hooks/useVersionPath.js +10 -0
- package/build/template/hooks/useVersionPath.js.map +1 -0
- package/build/template/layouts/ChangelogLayout.d.ts.map +1 -0
- package/build/template/{components → layouts}/ChangelogLayout.js +1 -1
- package/build/template/layouts/ChangelogLayout.js.map +1 -0
- package/build/template/layouts/index.d.ts +1 -0
- package/build/template/layouts/index.d.ts.map +1 -1
- package/build/template/layouts/index.js +1 -0
- package/build/template/layouts/index.js.map +1 -1
- package/build/template/lib/fetch-text.d.ts +8 -0
- package/build/template/lib/fetch-text.d.ts.map +1 -0
- package/build/template/lib/fetch-text.js +14 -0
- package/build/template/lib/fetch-text.js.map +1 -0
- package/build/template/lib/polen-url.d.ts +14 -0
- package/build/template/lib/polen-url.d.ts.map +1 -1
- package/build/template/lib/polen-url.js +16 -0
- package/build/template/lib/polen-url.js.map +1 -1
- package/build/template/lib/schema-utils/constants.d.ts +5 -0
- package/build/template/lib/schema-utils/constants.d.ts.map +1 -0
- package/build/template/lib/schema-utils/constants.js +5 -0
- package/build/template/lib/schema-utils/constants.js.map +1 -0
- package/build/template/lib/schema-utils/schema-utils.d.ts +15 -0
- package/build/template/lib/schema-utils/schema-utils.d.ts.map +1 -0
- package/build/template/lib/schema-utils/schema-utils.js +37 -0
- package/build/template/lib/schema-utils/schema-utils.js.map +1 -0
- package/build/template/routes/changelog.d.ts +4 -3
- package/build/template/routes/changelog.d.ts.map +1 -1
- package/build/template/routes/changelog.js +13 -7
- package/build/template/routes/changelog.js.map +1 -1
- package/build/template/routes/pages.d.ts +10 -0
- package/build/template/routes/pages.d.ts.map +1 -0
- package/build/template/routes/pages.js +76 -0
- package/build/template/routes/pages.js.map +1 -0
- package/build/template/routes/reference.$type.$field.js +1 -1
- package/build/template/routes/reference.$type.$field.js.map +1 -1
- package/build/template/routes/reference.$type.d.ts +4 -0
- package/build/template/routes/reference.$type.d.ts.map +1 -1
- package/build/template/routes/reference.$type.js +2 -0
- package/build/template/routes/reference.$type.js.map +1 -1
- package/build/template/routes/reference.d.ts +9 -3
- package/build/template/routes/reference.d.ts.map +1 -1
- package/build/template/routes/reference.js +30 -8
- package/build/template/routes/reference.js.map +1 -1
- package/build/template/routes/reference.version.$version.$type.$field.d.ts +6 -0
- package/build/template/routes/reference.version.$version.$type.$field.d.ts.map +1 -0
- package/build/template/routes/reference.version.$version.$type.$field.js +32 -0
- package/build/template/routes/reference.version.$version.$type.$field.js.map +1 -0
- package/build/template/routes/reference.version.$version.$type.d.ts +11 -0
- package/build/template/routes/reference.version.$version.$type.d.ts.map +1 -0
- package/build/template/routes/reference.version.$version.$type.js +26 -0
- package/build/template/routes/reference.version.$version.$type.js.map +1 -0
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.js +8 -72
- package/build/template/routes/root.js.map +1 -1
- package/build/template/server/app.d.ts +22 -1
- package/build/template/server/app.d.ts.map +1 -1
- package/build/template/server/app.js +19 -9
- package/build/template/server/app.js.map +1 -1
- package/build/template/server/main.js +9 -1
- package/build/template/server/main.js.map +1 -1
- package/build/template/server/ssg/generate.js +2 -2
- package/build/template/server/ssg/generate.js.map +1 -1
- package/build/template/server/ssg/get-route-paths.d.ts +1 -1
- package/build/template/server/ssg/get-route-paths.d.ts.map +1 -1
- package/build/template/server/ssg/get-route-paths.js +51 -27
- package/build/template/server/ssg/get-route-paths.js.map +1 -1
- package/build/template/sources/schema-source.d.ts +15 -0
- package/build/template/sources/schema-source.d.ts.map +1 -0
- package/build/template/sources/schema-source.js +63 -0
- package/build/template/sources/schema-source.js.map +1 -0
- package/package.json +16 -17
- package/src/api/api.ts +1 -0
- package/src/api/config/configurator.ts +51 -32
- package/src/api/config/merge.ts +0 -16
- package/src/api/content/metadata.ts +1 -1
- package/src/api/schema/data-sources/memory/memory.ts +3 -5
- package/src/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.ts +29 -13
- package/src/api/schema/data-sources/schema-directory/schema-directory.ts +56 -16
- package/src/api/schema/data-sources/schema-file/schema-file.ts +16 -7
- package/src/api/schema/metadata.ts +23 -0
- package/src/api/schema/read.ts +3 -3
- package/src/api/schema/schema.ts +62 -2
- package/src/api/schema-source/index.ts +1 -0
- package/src/api/schema-source/schema-source.ts +189 -0
- package/src/api/static/manifest.ts +1 -1
- package/src/api/vite/plugins/core.ts +23 -18
- package/src/api/vite/plugins/main.ts +1 -9
- package/src/api/vite/plugins/schema-assets.ts +317 -0
- package/src/api/vite/plugins/serve.ts +15 -8
- package/src/lib/graphql-change/change-groups.ts +57 -0
- package/src/lib/kit-temp.ts +13 -0
- package/src/lib/path-map/$.test.ts +22 -19
- package/src/lib/path-map/path-map.ts +3 -1
- package/src/project-data.ts +3 -11
- package/src/template/components/Changelog.tsx +16 -67
- package/src/template/components/CodeBlock.tsx +3 -5
- package/src/template/components/ComponentDispatch.tsx +42 -0
- package/src/template/components/ReferenceLink.tsx +34 -0
- package/src/template/components/TypeAnnotation.tsx +5 -7
- package/src/template/components/TypeFieldsLinkList.tsx +20 -23
- package/src/template/components/TypeIndex.tsx +10 -12
- package/src/template/components/VersionSelector.tsx +50 -0
- package/src/template/components/graphql/type-link.tsx +4 -3
- package/src/template/hooks/useVersionPath.ts +10 -0
- package/src/template/{components → layouts}/ChangelogLayout.tsx +1 -1
- package/src/template/layouts/index.ts +1 -0
- package/src/template/lib/fetch-text.ts +13 -0
- package/src/template/lib/polen-url.ts +20 -0
- package/src/template/lib/schema-utils/constants.ts +4 -0
- package/src/template/lib/schema-utils/schema-utils.ts +42 -0
- package/src/template/routes/changelog.tsx +17 -8
- package/src/template/routes/pages.tsx +109 -0
- package/src/template/routes/reference.$type.$field.tsx +1 -1
- package/src/template/routes/reference.$type.tsx +2 -0
- package/src/template/routes/reference.tsx +38 -6
- package/src/template/routes/reference.version.$version.$type.$field.tsx +35 -0
- package/src/template/routes/reference.version.$version.$type.tsx +30 -0
- package/src/template/routes/root.tsx +8 -109
- package/src/template/server/app.ts +47 -14
- package/src/template/server/main.ts +9 -1
- package/src/template/server/ssg/generate.ts +2 -2
- package/src/template/server/ssg/get-route-paths.ts +53 -27
- package/src/template/sources/schema-source.ts +68 -0
- package/build/lib/graphql-document/$$.d.ts +0 -5
- package/build/lib/graphql-document/$$.d.ts.map +0 -1
- package/build/lib/graphql-document/$$.js +0 -5
- package/build/lib/graphql-document/$$.js.map +0 -1
- package/build/lib/graphql-document/$.d.ts +0 -2
- package/build/lib/graphql-document/$.d.ts.map +0 -1
- package/build/lib/graphql-document/$.js +0 -2
- package/build/lib/graphql-document/$.js.map +0 -1
- package/build/lib/graphql-document/analysis.d.ts +0 -44
- package/build/lib/graphql-document/analysis.d.ts.map +0 -1
- package/build/lib/graphql-document/analysis.js +0 -361
- package/build/lib/graphql-document/analysis.js.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts +0 -38
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocument.js +0 -151
- package/build/lib/graphql-document/components/GraphQLDocument.js.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts +0 -7
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js +0 -27
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js.map +0 -1
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts +0 -33
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts.map +0 -1
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js +0 -50
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js.map +0 -1
- package/build/lib/graphql-document/components/IdentifierLink.d.ts +0 -39
- package/build/lib/graphql-document/components/IdentifierLink.d.ts.map +0 -1
- package/build/lib/graphql-document/components/IdentifierLink.js +0 -75
- package/build/lib/graphql-document/components/IdentifierLink.js.map +0 -1
- package/build/lib/graphql-document/components/graphql-document-styles.d.ts +0 -5
- package/build/lib/graphql-document/components/graphql-document-styles.d.ts.map +0 -1
- package/build/lib/graphql-document/components/graphql-document-styles.js +0 -144
- package/build/lib/graphql-document/components/graphql-document-styles.js.map +0 -1
- package/build/lib/graphql-document/components/index.d.ts +0 -5
- package/build/lib/graphql-document/components/index.d.ts.map +0 -1
- package/build/lib/graphql-document/components/index.js +0 -5
- package/build/lib/graphql-document/components/index.js.map +0 -1
- package/build/lib/graphql-document/example.d.ts +0 -25
- package/build/lib/graphql-document/example.d.ts.map +0 -1
- package/build/lib/graphql-document/example.js +0 -140
- package/build/lib/graphql-document/example.js.map +0 -1
- package/build/lib/graphql-document/graphql-document.d.ts +0 -35
- package/build/lib/graphql-document/graphql-document.d.ts.map +0 -1
- package/build/lib/graphql-document/graphql-document.js +0 -36
- package/build/lib/graphql-document/graphql-document.js.map +0 -1
- package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts +0 -43
- package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts.map +0 -1
- package/build/lib/graphql-document/hooks/use-tooltip-state.js +0 -132
- package/build/lib/graphql-document/hooks/use-tooltip-state.js.map +0 -1
- package/build/lib/graphql-document/positioning-simple.d.ts +0 -63
- package/build/lib/graphql-document/positioning-simple.d.ts.map +0 -1
- package/build/lib/graphql-document/positioning-simple.js +0 -185
- package/build/lib/graphql-document/positioning-simple.js.map +0 -1
- package/build/lib/graphql-document/schema-context.d.ts +0 -8
- package/build/lib/graphql-document/schema-context.d.ts.map +0 -1
- package/build/lib/graphql-document/schema-context.js +0 -11
- package/build/lib/graphql-document/schema-context.js.map +0 -1
- package/build/lib/graphql-document/schema-integration.d.ts +0 -135
- package/build/lib/graphql-document/schema-integration.d.ts.map +0 -1
- package/build/lib/graphql-document/schema-integration.js +0 -328
- package/build/lib/graphql-document/schema-integration.js.map +0 -1
- package/build/lib/graphql-document/types.d.ts +0 -117
- package/build/lib/graphql-document/types.d.ts.map +0 -1
- package/build/lib/graphql-document/types.js +0 -2
- package/build/lib/graphql-document/types.js.map +0 -1
- package/build/template/components/ChangelogLayout.d.ts.map +0 -1
- package/build/template/components/ChangelogLayout.js.map +0 -1
- package/build/template/components/CodeHikePre.d.ts +0 -16
- package/build/template/components/CodeHikePre.d.ts.map +0 -1
- package/build/template/components/CodeHikePre.js +0 -37
- package/build/template/components/CodeHikePre.js.map +0 -1
- package/src/lib/graphql-document/$$.ts +0 -4
- package/src/lib/graphql-document/$.test.ts +0 -132
- package/src/lib/graphql-document/$.ts +0 -1
- package/src/lib/graphql-document/README.md +0 -102
- package/src/lib/graphql-document/analysis.ts +0 -415
- package/src/lib/graphql-document/components/GraphQLDocument.tsx +0 -265
- package/src/lib/graphql-document/components/GraphQLDocument.unit.test.ts +0 -188
- package/src/lib/graphql-document/components/GraphQLDocumentWithSchema.tsx +0 -46
- package/src/lib/graphql-document/components/GraphQLIdentifierPopover.tsx +0 -199
- package/src/lib/graphql-document/components/IdentifierLink.tsx +0 -160
- package/src/lib/graphql-document/components/graphql-document-styles.ts +0 -144
- package/src/lib/graphql-document/components/index.ts +0 -4
- package/src/lib/graphql-document/demo.md +0 -155
- package/src/lib/graphql-document/example.ts +0 -163
- package/src/lib/graphql-document/graphql-document.ts +0 -37
- package/src/lib/graphql-document/hooks/use-tooltip-state.test.ts +0 -76
- package/src/lib/graphql-document/hooks/use-tooltip-state.ts +0 -191
- package/src/lib/graphql-document/positioning-simple.test.ts +0 -248
- package/src/lib/graphql-document/positioning-simple.ts +0 -260
- package/src/lib/graphql-document/schema-context.tsx +0 -20
- package/src/lib/graphql-document/schema-integration.test.ts +0 -365
- package/src/lib/graphql-document/schema-integration.ts +0 -488
- package/src/lib/graphql-document/types.ts +0 -129
- package/src/template/components/CodeHikePre.tsx +0 -51
- /package/build/template/{components → layouts}/ChangelogLayout.d.ts +0 -0
package/build/api/api.d.ts
CHANGED
@@ -2,5 +2,6 @@ export * from './builder/index.js';
|
|
2
2
|
export * from './config-resolver/index.js';
|
3
3
|
export * from './config/index.js';
|
4
4
|
export * as Project from './project/index.js';
|
5
|
+
export * from './schema/index.js';
|
5
6
|
export * from './static/index.js';
|
6
7
|
//# sourceMappingURL=api.d.ts.map
|
package/build/api/api.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA;AACjC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,cAAc,mBAAmB,CAAA"}
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA;AACjC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
|
package/build/api/api.js
CHANGED
@@ -2,5 +2,6 @@ export * from './builder/index.js';
|
|
2
2
|
export * from './config-resolver/index.js';
|
3
3
|
export * from './config/index.js';
|
4
4
|
export * as Project from './project/index.js';
|
5
|
+
export * from './schema/index.js';
|
5
6
|
export * from './static/index.js';
|
6
7
|
//# sourceMappingURL=api.js.map
|
package/build/api/api.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA;AACjC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,cAAc,mBAAmB,CAAA"}
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA;AACjC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
|
@@ -237,22 +237,6 @@ export interface ConfigInput {
|
|
237
237
|
* @default false
|
238
238
|
*/
|
239
239
|
isSelfContainedMode?: boolean;
|
240
|
-
/**
|
241
|
-
* Tweak the watch behavior.
|
242
|
-
*/
|
243
|
-
watch?: {
|
244
|
-
/**
|
245
|
-
* Restart the development server when some arbitrary files change.
|
246
|
-
*
|
247
|
-
* Use this to restart when files that are not already watched by vite change.
|
248
|
-
*
|
249
|
-
* @see https://github.com/antfu/vite-plugin-restart
|
250
|
-
*/
|
251
|
-
/**
|
252
|
-
* File paths to watch and restart the development server when they change.
|
253
|
-
*/
|
254
|
-
also?: string[];
|
255
|
-
};
|
256
240
|
/**
|
257
241
|
* Whether to enable debug mode.
|
258
242
|
*
|
@@ -283,9 +267,9 @@ export interface Config {
|
|
283
267
|
};
|
284
268
|
server: {
|
285
269
|
port: number;
|
286
|
-
|
287
|
-
|
288
|
-
|
270
|
+
routes: {
|
271
|
+
assets: string;
|
272
|
+
};
|
289
273
|
};
|
290
274
|
templateVariables: TemplateVariables;
|
291
275
|
schemaAugmentations: SchemaAugmentation.Augmentation[];
|
@@ -305,7 +289,12 @@ export interface Config {
|
|
305
289
|
build: {
|
306
290
|
root: string;
|
307
291
|
relative: {
|
308
|
-
assets:
|
292
|
+
assets: {
|
293
|
+
root: string;
|
294
|
+
relative: {
|
295
|
+
schemas: string;
|
296
|
+
};
|
297
|
+
};
|
309
298
|
serverEntrypoint: string;
|
310
299
|
};
|
311
300
|
};
|
@@ -318,7 +307,10 @@ export interface Config {
|
|
318
307
|
absolute: {
|
319
308
|
build: {
|
320
309
|
root: string;
|
321
|
-
assets:
|
310
|
+
assets: {
|
311
|
+
root: string;
|
312
|
+
schemas: string;
|
313
|
+
};
|
322
314
|
serverEntrypoint: string;
|
323
315
|
};
|
324
316
|
pages: string;
|
@@ -328,7 +320,13 @@ export interface Config {
|
|
328
320
|
};
|
329
321
|
};
|
330
322
|
};
|
331
|
-
framework: PackagePaths
|
323
|
+
framework: PackagePaths & {
|
324
|
+
devAssets: {
|
325
|
+
relative: string;
|
326
|
+
absolute: string;
|
327
|
+
schemas: string;
|
328
|
+
};
|
329
|
+
};
|
332
330
|
};
|
333
331
|
advanced: {
|
334
332
|
isSelfContainedMode: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"configurator.d.ts","sourceRoot":"","sources":["../../../src/api/config/configurator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,EAAE,KAAK,YAAY,EAAgB,MAAM,gBAAgB,CAAA;AAEhE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAChF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhD,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAA;AAEV,eAAO,MAAM,iBAAiB;;;;EAAsC,CAAA;AAEpE,MAAM,MAAM,iBAAiB,GAAG,OAAO,qBAAqB,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAA;AAEhG,KAAK,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;AAE3D;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,mBAAmB,CAAC,EAAE,kBAAkB,CAAC,YAAY,EAAE,CAAA;IACvD,iBAAiB,CAAC,EAAE;QAClB;;;;;;;;;;;;;;;;;;WAkBG;QACH,KAAK,CAAC,EAAE,MAAM,C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AAA;oBACZ,IAAI,EAAE,MAAM,CAAA;iBACb,CAAA;aACF,CAAA;SACF,CAAA;QACD,SAAS,EAAE,YAAY,GAAG;YACxB,SAAS,EAAE;gBACT,QAAQ,EAAE,MAAM,CAAA;gBAChB,QAAQ,EAAE,MAAM,CAAA;gBAChB,OAAO,EAAE,MAAM,CAAA;aAChB,CAAA;SACF,CAAA;KACF,CAAA;IACD,QAAQ,EAAE;QACR,mBAAmB,EAAE,OAAO,CAAA;QAC5B,QAAQ,EAAE,OAAO,CAAA;QACjB,KAAK,EAAE,OAAO,CAAA;QACd,IAAI,CAAC,EAAE,IAAI,CAAC,UAAU,CAAA;KACvB,CAAA;CACF;AAmCD,eAAO,MAAM,cAAc,GACzB,aAAa,WAAW,GAAG,SAAS;AACpC;;;;;;;GAOG;AACH,iBAAiB,MAAM,KACtB,OAAO,CAAC,MAAM,CAkFhB,CAAA"}
|
@@ -16,6 +16,10 @@ const buildPaths = (rootDir) => {
|
|
16
16
|
const buildAbsolute = Path.ensureAbsoluteWith(buildAbsolutePath);
|
17
17
|
const publicAbsolutePath = rootAbsolute(`public`);
|
18
18
|
const publicAbsolute = Path.ensureAbsoluteWith(publicAbsolutePath);
|
19
|
+
const assetsAbsolute = Path.ensureAbsoluteWith(buildAbsolute(`assets`));
|
20
|
+
// Dev assets paths
|
21
|
+
const devAssetsRelative = 'node_modules/.vite/polen-assets';
|
22
|
+
const devAssetsAbsolute = Path.join(packagePaths.rootDir, devAssetsRelative);
|
19
23
|
return {
|
20
24
|
project: {
|
21
25
|
rootDir,
|
@@ -24,7 +28,12 @@ const buildPaths = (rootDir) => {
|
|
24
28
|
root: `build`,
|
25
29
|
relative: {
|
26
30
|
serverEntrypoint: `app.js`,
|
27
|
-
assets:
|
31
|
+
assets: {
|
32
|
+
root: `assets`,
|
33
|
+
relative: {
|
34
|
+
schemas: `schemas`,
|
35
|
+
},
|
36
|
+
},
|
28
37
|
},
|
29
38
|
},
|
30
39
|
pages: `pages`,
|
@@ -38,7 +47,10 @@ const buildPaths = (rootDir) => {
|
|
38
47
|
build: {
|
39
48
|
root: buildAbsolute(`.`),
|
40
49
|
serverEntrypoint: buildAbsolute(`app.js`),
|
41
|
-
assets:
|
50
|
+
assets: {
|
51
|
+
root: buildAbsolute(`assets`),
|
52
|
+
schemas: assetsAbsolute(`schemas`),
|
53
|
+
},
|
42
54
|
},
|
43
55
|
public: {
|
44
56
|
root: publicAbsolute(`.`),
|
@@ -46,7 +58,14 @@ const buildPaths = (rootDir) => {
|
|
46
58
|
},
|
47
59
|
},
|
48
60
|
},
|
49
|
-
framework:
|
61
|
+
framework: {
|
62
|
+
...packagePaths,
|
63
|
+
devAssets: {
|
64
|
+
relative: devAssetsRelative,
|
65
|
+
absolute: devAssetsAbsolute,
|
66
|
+
schemas: Path.join(devAssetsAbsolute, 'schemas'),
|
67
|
+
},
|
68
|
+
},
|
50
69
|
};
|
51
70
|
};
|
52
71
|
const configInputDefaults = {
|
@@ -55,15 +74,15 @@ const configInputDefaults = {
|
|
55
74
|
title: `My Developer Portal`,
|
56
75
|
},
|
57
76
|
schemaAugmentations: [],
|
58
|
-
watch: {
|
59
|
-
also: [],
|
60
|
-
},
|
61
77
|
build: {
|
62
78
|
architecture: BuildArchitecture.enum.ssg,
|
63
79
|
base: `/`,
|
64
80
|
},
|
65
81
|
server: {
|
66
82
|
port: 3000,
|
83
|
+
routes: {
|
84
|
+
assets: '/assets',
|
85
|
+
},
|
67
86
|
},
|
68
87
|
schema: null,
|
69
88
|
ssr: {
|
@@ -144,12 +163,11 @@ baseRootDirPath) => {
|
|
144
163
|
if (configInput?.advanced?.explorer !== undefined) {
|
145
164
|
config.advanced.explorer = configInput.advanced.explorer;
|
146
165
|
}
|
147
|
-
if (configInput?.advanced?.watch?.also) {
|
148
|
-
config.watch.also = configInput.advanced.watch.also;
|
149
|
-
}
|
150
166
|
if (configInput?.server?.port !== undefined) {
|
151
167
|
config.server.port = configInput.server.port;
|
152
168
|
}
|
169
|
+
// Server routes are not configurable by users yet, use defaults
|
170
|
+
// config.server.routes is already set from defaultConfig
|
153
171
|
// Process warnings configuration
|
154
172
|
if (configInput?.warnings?.interactiveWithoutSchema?.enabled !== undefined) {
|
155
173
|
config.warnings.interactiveWithoutSchema.enabled = configInput.warnings.interactiveWithoutSchema.enabled;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"configurator.js","sourceRoot":"","sources":["../../../src/api/config/configurator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAqB,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAChE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;CACF,CAAA;AAEV,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAA;
|
1
|
+
{"version":3,"file":"configurator.js","sourceRoot":"","sources":["../../../src/api/config/configurator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAqB,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAChE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;CACF,CAAA;AAEV,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,UAAU,CAAC,qBA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M,CAAC,IAAI,CAAA;IAC9C,CAAC;IAED,gEAAgE;IAChE,yDAAyD;IAEzD,iCAAiC;IACjC,IAAI,WAAW,EAAE,QAAQ,EAAE,wBAAwB,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;QAC3E,MAAM,CAAC,QAAQ,CAAC,wBAAwB,CAAC,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC,wBAAwB,CAAC,OAAO,CAAA;IAC1G,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/api/config/merge.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD;;;GAGG;AACH,eAAO,MAAM,WAAW,GACtB,MAAM,WAAW,EACjB,YAAY,WAAW,GAAG,SAAS,KAClC,
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/api/config/merge.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD;;;GAGG;AACH,eAAO,MAAM,WAAW,GACtB,MAAM,WAAW,EACjB,YAAY,WAAW,GAAG,SAAS,KAClC,WAiDF,CAAA"}
|
@@ -32,17 +32,6 @@ export const mergeInputs = (base, overrides) => {
|
|
32
32
|
// Merge advanced config
|
33
33
|
if (base.advanced ?? overrides.advanced) {
|
34
34
|
merged.advanced = spreadShallow(base.advanced, overrides.advanced);
|
35
|
-
// Merge advanced.watch config
|
36
|
-
if (base.advanced?.watch ?? overrides.advanced?.watch) {
|
37
|
-
merged.advanced.watch = spreadShallow(base.advanced?.watch, overrides.advanced?.watch);
|
38
|
-
// Merge watch.also arrays
|
39
|
-
if (base.advanced?.watch?.also ?? overrides.advanced?.watch?.also) {
|
40
|
-
merged.advanced.watch.also = [
|
41
|
-
...(base.advanced?.watch?.also ?? []),
|
42
|
-
...(overrides.advanced?.watch?.also ?? []),
|
43
|
-
];
|
44
|
-
}
|
45
|
-
}
|
46
35
|
// Merge Vite configs if present
|
47
36
|
if (base.advanced?.vite ?? overrides.advanced?.vite) {
|
48
37
|
merged.advanced.vite = Vite.mergeConfig(base.advanced?.vite ?? {}, overrides.advanced?.vite ?? {});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../src/api/config/merge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAG7C;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,IAAiB,EACjB,SAAmC,EACtB,EAAE;IACf,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,MAAM,GAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;IAE1D,+BAA+B;IAC/B,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;QACpC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAA;IACjD,CAAC;IAED,qBAAqB;IACrB,IAAI,IAAI,CAAC,KAAK,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;QAClC,MAAM,CAAC,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,CAAA;IAC3D,CAAC;IAED,sBAAsB;IACtB,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;QACpC,MAAM,CAAC,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;IAC9D,CAAC;IAED,wBAAwB;IACxB,IAAI,IAAI,CAAC,QAAQ,IAAI,SAAS,CA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ACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
@@ -1,10 +1,16 @@
|
|
1
|
-
import { z } from 'zod
|
1
|
+
import { z } from 'zod';
|
2
2
|
/**
|
3
3
|
* Schema for validating front matter content
|
4
4
|
*/
|
5
5
|
export declare const MetadataSchema: z.ZodObject<{
|
6
6
|
description: z.ZodOptional<z.ZodString>;
|
7
7
|
hidden: z.ZodDefault<z.ZodBoolean>;
|
8
|
-
}, z.
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
9
|
+
hidden: boolean;
|
10
|
+
description?: string | undefined;
|
11
|
+
}, {
|
12
|
+
description?: string | undefined;
|
13
|
+
hidden?: boolean | undefined;
|
14
|
+
}>;
|
9
15
|
export type Metadata = z.infer<typeof MetadataSchema>;
|
10
16
|
//# sourceMappingURL=metadata.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/api/content/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/api/content/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;EAGzB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/api/content/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/api/content/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACnC,CAAC,CAAA"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { NonEmptyChangeSets } from '../../schema.js';
|
2
2
|
/**
|
3
3
|
* Configuration for defining schemas programmatically in memory.
|
4
4
|
*
|
@@ -47,5 +47,5 @@ export interface Config {
|
|
47
47
|
}[];
|
48
48
|
}
|
49
49
|
export declare const normalize: (configInput: ConfigInput) => Config;
|
50
|
-
export declare const read: (configInput: ConfigInput) => Promise<null |
|
50
|
+
export declare const read: (configInput: ConfigInput) => Promise<null | NonEmptyChangeSets>;
|
51
51
|
//# sourceMappingURL=memory.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../../../src/api/schema/data-sources/memory/memory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../../../src/api/schema/data-sources/memory/memory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,QAAQ,EACJ,MAAM,GACN,MAAM,EAAE,GACR;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CACpC;AAED,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAC1C;AAED,eAAO,MAAM,SAAS,GAAI,aAAa,WAAW,KAAG,MAcpD,CAAA;AAED,eAAO,MAAM,IAAI,GACf,aAAa,WAAW,KACvB,OAAO,CAAC,IAAI,GAAG,kBAAkB,CA4CnC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../../../src/api/schema/data-sources/memory/memory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAiDrC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,WAAwB,EAAU,EAAE;IAC5D,MAAM,MAAM,GAAW;QACrB,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE;YACpD,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;gBAC1B,OAAO;oBACL,IAAI,EAAE,IAAI,IAAI,EAAE;oBAChB,KAAK,EAAE,CAAC;iBACT,CAAA;YACH,CAAC;YACD,OAAO,CAAC,CAAA;QACV,CAAC,CAAC;KACH,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,EACvB,WAAwB,
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../../../src/api/schema/data-sources/memory/memory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAiDrC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,WAAwB,EAAU,EAAE;IAC5D,MAAM,MAAM,GAAW;QACrB,QAAQ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A;QACvB,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;QAEpC,MAAM,MAAM,GAAG,QAAQ,EAAE,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAA;QACvD,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAA;QAE5B,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,aAAa,CAAC;YAChD,MAAM;YACN,KAAK;SACN,CAAC,CAAA;QAEF,OAAO;YACL,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,MAAM;YACN,KAAK;YACL,OAAO;SACR,CAAA;IACH,CAAC,CAAC,CACH,CAAA;IAED,UAAU,CAAC,OAAO,EAAE,CAAA;IAEpB,MAAM,MAAM,GAAuB,UAAU,CAAA;IAE7C,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
@@ -1,9 +1,13 @@
|
|
1
|
-
export type Expression =
|
1
|
+
export type Expression = ExpressionVersioned | ExpressionSingle;
|
2
2
|
export declare const parseOrThrow: (fileNameOrSerializedExpression: string) => Expression;
|
3
3
|
export declare const parse: (fileName: string) => null | Expression;
|
4
|
-
export interface
|
5
|
-
type: `
|
4
|
+
export interface ExpressionVersioned {
|
5
|
+
type: `FileNameExpressionVersioned`;
|
6
6
|
date: Date;
|
7
7
|
filePath: string;
|
8
8
|
}
|
9
|
+
export interface ExpressionSingle {
|
10
|
+
type: `FileNameExpressionSingle`;
|
11
|
+
filePath: string;
|
12
|
+
}
|
9
13
|
//# sourceMappingURL=file-name-expression.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"file-name-expression.d.ts","sourceRoot":"","sources":["../../../../../../src/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG,
|
1
|
+
{"version":3,"file":"file-name-expression.d.ts","sourceRoot":"","sources":["../../../../../../src/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,gBAAgB,CAAA;AAE/D,eAAO,MAAM,YAAY,GAAI,gCAAgC,MAAM,KAAG,UAKrE,CAAA;AAED,eAAO,MAAM,KAAK,GAAI,UAAU,MAAM,KAAG,IAAI,GAAG,UAgB/C,CAAA;AAID,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,6BAA6B,CAAA;IACnC,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;CACjB;AAoBD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,0BAA0B,CAAA;IAChC,QAAQ,EAAE,MAAM,CAAA;CACjB"}
|
package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.js
CHANGED
@@ -11,25 +11,29 @@ export const parse = (fileName) => {
|
|
11
11
|
throw new Error(`If file name is provided, must be .graphql. Got: ${fileName}`);
|
12
12
|
}
|
13
13
|
const serializedExpression = path.name;
|
14
|
-
const
|
15
|
-
if (
|
16
|
-
return { ...
|
17
|
-
|
18
|
-
|
14
|
+
const versioned = parseExpressionVersionedSerialized(serializedExpression);
|
15
|
+
if (versioned)
|
16
|
+
return { ...versioned, filePath: fileName, type: `FileNameExpressionVersioned` };
|
17
|
+
const single = parseExpressionSingleSerialized(serializedExpression);
|
18
|
+
if (single)
|
19
|
+
return { ...single, filePath: fileName, type: `FileNameExpressionSingle` };
|
19
20
|
return null;
|
20
21
|
};
|
21
|
-
const
|
22
|
-
const match =
|
22
|
+
const parseExpressionVersionedSerialized = (serializedExpression) => {
|
23
|
+
const match = expressionVersionedSerializedPattern.exec(serializedExpression);
|
23
24
|
if (!match)
|
24
25
|
return null;
|
25
26
|
const { year, month, day } = match.groups;
|
26
27
|
const date = new Date(parseInt(year), parseInt(month) - 1, parseInt(day));
|
27
28
|
return { date };
|
28
29
|
};
|
29
|
-
const
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
const expressionVersionedSerializedPattern = /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/;
|
31
|
+
const parseExpressionSingleSerialized = (serializedExpression) => {
|
32
|
+
if (serializedExpression === `schema`) {
|
33
|
+
return {};
|
34
|
+
}
|
35
|
+
return null;
|
36
|
+
};
|
33
37
|
// ----
|
34
38
|
// export interface ExpressionLatest {
|
35
39
|
// type: `FileNameExpressionLatest`
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"file-name-expression.js","sourceRoot":"","sources":["../../../../../../src/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAItC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,8BAAsC,EAAc,EAAE;IACjF,MAAM,MAAM,GAAG,KAAK,CAAC,8BAA8B,CAAC,CAAA;IACpD,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,8BAA8B,EAAE,CAAC,CAAA;IAEhG,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,QAAgB,EAAqB,EAAE;IAC3D,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IACjC,IAAI,IAAI,CAAC,GAAG,KAAK,UAAU,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,oDAAoD,QAAQ,EAAE,CAC/D,CAAA;IACH,CAAC;IACD,MAAM,oBAAoB,GAAG,IAAI,CAAC,IAAI,CAAA;IAEtC,MAAM,
|
1
|
+
{"version":3,"file":"file-name-expression.js","sourceRoot":"","sources":["../../../../../../src/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAItC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,8BAAsC,EAAc,EAAE;IACjF,MA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AC,GAAG,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAA;IACzE,OAAO,EAAE,IAAI,EAAE,CAAA;AACjB,CAAC,CAAA;AAED,MAAM,oCAAoC,GAAG,gDAAgD,CAAA;AAa7F,MAAM,+BAA+B,GAAG,CACtC,oBAA4B,EACjB,EAAE;IACb,IAAI,oBAAoB,KAAK,QAAQ,EAAE,CAAC;QACtC,OAAO,EAAE,CAAA;IACX,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,OAAO;AAEP,sCAAsC;AACtC,qCAAqC;AACrC,qBAAqB;AACrB,IAAI;AAEJ,yFAAyF;AACzF,qDAAqD;AACrD,gBAAgB;AAChB,IAAI;AAEJ,kGAAkG;AAClG,0DAA0D;AAC1D,IAAI"}
|
@@ -1,14 +1,18 @@
|
|
1
|
-
import type {
|
1
|
+
import type { NonEmptyChangeSets } from '../../schema.js';
|
2
2
|
/**
|
3
|
-
* Configuration for loading
|
3
|
+
* Configuration for loading schema(s) from a directory.
|
4
4
|
*
|
5
|
-
*
|
5
|
+
* Supports two modes:
|
6
|
+
* 1. Multiple versioned schemas with date prefixes (enables changelog feature)
|
7
|
+
* 2. Single schema file named 'schema.graphql' (non-versioned, like file data source)
|
6
8
|
*/
|
7
9
|
export interface ConfigInput {
|
8
10
|
/**
|
9
|
-
* Path to the directory containing
|
11
|
+
* Path to the directory containing schema files.
|
10
12
|
*
|
11
|
-
*
|
13
|
+
* Supports two patterns:
|
14
|
+
* 1. Multiple versioned files with ISO date prefixes: `YYYY-MM-DD.graphql`
|
15
|
+
* 2. Single file named: `schema.graphql`
|
12
16
|
*
|
13
17
|
* @default './schema'
|
14
18
|
*
|
@@ -21,12 +25,17 @@ export interface ConfigInput {
|
|
21
25
|
* path: './graphql/versions'
|
22
26
|
* ```
|
23
27
|
*
|
24
|
-
* Directory structure
|
28
|
+
* Directory structure examples:
|
25
29
|
* ```
|
30
|
+
* // Versioned schemas (enables changelog)
|
26
31
|
* schema/
|
27
32
|
* 2024-01-15.graphql
|
28
33
|
* 2024-03-20.graphql
|
29
34
|
* 2024-06-10.graphql
|
35
|
+
*
|
36
|
+
* // Single schema (non-versioned)
|
37
|
+
* schema/
|
38
|
+
* schema.graphql
|
30
39
|
* ```
|
31
40
|
*/
|
32
41
|
path?: string;
|
@@ -36,5 +45,5 @@ export interface Config {
|
|
36
45
|
path: string;
|
37
46
|
}
|
38
47
|
export declare const normalizeConfig: (configInput: ConfigInput) => Config;
|
39
|
-
export declare const readOrThrow: (configInput: ConfigInput) => Promise<null |
|
48
|
+
export declare const readOrThrow: (configInput: ConfigInput) => Promise<null | NonEmptyChangeSets>;
|
40
49
|
//# sourceMappingURL=schema-directory.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"schema-directory.d.ts","sourceRoot":"","sources":["../../../../../src/api/schema/data-sources/schema-directory/schema-directory.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"schema-directory.d.ts","sourceRoot":"","sources":["../../../../../src/api/schema/data-sources/schema-directory/schema-directory.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAWzD;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,eAAO,MAAM,eAAe,GAAI,aAAa,WAAW,KAAG,MAO1D,CAAA;AAED,eAAO,MAAM,WAAW,GAAU,aAAa,WAAW,KAAG,OAAO,CAAC,IAAI,GAAG,kBAAkB,CA8C7F,CAAA"}
|
@@ -3,6 +3,7 @@ import { GraphqlChange } from '#lib/graphql-change/index';
|
|
3
3
|
import { debugPolen } from '#singletons/debug';
|
4
4
|
import { Arr, Path } from '@wollybeard/kit';
|
5
5
|
import { glob } from 'tinyglobby';
|
6
|
+
import { readSingleSchemaFile } from '../schema-file/schema-file.js';
|
6
7
|
import { FileNameExpression } from './file-name-expression/index.js';
|
7
8
|
// const debug = debugPolen.sub([`schema`, `data-source-schema-directory`])
|
8
9
|
const debug = debugPolen.sub(`schema:data-source-schema-directory`);
|
@@ -31,7 +32,28 @@ export const readOrThrow = async (configInput) => {
|
|
31
32
|
}
|
32
33
|
const fileNameExpressions = Arr.map(filePaths, FileNameExpression.parseOrThrow);
|
33
34
|
debug(`parsed file names`, fileNameExpressions);
|
34
|
-
|
35
|
+
// Separate versioned (dated) and single schema files
|
36
|
+
const versionedExpressions = fileNameExpressions.filter((expr) => expr.type === `FileNameExpressionVersioned`);
|
37
|
+
const singleExpressions = fileNameExpressions.filter((expr) => expr.type === `FileNameExpressionSingle`);
|
38
|
+
// If we have versioned files, use them (versioned takes precedence)
|
39
|
+
if (Arr.isntEmpty(versionedExpressions)) {
|
40
|
+
return await readVersionedSchemas(versionedExpressions);
|
41
|
+
}
|
42
|
+
// If we have a single schema file, use it
|
43
|
+
if (Arr.isntEmpty(singleExpressions)) {
|
44
|
+
if (singleExpressions.length > 1) {
|
45
|
+
throw new Error(`Multiple single schema files found, expected exactly one: ${singleExpressions.map(e => e.filePath).join(', ')}`);
|
46
|
+
}
|
47
|
+
return await readSingleSchemaFile(singleExpressions[0].filePath);
|
48
|
+
}
|
49
|
+
// Should not happen since we already checked for empty filePaths
|
50
|
+
throw new Error(`No schema files found despite non-empty file paths`);
|
51
|
+
};
|
52
|
+
/**
|
53
|
+
* Read multiple versioned schema files and create changesets
|
54
|
+
*/
|
55
|
+
const readVersionedSchemas = async (versionedExpressions) => {
|
56
|
+
const versions = await Promise.all(Arr.map(versionedExpressions, async (fileNameExpression) => {
|
35
57
|
const schemaFile = await Grafaid.Schema.read(fileNameExpression.filePath);
|
36
58
|
// Should never happen since these paths come from the glob.
|
37
59
|
if (!schemaFile)
|
@@ -41,7 +63,7 @@ export const readOrThrow = async (configInput) => {
|
|
41
63
|
schema: schemaFile.content,
|
42
64
|
};
|
43
65
|
}));
|
44
|
-
debug(`read schemas`);
|
66
|
+
debug(`read versioned schemas`);
|
45
67
|
versions.sort((a, b) => a.date.getTime() - b.date.getTime());
|
46
68
|
const changesets = await Promise.all(Arr.map(versions, async (version, index) => {
|
47
69
|
const current = version;
|
@@ -60,10 +82,7 @@ export const readOrThrow = async (configInput) => {
|
|
60
82
|
};
|
61
83
|
}));
|
62
84
|
changesets.reverse();
|
63
|
-
|
64
|
-
|
65
|
-
};
|
66
|
-
debug(`computed schema`);
|
67
|
-
return schema;
|
85
|
+
debug(`computed versioned schema`);
|
86
|
+
return changesets;
|
68
87
|
};
|
69
88
|
//# sourceMappingURL=schema-directory.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"schema-directory.js","sourceRoot":"","sources":["../../../../../src/api/schema/data-sources/schema-directory/schema-directory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAEpE,2EAA2E;AAC3E,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAA;AAEnE,MAAM,YAAY,GAAG;IACnB,eAAe,EAAE,UAAU;CAC5B,CAAA;
|
1
|
+
{"version":3,"file":"schema-directory.js","sourceRoot":"","sources":["../../../../../src/api/schema/data-sources/schema-directory/schema-directory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE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KAAK,CAAC,2BAA2B,CAAC,CAAA;IAClC,OAAO,UAAgC,CAAA;AACzC,CAAC,CAAA"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { NonEmptyChangeSets } from '../../schema.js';
|
2
2
|
/**
|
3
3
|
* Configuration for loading schema from a single SDL file.
|
4
4
|
*/
|
@@ -26,5 +26,10 @@ export interface Config {
|
|
26
26
|
path: string;
|
27
27
|
}
|
28
28
|
export declare const normalizeConfig: (configInput: ConfigInput) => Config;
|
29
|
-
export declare const readOrThrow: (configInput: ConfigInput) => Promise<null |
|
29
|
+
export declare const readOrThrow: (configInput: ConfigInput) => Promise<null | NonEmptyChangeSets>;
|
30
|
+
/**
|
31
|
+
* Create a single changeset from a schema file path.
|
32
|
+
* This is the core logic for handling single (unversioned) schemas.
|
33
|
+
*/
|
34
|
+
export declare const readSingleSchemaFile: (filePath: string) => Promise<NonEmptyChangeSets>;
|
30
35
|
//# sourceMappingURL=schema-file.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"schema-file.d.ts","sourceRoot":"","sources":["../../../../../src/api/schema/data-sources/schema-file/schema-file.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"schema-file.d.ts","sourceRoot":"","sources":["../../../../../src/api/schema/data-sources/schema-file/schema-file.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAMzD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,eAAO,MAAM,eAAe,GAAI,aAAa,WAAW,KAAG,MAM1D,CAAA;AAED,eAAO,MAAM,WAAW,GACtB,aAAa,WAAW,KACvB,OAAO,CAAC,IAAI,GAAG,kBAAkB,CAOnC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,kBAAkB,CAsBvF,CAAA"}
|
@@ -15,22 +15,30 @@ export const readOrThrow = async (configInput) => {
|
|
15
15
|
const schemaFile = await Grafaid.Schema.read(config.path);
|
16
16
|
if (!schemaFile)
|
17
17
|
return null;
|
18
|
-
|
18
|
+
return await readSingleSchemaFile(config.path);
|
19
|
+
};
|
20
|
+
/**
|
21
|
+
* Create a single changeset from a schema file path.
|
22
|
+
* This is the core logic for handling single (unversioned) schemas.
|
23
|
+
*/
|
24
|
+
export const readSingleSchemaFile = async (filePath) => {
|
25
|
+
const schemaFile = await Grafaid.Schema.read(filePath);
|
26
|
+
if (!schemaFile)
|
27
|
+
throw new Error(`Failed to read schema file: ${filePath}`);
|
28
|
+
const date = new Date(); // Generate date here for unversioned schema
|
19
29
|
const after = schemaFile.content;
|
20
30
|
const before = Grafaid.Schema.empty;
|
21
31
|
const changes = await GraphqlChange.calcChangeset({
|
22
32
|
before,
|
23
33
|
after,
|
24
34
|
});
|
25
|
-
const
|
35
|
+
const changeset = {
|
26
36
|
date,
|
27
37
|
after,
|
28
38
|
before,
|
29
39
|
changes,
|
30
40
|
};
|
31
|
-
const schema =
|
32
|
-
versions: [schemaVersion],
|
33
|
-
};
|
41
|
+
const schema = [changeset];
|
34
42
|
return schema;
|
35
43
|
};
|
36
44
|
//# sourceMappingURL=schema-file.js.map
|